duc 3.4.1

The duc 2D CAD file format Rust implementation.
Documentation

duc (Rust)

The duc crate is the canonical Rust implementation of the .duc 2D CAD file format and the root of the entire Duc ecosystem. ducpy, ducjs, and the rest of the toolchain are all built on top of the types, parsers and storage layer defined here.

A .duc file is a standard gzip-compressed SQLite database file following the schema in schema/duc.sql. This crate wraps that database in a strongly-typed Rust API for reading, writing and manipulating .duc documents.


Schema and migrations

The canonical SQL lives at schema/duc.sql (plus schema/version_control.sql and schema/search.sql) and is embedded at compile time by build.rs

Migrations are ran and handled automatically upon usage of the library. Each migration is a SQL file named <from>_to_<to>.sql in schema/migrations/. build.rs scans that directory, sorts by from_version and emits a static MIGRATIONS array. Adding a new migration requires no Rust changes — drop the file in and rebuild.

Features

Feature Default Description
default Native build with bundled SQLite
opfs OPFS SAH-pool VFS for wasm32-unknown-unknown (browser persistence)

Documentation

Tools

  • Playground: Experiment with the .duc format in the browser.

Contributing

Feel free to open an issue or contact us at Ducflair Support.

License

This project is licensed under the MIT License. See the LICENSE file for more details.