Overview
cadkit is an open-source CAD engine written in pure Rust. It reads DWG, DGN (V7 and V8), DXF and CityGML 2.0 into one format-neutral document and writes DXF, seed-based DGN V8, CityGML 2.0, SVG and JSON. It uses no vendor SDK, and reading a drawing needs no GPU.
File I/O and document operations ship as a Rust crate, a command-line tool, a Python package,
a JavaScript (WebAssembly) package and a C/C++ API. Standalone analytic geometry
(cadkit-geom), GPU-free scene data (cadkit-scene) and wgpu rendering (cadkit-gpu)
are separate Rust crates; the other interfaces do not expose them.
Start with your language
Section titled “Start with your language”| Interface | Package | Start here |
|---|---|---|
| Rust | cadkit on crates.io |
Getting started: Rust |
| Python 3.9+ | pycadkit on PyPI, imported as cadkit |
Getting started: Python |
| JavaScript, browser and Node | cadkit-wasm on npm |
Getting started: JavaScript |
| C and C++ | cadkit-capi-<target> archives on GitHub Releases |
Getting started: C and C++ |
| Shell | cadkit binary (cadkit-cli) |
Command line |
The demo runs the JavaScript package in your browser; files you open there stay on your machine.
What each format supports
Section titled “What each format supports”| Format | Read | Write |
|---|---|---|
| DWG | AC1014 (R14) to AC1032 (2018); R13 untested | no writer |
| DGN V7 | yes, including tags | no writer |
| DGN V8 | yes | seed-based subset; external application acceptance pending |
| DXF | ASCII and binary, R12 to 2018 | ASCII, R12 to 2018 |
| CityGML 2.0 | native model and geometry | native model and generic geometry; new geometry needs an explicit CRS |
Readers degrade instead of failing: records a reader cannot model become unknown entities,
and recoverable problems become warnings on the document. Local test evidence and what is
still open are recorded in Interchange status.
Guides
Section titled “Guides”- Convert DXF to SVG, the same task in every interface.
- Inspect a drawing and its layers: header-only inspection, layers, entity counts and warnings.
- Write DGN V8 from a seed: stripping a seed, preparing a document and the writer’s limits.
- CityGML 2.0 and the TKGM preflight: explicit CRS, validation and a local structural preflight.
- Build a browser viewer with cadkit-wasm in a Web Worker.
- Handling untrusted files: resource limits, error kinds and process isolation.
- Geometry with cadkit-geom and scene and GPU rendering in Rust.
Reference
Section titled “Reference”- Rust API: docs.rs/cadkit, docs.rs/cadkit-core, docs.rs/cadkit-geom, docs.rs/cadkit-scene, docs.rs/cadkit-gpu
- Python API, JavaScript API, C and C++ API
- Document JSON schema, the shape every interface exports
- Architecture and host integration
- Format notes: DWG, DGN, DXF, CityGML
The reference pages are the repository’s own documents, published unchanged apart from links; each has an edit link to its source.
Versions
Section titled “Versions”cadkit is 0.x: a minor release (for example 0.4 to 0.5) may change the API. From 0.5 on, patch
releases within a minor series only add: model and option types are #[non_exhaustive] and
built through constructors. Every change is listed in the changelog. The
minimum supported Rust version is 1.88.