Development and publishing

Build the project, run tests and benchmarks, and preview the documentation.

Build and test

Native tests and tracing

cmake -S . -B build -DIPV6_PARSE_LIBRARY_ONLY=OFF
cmake --build build --config Release
ctest --test-dir build --build-config Release --output-on-failure

This enables the unit tests, extended tests, fuzz driver, and command-line tool. Add -DPARSE_TRACE=1 to the configure command to trace parsing.

CI builds with GCC, Clang, MSVC, and AppleClang, runs the Node.js and Conan tests, collects coverage, and checks memory use with Valgrind. See the CI guide and coverage instructions.

WebAssembly build and tests

Install and activate the Emscripten SDK, then run:

./build_wasm.sh
npm ci
npm test

Use the Node.js and npm versions specified in package.json. The build script regenerates docs/ipv6-parse.js.

Benchmarks

Measure on your target hardware and build configuration:

./build/bin/ipv6-fuzz 100000
npm run bench

The native driver exercises parsing, formatting, and comparison. The JavaScript benchmark measures WebAssembly parsing across address types. Historical results and methodology are in the WebAssembly performance notes.

Documentation preview and publishing

python3 -m http.server --directory docs 8000

Open http://localhost:8000/guide.html for the IPv6 introduction or http://localhost:8000/ for the demo. These are static HTML pages and require no documentation build step.

The Pages workflow builds the site on pull requests and deploys from main when the documentation or parser sources change. The repository's Pages source must be set to GitHub Actions. Release tags do not deploy the site.