|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Donner is intended as a hobby project with the latest C++ spec, so it is likely that toolchains that support it won't be pre-installed.
CMake builds on Linux: pkg-config and development libraries for Fontconfig and Freetype. For Debian/Ubuntu:
The recommended way to use Bazel is to install Bazelisk, which will automatically download Bazel as required. To install:
Verify that you can build with
All other dependencies will be downloaded on-demand.
The first build downloads LLVM and other external dependencies, and builds all dependencies from source. With the default tiny-skia backend, clean build times are reasonable. After dependencies are downloaded, clean build times are:
To run the tests, run:
To include experimental code as well, run:
See the latest Build report.
To generate a build report locally:
To regenerate the checked-in build report at docs/build_report.md:
When saving to docs/build_report.md the script automatically switches to --link-mode=docs. In that mode:
To build the Doxygen site with the bundled reports:
tools/build_docs.sh runs doxygen Doxyfile, copies docs/reports/binary-size/ into the generated HTML output, and extracts docs/reports/coverage.zip into reports/coverage/ so the deployed docs site has both reports live.
To collect coverage without generating the local HTML report:
Bazel is the primary build system, but CMake support is also available through a Bazel-to-CMake converter. This is for users who want to integrate Donner into their CMake-based projects.
To run tests, they must be enabled during the CMake configuration step:
This fetches dependencies via FetchContent and builds the libraries. Unit tests are not built by default and can be enabled with the DONNER_BUILD_TESTS option.
| Option | Default | Description |
|---|---|---|
| DONNER_RENDERER_BACKEND | "tiny_skia" | Renderer backend selection; the supported default is "tiny_skia" |
| DONNER_TEXT | ON | Enable text rendering (<text>, <tspan>) |
| DONNER_TEXT_WOFF2 | ON | Enable WOFF2 web font loading |
| DONNER_FILTERS | ON | Enable SVG filter effects |
| DONNER_BUILD_TESTS | OFF | Build unit tests (adds googletest dependency) |
| Config / Flag | Description |
|---|---|
| --config=geode | Use the experimental Geode GPU backend (WebGPU/Dawn + Slug); also enables --//donner/svg/renderer/geode:enable_geode=true |
| --config=text-full | Enable HarfBuzz text shaping + WOFF2 (advanced text layout) |
| --config=asan-fuzzer | Build fuzzers with AddressSanitizer |
| --config=latest_llvm | Use the latest LLVM toolchain (required for coverage) |
That indicates that xcode is not installed, the bad error message is a known bazel issue: https://github.com/bazelbuild/bazel/issues/23111
Validate that xcode is installed with:
If it is not installed, install it from the App Store. Once this is complete clean bazel state and retry:
Donner builds everything from source. The tiny-skia backend stays relatively fast because it has no large external rendering dependency. Incremental builds are fast due to Bazel's caching.
The full native editor lives at //donner/editor:editor:
--experimental enables editor-only experimental behavior such as the in-progress composited drag path. Without the flag, the editor uses the default non-experimental interaction path.
The browser build lives at //donner/editor/wasm and is toolchain-gated behind --config=editor-wasm:
Use -- --https for LAN access with the generated local certificate. Then open the served index.html in a browser. See docs/design_docs/0020-editor.md for the editor design and milestone plan.