Skip to content

Development

Sebastien DUMETZ edited this page Oct 20, 2026 · 4 revisions

Development

cargo fmt --check
RUSTFLAGS='-D warnings' cargo build --locked
cargo test --locked
cargo clippy --all-targets -- -D warnings

Tests cover coordinate precision, scientific notation, negative indices, UV seams, material parameters, mesh ranges, VRML defaults, concave polygons, one primitive per material under shuffled and interleaved face orders, 16/32-bit index selection, output cleanup, inspect reports matching across OBJ and imported glTF, and texel coverage against a brute-force overlap test. The glTF writer uses Serde for metadata and a small binary writer, with no mesh-owning library or C/C++ dependency. CI builds and tests on Linux, macOS and Windows.

Optional format validation with Khronos's validator, for models that fit in memory (it loads the whole .bin):

npm install --prefix /tmp/objtools-validator gltf-validator
NODE_PATH=/tmp/objtools-validator/node_modules node tools/validate_gltf.cjs terrain.gltf

For a real import with Linux process-memory monitoring:

python3 tools/monitor_import.py input.obj destination/model.gltf --center --progress --tmp-dir destination

The monitor writes import logs, one-second RSS samples and a peak-memory report beside the model. RSS includes the mapped spools (evictable page cache); the anonymous figure is the importer's own heap.

Documentation

The README covers installation, common commands and practical caveats. Detailed documentation lives in docs/wiki/ in the main repository and is published to the GitHub wiki. Run the commands below from a checkout of the main repository.

To publish updated pages, clone the wiki into a separate directory, copy the Markdown sources into it, review the diff, then commit and push:

git clone git@github.com:sdumetz/objtools.wiki.git ../objtools.wiki
cp docs/wiki/*.md ../objtools.wiki/
git -C ../objtools.wiki diff
git -C ../objtools.wiki add -- '*.md'
git -C ../objtools.wiki commit -m "Update documentation"
git -C ../objtools.wiki push

Documentation home

Clone this wiki locally