Thanks for your interest. This project is small, solo-maintained, and evolving — contribution guidelines are intentionally light, but a few practices keep the repo healthy.
- Entity decoder coverage — the #1 most-wanted contribution. The container layer (container, sections, LZ77, RS-FEC, ObjectType, HandleMap, ClassMap) is shipped and tested; per-entity field-body decoders are alpha and fail on most real-world files (see README coverage table). Fixing bit-alignment on the common-entity preamble across R2004 / R2010 / R2013 / R2018, and wiring up end-to-end decode for LINE / CIRCLE / ARC / LWPOLYLINE / TEXT / MTEXT / INSERT / DIMENSION, closes the single biggest gap between "decoder functions exist" and "dwg-rs reads real drawings." Contributions against the public ODA specification are very welcome.
- Bug reports with a minimal reproducer (the smallest
.dwgthat triggers the issue). Include the DWG version byte (visible in the first 6 bytes asAC10XX). Security-sensitive reports go throughSECURITY.md, not public issues. - Performance regressions caught by the benchmark harness — open an issue with a before/after table.
- New facts about the file format. This project documents its
findings in
ARCHITECTURE.mdwith dated evidence. Please mirror any new finding there and back it with a reproducible probe underexamples/. - Documentation improvements. The README, ARCHITECTURE, and inline doc comments are fair game.
- Tests. More coverage is always welcome, especially for edge-case file layouts, R2004+ Sec_Mask handling, and R2007's compressed-section-info variants.
Open an issue (or a draft PR) before starting work on any of:
- RS-FEC (Reed-Solomon forward error correction) layer — encoder- side work is subtle; please align on the plan first.
- R2007 full-decompression path — this is the most complex container variant and benefits from design discussion.
- Any modifying-writer path. The project is currently read-only by design; write support is a major scope expansion.
- Unsafe code — the library declares
#![deny(unsafe_code)]. If you genuinely need it (e.g. for a performance-critical SIMD decoder), open an issue first.
- Rust 2024 edition.
cargo fmtbefore every commit.cargo test --releasemust pass. The CI in.github/workflows/enforces this.- No
unsafein the library crate. See above. - No panics in parsing paths. Malformed input must return an
Error, neverpanic!. Defensive caps on loop iteration and allocation are required; see existing decoders for the pattern. - No PII in tests. Use synthetic fixtures —
testuser,11111111, generic layer names — not anything drawn from real shipped files. - Every probe under
examples/gets a module-level doc comment explaining what fact it proves and how to verify the result.
Conventional Commits format:
feat(<scope>): ...for new featuresfix(<scope>): ...for bug fixesdocs(<scope>): ...for documentationtest(<scope>): ...for test-only changesrefactor(<scope>): ...for behavior-preserving internal changesperf(<scope>): ...for performancechore(<scope>): ...for infra / CI / build
Scopes that appear frequently: container, sections, lz77,
rs-fec, object-types, handle-map, class-map, entities,
readme, arch, ci.
When you discover something new about the file format:
- Write a short probe under
examples/<name>.rsthat reproduces the finding from bytes. One self-contained file. - Add a dated section to
ARCHITECTURE.mdwith an evidence table (byte offsets, observed values, variant count across versions). - If the finding is a decoding rule, also add a unit test that pins the byte pattern.
This keeps every claim independently verifiable, which is the whole point of open reverse-engineering work.
dwg-rs is Apache-2.0 licensed. By submitting a contribution, you agree that your work is licensable under Apache-2.0 and that you have the right to grant that license.
Please do not submit any code, comments, tests, or documentation that contains information derived from Autodesk- or Open-Design- Alliance-proprietary sources (NDA'd SDKs, ObjectARX internals, decompiled binaries, leaked internal documents, any part of the ODA Drawings SDK / Teigha codebase). This project operates strictly from the public ODA specification document and from on-disk byte observations of files produced by publicly available CAD software.
Questions: open an issue on GitHub, or file a security-sensitive
report via the advisory flow in SECURITY.md.