-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
219 lines (188 loc) · 6.77 KB
/
Cargo.toml
File metadata and controls
219 lines (188 loc) · 6.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
[package]
name = "rvt"
version = "0.1.2"
edition = "2024"
rust-version = "1.85"
license = "Apache-2.0"
description = "Apache-2 clean-room toolkit for inspecting Autodesk Revit files (.rvt, .rfa, .rte, .rft) without a Revit installation. Opens the CFB container, decodes streams, parses the embedded schema, and classifies field encodings across 2016-2026. Full per-element extraction + geometry are active research."
authors = ["Griffin Long <151978260+DrunkOnJava@users.noreply.github.com>"]
repository = "https://github.com/DrunkOnJava/rvt-rs"
homepage = "https://github.com/DrunkOnJava/rvt-rs"
documentation = "https://docs.rs/rvt"
readme = "README.md"
keywords = ["revit", "bim", "autodesk", "ifc", "rfa"]
categories = ["parser-implementations", "compression", "command-line-utilities"]
exclude = [
".github/*",
".gitignore",
"tools/bench.sh",
"docs/outreach/*",
"docs/announcement-draft.md",
"docs/demo/*",
"docs/data/*.csv",
]
# The SPDX identifier `Apache-2.0` is set above. The full license text
# is in LICENSE at the crate root.
[workspace]
# SEC-12 + SEC-13: pyo3 bindings moved to their own member crate
# (`rvt-py/`) so this core library can `#![forbid(unsafe_code)]`
# unconditionally — no feature-gated escape hatch. The wheel on
# PyPI still ships as a single `rvt` distribution; it's built via
# `maturin build --manifest-path rvt-py/Cargo.toml`.
members = [".", "rvt-py"]
[features]
# Heap-profiling mode (Q-08). When enabled, binaries built from
# `examples/dhat_*.rs` install the `dhat` global allocator and
# emit a `dhat-heap.json` trace that `dhat-viewer` (web viewer at
# https://nnethercote.github.io/dh_view/dh_view.html) renders as
# a flamegraph of allocations by call-site.
#
# Build:
# cargo run --release --features dhat-heap --example dhat_schema -- \
# tests/fixtures/sample.rfa
#
# Then open the produced `dhat-heap.json` in dhat-viewer.
dhat-heap = ["dep:dhat"]
# Optional WASM bindings (VW1-01). Enabled when building for the
# rvt-view browser viewer. Keeps the default Rust lib dependency
# footprint lean — native builds never pull these in. The wasm
# bindings are pure-safe Rust, so no `unsafe_code` allowance is
# needed even with this feature on.
#
# Build:
# wasm-pack build --target web --features wasm --no-default-features
wasm = ["dep:wasm-bindgen", "dep:serde-wasm-bindgen"]
[dependencies]
# Microsoft Compound File Binary (OLE) container — reads the outer
# wrapper Revit uses for every on-disk file.
cfb = "0.11"
# DEFLATE / raw inflate — for the truncated-gzip streams Revit ships.
flate2 = "1.0"
# UTF-16LE decoder — robust enough to recover from Revit's malformed
# surrogate pairs (encoding_rs doesn't panic where stdlib does).
encoding_rs = "0.8"
# PartAtom XML parser.
quick-xml = { version = "0.36", features = ["serialize"] }
# Serialisation for JSON output + test fixtures.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# CLI argument parsing for every shipped binary.
clap = { version = "4", features = ["derive"] }
# Error ergonomics.
anyhow = "1"
thiserror = "1"
# Optional heap profiler (Q-08). Only pulled in when the `dhat-heap`
# feature is enabled — default builds have zero cost. Pinned to 0.3
# (current stable API).
dhat = { version = "0.3", optional = true }
# Optional WASM bindings (VW1-01). See the `wasm` feature above.
wasm-bindgen = { version = "0.2", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
[dev-dependencies]
# Statistical benchmarking harness — drives `benches/*` and
# powers the criterion-based cells in `docs/benchmarks.md` (Q-05).
# `html_reports` renders per-run HTML + SVG so CI artefacts are
# browsable. Version pinned to the 0.5 line (MSRV-compatible with
# our 1.85 floor).
criterion = { version = "0.5", features = ["html_reports"] }
# Seven shipped binaries. All depend on the `rvt` library crate.
[[bin]]
name = "rvt-analyze"
path = "src/bin/rvt_analyze.rs"
[[bin]]
name = "rvt-info"
path = "src/bin/rvt_info.rs"
[[bin]]
name = "rvt-inspect"
path = "src/bin/rvt_inspect.rs"
[[bin]]
name = "rvt-schema"
path = "src/bin/rvt_schema.rs"
[[bin]]
name = "rvt-history"
path = "src/bin/rvt_history.rs"
[[bin]]
name = "rvt-diff"
path = "src/bin/rvt_diff.rs"
[[bin]]
name = "rvt-corpus"
path = "src/bin/rvt_corpus.rs"
[[bin]]
name = "rvt-dump"
path = "src/bin/rvt_dump.rs"
[[bin]]
name = "rvt-doc"
path = "src/bin/rvt_doc.rs"
[[bin]]
name = "rvt-ifc"
path = "src/bin/rvt_ifc.rs"
[[bin]]
name = "gen-fixture"
path = "src/bin/gen_fixture.rs"
[[bin]]
name = "rvt-write"
path = "src/bin/rvt_write.rs"
[[bin]]
name = "rvt-gltf"
path = "src/bin/rvt_gltf.rs"
[[bin]]
name = "rvt-sheet"
path = "src/bin/rvt_sheet.rs"
[[bin]]
name = "rvt-elem-table"
path = "src/bin/rvt_elem_table.rs"
# Criterion benchmark suite (Q-05). Run with `cargo bench` or
# `cargo bench --bench compression`. See `docs/benchmarks.md`.
[[bench]]
name = "compression"
harness = false
[[bench]]
name = "basic_file_info"
harness = false
[[bench]]
name = "schema"
harness = false
# Q-07: multi-megabyte project-file benchmarks. Skips gracefully
# when the magnetar-io/revit-test-datasets corpus isn't present.
# Override path via `RVT_PROJECT_CORPUS_DIR`.
[[bench]]
name = "project_file"
harness = false
[lib]
name = "rvt"
path = "src/lib.rs"
# `rlib` for native consumers (tests, benches, examples, binaries);
# `cdylib` for the wasm-pack output when the `wasm` feature is
# active. The pyo3 cdylib moved to `rvt-py` in SEC-12/13, so this
# cdylib never runs through the pyo3 macro expansion — the root
# crate stays `#![forbid(unsafe_code)]` regardless of which
# crate-type is selected at link time.
crate-type = ["rlib", "cdylib"]
[profile.release]
lto = true
codegen-units = 1
strip = true
# Docs.rs build configuration — see https://docs.rs/about/metadata
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
# wasm-pack configuration. The bundled `wasm-opt` in wasm-pack 0.14
# doesn't accept rustc's bulk-memory output — it prints a wall of
# "[wasm-validator error in function N] unexpected false: Bulk
# memory operations require bulk memory" warnings, then returns a
# non-zero exit in CI that kills the whole build (locally it also
# emits the warnings but happens to write artifacts anyway).
#
# Bulk-memory is supported in every browser ≥ 2019 (Chrome 75+,
# Firefox 79+, Safari 15+, Edge 79+), so we ship the raw output
# from wasm-bindgen-cli — 728 KB uncompressed, ~180 KB gzipped — and
# skip wasm-opt entirely. If we ever want the ~15 % size win back,
# a newer binaryen (installed out-of-band) accepts
# `--enable-bulk-memory` and the stanza can change to
# `wasm-opt = ["-O", "--enable-bulk-memory"]`.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
[package.metadata.wasm-pack.profile.dev]
wasm-opt = false
[package.metadata.wasm-pack.profile.profiling]
wasm-opt = false