|
|
Donner
C++20 SVG rendering library
|
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 is slow since it downloads LLVM and other external dependencies (a few GB), and builds all dependencies from source, including Skia. 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:
Bazel is the primary build system, but CMake support is also available through an exerimental 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 the EnTT, googletest, rules_cc, and nlohmann_json dependencies via FetchContent and builds the libraries. Unit tests are not built by default and can be enabled by setting the DONNER_BUILD_TESTS CMake option to ON (e.g. cmake -DDONNER_BUILD_TESTS=ON ...).
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, and particularly the skia dependency is large and slow to build. The first build is slow, but incremental builds are fast due to bazel's caching.
The Editor is an early prototype and hasn't made it to the tree. The Editor is built on the same foundation as the experimental svg_viewer in the tree. Run it with an opt build for the best experience: