srctree

commits New Issue Suggest Diff

hastur

190 branchescss2: Fix consume_number eating an extra character 5 months ago200e8d8c
.github/
ci: Use libc++-19 in the clang-tidy job5 months ago
archive/
meta/clang-tidy: Make readability-identifier-naming accept fuzz tests 5 months ago
azm/
meta/clang-tidy: Enable bugprone-unchecked-optional-access 10 months ago
browser/
deps: Update to SFML 3 5 months ago
bzl/
ci: Run all fuzz tests7 months ago
css/
css: Drop no-longer-needed nolint5 months ago
css2/
css2: Fix consume_number eating an extra character 5 months ago
dom/
meta: Enable clang-tidy's misc-no-recursion lint5 months ago
engine/
style: Restructure the display property to support more values 6 months ago
etest/
etest: Print the test name even if the test crashes6 months ago
geom/
geom: Add a Rect::empty helper 13 months ago
gfx/
deps: Update to SFML 3 5 months ago
html/
html: Stop dropping all whitespace-only text nodes7 months ago
html2/
meta/clang-tidy: Make readability-identifier-naming accept fuzz tests 5 months ago
idna/
unicode: Adopt util/unicode.h7 months ago
img/
deps: Update to SFML 3 5 months ago
js/
etest: Drop no-longer-needed std::source_location-workaround9 months ago
layout/
meta/clang-tidy: Enable modernize-min-max-use-initializer-list 5 months ago
net/
meta/clang-tidy: Suppress warnings new in clang-tidy 19 5 months ago
os/
build: Support the wasi OS constraint 9 months ago
protocol/
protocol: Implement a simple in-memory cache 5 months ago
render/
meta: Enable clang-tidy's misc-no-recursion lint5 months ago
style/
meta/clang-tidy: Enable performance-unnecessary-value-param 5 months ago
third_party/
deps: Update to SFML 3 5 months ago
tui/
meta: Enable clang-tidy's misc-no-recursion lint5 months ago
type/
deps: Update to SFML 3 5 months ago
unicode/
meta: Enable clang-tidy's misc-no-recursion lint5 months ago
uri/
uri: Implement all comparison operators for Uri 5 months ago
url/
meta/clang-tidy: Suppress warnings new in clang-tidy 19 5 months ago
util/
meta/clang-tidy: Enable the init-variables check 7 months ago
wasm/
wasm/test: Improve test coverage 5 months ago
.bazelrc
deps: Update to SFML 3 5 months ago
.bazelrc.local.example
build: Drop support for Clang 14 code coverage1 years ago
.bazelversion
build: Update to Bazel 7.3.1 6 months ago
.clang-format
ci: Add pre-commit checks 14 months ago
.clang-tidy
meta/clang-tidy: Drop no-longer-needed cert-dcl21-cpp disable 5 months ago
.gitattributes
html2: Delete the simple_page test2 years ago
.gitignore
build: Make generating compile_commands.json more convenient 2 years ago
.gitlint
unicode: Split out pure unicode bits from //idna7 months ago
.pre-commit-config.yaml
ci: Update black, buildifier, codecov, pre-commit, and wasmtime 10 months ago
BUILD
meta: Make it possible to run clang-tidy using Bazel 1 years ago
LICENSE
Wrap license at 80 cols 3 years ago
README.md
ci: Drop support for Clang 14, 159 months ago
WORKSPACE
deps: Update to SFML 3 5 months ago
codecov.yml
ci: Make the code coverage status required again5 months ago
README.md

Toy browser engine


[![codecov](https://codecov.io/gh/robinlinden/hastur/branch/master/graph/badge.svg?token=1H16FDJ3ML)][codecov]

Building


Requirements


Compiler


Right now GCC 12, Clang 16, and MSVC are tested against. The project makes use of C++23 features, so a reasonably recent compiler is required.

Build system


[Bazel][bazel] is used as the build system. I recommend using [Bazelisk][bazelisk] as that will pick up the Bazel version to use from the .bazelversion file in the repository root.
Per-developer configuration (e.g. compiler used and build type) is managed in a gitignored .bazelrc.local file. To set this up for your environment, copy .bazelrc.local.example to .bazelrc.local and edit to suit your compiler of choice.

Process


The following assumes that you either have Bazel or Bazelisk under the name bazel on your PATH and that you have set up your .bazelrc.local file.

Listing build targets


bazel query //...

Building all targets


bazel build //...

Building a single target


bazel build //html

Running all tests


bazel test //...

Running the browser engine


bazel run //browser

Generate json compilation database


bazel run refresh_compile_commands

Misc


clangd on Windows


If using clangd on Windows, you need work around [clangd not supporting /std:c++latest][clangd-on-windows] by setting up a .clangd configuration containing
CompileFlags: Add: ["-std:c++latest"]

to force its inclusion and avoid your editor displaying errors for every newish C++ feature.
[bazel]: https://bazel.build [bazelisk]: https://github.com/bazelbuild/bazelisk [clangd-on-windows]: https://github.com/clangd/clangd/issues/527 [codecov]: https://app.codecov.io/gh/robinlinden/hastur