https://github.com/robinlinden/hastur
A web browser.
https://github.com/robinlinden/hastur
bazel browser browser-engine cpp
Last synced: 10 months ago
JSON representation
A web browser.
- Host: GitHub
- URL: https://github.com/robinlinden/hastur
- Owner: robinlinden
- License: bsd-2-clause
- Created: 2021-01-25T23:12:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T22:05:35.000Z (10 months ago)
- Last Synced: 2025-03-18T06:48:59.603Z (10 months ago)
- Topics: bazel, browser, browser-engine, cpp
- Language: C++
- Homepage:
- Size: 3.96 MB
- Stars: 31
- Watchers: 6
- Forks: 10
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Toy browser engine
[][codecov]
## Building
### Requirements
#### Compiler
Right now GCC 13, Clang 17, 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 --@rules_python//python/config_settings:bootstrap_impl=system_python`
### 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