Debian Codegraph @

Cargo.toml

raw ◀ ▶
Source reconstructed at patch state 3 of 12 — not the installed (fully patched) source.
12 Debian patches touch this file
1 [package]
2 name = "wasm-tools"
3 version = "1.239.0"
4 authors = ["The Wasmtime Project Developers"]
5 edition.workspace = true
6 description = "CLI tools for interoperating with WebAssembly files"
7 license.workspace = true
8 documentation = "https://github.com/bytecodealliance/wasm-tools"
9 categories = ["wasm"]
10 keywords = ["webassembly", "wasm"]
11 repository = "https://github.com/bytecodealliance/wasm-tools"
12 readme = "README.md"
13 exclude = ['tests/wabt', 'tests/testsuite', 'tests/snapshots', 'ci']
14 rust-version.workspace = true
15
16 [package.metadata.binstall]
17 pkg-url = "{repo}/releases/download/v{version}/{name}-{version}-{target-arch}-{target-family}{archive-suffix}"
18 bin-dir = "{name}-{version}-{target-arch}-{target-family}/{bin}{binary-ext}"
19 pkg-fmt = "tgz"
20 [package.metadata.binstall.overrides.x86_64-apple-darwin]
21 pkg-url = "{repo}/releases/download/v{version}/{name}-{version}-{target-arch}-macos{archive-suffix}"
22 bin-dir = "{name}-{version}-{target-arch}-macos/{bin}{binary-ext}"
23 [package.metadata.binstall.overrides.aarch64-apple-darwin]
24 pkg-url = "{repo}/releases/download/v{version}/{name}-{version}-{target-arch}-macos{archive-suffix}"
25 bin-dir = "{name}-{version}-{target-arch}-macos/{bin}{binary-ext}"
26 [package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
27 pkg-fmt = "zip"
28 [package.metadata.binstall.overrides.x86_64-pc-windows-gnu]
29 pkg-fmt = "zip"
30
31 [lints]
32 workspace = true
33
34 [workspace]
35 members = [
36 'crates/c-api',
37 'crates/fuzz-stats',
38 'crates/wasm-mutate-stats',
39 'crates/wasm-wave',
40 'fuzz',
41 'crates/wit-encoder',
42 'crates/wit-parser/fuzz',
43 'crates/wit-component/dl',
44 'playground/component',
45 ]
46
47 [workspace.lints.rust]
48 unsafe_code = "deny"
49 # Turn on some lints which are otherwise allow-by-default in rustc.
50 unused_extern_crates = 'warn'
51 unstable_features = 'warn'
52 unused_import_braces = 'warn'
53 unused-lifetimes = 'warn'
54 unused-macro-rules = 'warn'
55
56 # Lints that are part of the `rust-2024-compatibility` group. This group is a
57 # bit too noisy to enable wholesale but some selective items are ones we want to
58 # opt-in to.
59 keyword_idents_2024 = 'warn'
60 unsafe-attr-outside-unsafe = 'warn'
61 deprecated-safe-2024 = 'warn'
62 rust-2024-guarded-string-incompatible-syntax = 'warn'
63 rust-2024-prelude-collisions = 'warn'
64 rust-2024-incompatible-pat = 'warn'
65 missing-unsafe-on-extern = 'warn'
66 unsafe-op-in-unsafe-fn = 'warn'
67
68 unexpected_cfgs = { level = 'warn', check-cfg = ['cfg(fuzzing)'] }
69
70 [workspace.lints.clippy]
71 # The default set of lints in Clippy is viewed as "too noisy" right now so
72 # they're all turned off by default. Selective lints are then enabled below as
73 # necessary.
74 all = { level = 'allow', priority = -1 }
75 clone_on_copy = 'warn'
76 map_clone = 'warn'
77 unnecessary_to_owned = 'warn'
78 manual_strip = 'warn'
79 uninlined_format_args = 'warn'
80 unnecessary_mut_passed = 'warn'
81 unnecessary_fallible_conversions = 'warn'
82 unnecessary_cast = 'warn'
83 allow_attributes_without_reason = 'warn'
84
85 [workspace.package]
86 edition = '2021'
87 license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
88 version = "0.239.0"
89 # Current thinking for wasm-tools is that the minimum supported Rust version
90 # (MSRV), or this number here, is no larger than the current stable release of
91 # Rust minus 10. This is more conservative than Wasmtime's policy which is
92 # stable minus two and is due to the nature of this repository and how the
93 # crates are expected to be used in more situations and places than Wasmtime.
94 #
95 # Note that this number is not proactively updated whenever a new release of
96 # Rust comes out. Instead if you run into this, for example a PR on CI is
97 # failing due to needing a newer feature of Rust, you're welcome to update this
98 # at any time so longer that it's no greater than the current release of Rust
99 # minus 10.
100 #
101 # If this window is too restrictive please leave a comment on your PR or send a
102 # message to wasm-tools maintainers to discuss. In some cases it's possible to
103 # add version detection to build scripts but in other cases this may not be
104 # reasonable to expect.
105 #
106 # NB: if this number increases to 1.81-or-later delete
107 # `crates/wasmparser/build.rs` and `crates/wasm-encoder/build.rs` scripts
108 # as they are no longer necessary.
109 rust-version = "1.76.0"
110
111 [workspace.dependencies]
112 ahash = { version = "0.8.11", default-features = false }
113 anyhow = "1.0.58"
114 arbitrary = "1.1.0"
115 bitflags = "2.5.0"
116 bytesize = "2.0.0"
117 clap = { version = "4.0.0", features = ["derive"] }
118 clap_complete = "4.4.7"
119 comfy-table = { version = "7.1.3", default-features = false }
120 criterion = { version = "0.5.1", default-features = false }
121 env_logger = "0.11"
122 gimli = "0.31.1"
123 hashbrown = { version = "0.15.2", default-features = false, features = ['default-hasher'] }
124 id-arena = "2"
125 indexmap = { version = "2.7.0", default-features = false }
126 indoc = "2.0.5"
127 leb128fmt = { version = "0.1.0", default-features = false }
128 libfuzzer-sys = "0.4.0"
129 libtest-mimic = "0.8.1"
130 log = "0.4.17"
131 num_cpus = "1.13"
132 pretty_assertions = "1.3.0"
133 rand = { version = "0.9.1", features = ["small_rng"] }
134 rayon = "1.3"
135 semver = { version = "1.0.0", default-features = false }
136 serde = { version = "1.0.166", default-features = false, features = ['alloc'] }
137 serde_derive = "1.0.166"
138 serde_json = { version = "1" }
139 smallvec = "1.11.1"
140 spdx = "0.10.1"
141 termcolor = "1.2.0"
142 url = "2.0.0"
143 wasmtime = { version = "34.0.1", default-features = false, features = ['cranelift', 'component-model', 'runtime', 'gc-drc'] }
144 thiserror = "2.0.12"
145
146 wasm-compose = { version = "0.239.0", path = "crates/wasm-compose" }
147 wasm-encoder = { version = "0.239.0", path = "crates/wasm-encoder", default-features = false }
148 wasm-metadata = { version = "0.239.0", path = "crates/wasm-metadata", default-features = false }
149 wasm-mutate = { version = "0.239.0", path = "crates/wasm-mutate" }
150 wasm-shrink = { version = "0.239.0", path = "crates/wasm-shrink" }
151 wasm-smith = { version = "0.239.0", path = "crates/wasm-smith" }
152 wasmparser = { version = "0.239.0", path = "crates/wasmparser", default-features = false, features = ['simd'] }
153 wasmprinter = { version = "0.239.0", path = "crates/wasmprinter", default-features = false }
154 wast = { version = "239.0.0", path = "crates/wast", default-features = false }
155 wat = { version = "1.239.0", path = "crates/wat", default-features = false }
156 wit-component = { version = "0.239.0", path = "crates/wit-component" }
157 wit-encoder = { version = "0.239.0", path = "crates/wit-encoder" }
158 wit-parser = { version = "0.239.0", path = "crates/wit-parser" }
159 wit-smith = { version = "0.239.0", path = "crates/wit-smith" }
160 json-from-wast = { version = "0.239.0", path = "crates/json-from-wast" }
161
162 [dependencies]
163 anyhow = { workspace = true }
164 clap = { workspace = true, features = ['wrap_help'] }
165 clap_complete = { workspace = true, optional = true }
166 comfy-table = { workspace = true }
167 env_logger = { workspace = true }
168 log = { workspace = true }
169 tempfile = "3.2.0"
170 termcolor = { workspace = true }
171 wasmparser = { workspace = true, features = ['std', 'component-model', 'simd'] }
172 wat = { workspace = true, features = ['dwarf', 'component-model'] }
173
174 # Dependencies of `validate`
175 bitflags = { workspace = true, optional = true }
176 rayon = { workspace = true, optional = true }
177
178 # Dependencies of `print`
179 wasmprinter = { workspace = true, features = ['component-model', 'validate'] }
180
181 # Dependencies of `smith`
182 arbitrary = { workspace = true, optional = true }
183 serde = { workspace = true, optional = true }
184 serde_derive = { workspace = true, optional = true }
185 serde_json = { workspace = true, optional = true }
186 wasm-smith = { workspace = true, features = ["_internal_cli", "wasmparser"], optional = true }
187
188 # Dependencies of `shrink`
189 wasm-shrink = { workspace = true, features = ["clap"], optional = true }
190
191 # Dependencies of `mutate`
192 wasm-mutate = { workspace = true, features = ["clap"], optional = true }
193
194 # Dependencies of `strip`
195 regex = { version = "1.6.0", optional = true }
196 wasm-encoder = { workspace = true, features = ["std"], optional = true }
197
198 # Dependencies of `compose`
199 wasm-compose = { workspace = true, optional = true }
200
201 # Dependencies of `demangle`
202 cpp_demangle = { version = "0.5.1", optional = true }
203 rustc-demangle = { version = "0.1.21", optional = true }
204
205 # Dependencies of `component`
206 wast = { workspace = true, optional = true, features = ['wasm-module', 'component-model'] }
207 wit-component = { workspace = true, optional = true, features = ['dummy-module', 'wat', 'semver-check'] }
208 wit-encoder = { workspace = true, optional = true }
209 wit-parser = { workspace = true, optional = true, features = ['decoding', 'wat', 'serde'] }
210
211 # Dependencies of `metadata`
212 wasm-metadata = { workspace = true, features = ["clap", "default"], optional = true }
213 bytesize = { workspace = true }
214
215 # Dependencies of `wit-smith`
216 wit-smith = { workspace = true, features = ["clap"], optional = true }
217
218 # Dependencies of `addr2line`
219 addr2line = { version = ">= 0.24.0, <= 0.25", optional = true }
220 gimli = { workspace = true, optional = true }
221
222 # Dependencies of `wast`
223 pretty_assertions = { workspace = true, optional = true }
224
225 # Dependencies of `json-from-wast`
226 json-from-wast = { workspace = true, optional = true }
227
228 [target.'cfg(not(target_family = "wasm"))'.dependencies]
229 is_executable = { version = "1.0.1", optional = true }
230
231 [dev-dependencies]
232 indexmap = { workspace = true }
233 libtest-mimic = { workspace = true }
234 pretty_assertions = { workspace = true }
235 serde_json = "1.0"
236 tempfile = "3.1"
237 wast = { workspace = true }
238 arbitrary = { workspace = true }
239 wasm-smith = { workspace = true }
240
241 [[test]]
242 name = "cli"
243 harness = false
244 required-features = ["broken"]
245
246 [features]
247 # By default, all subcommands are built
248 default = [
249 'shrink',
250 'smith',
251 'mutate',
252 'validate',
253 'print',
254 'parse',
255 'dump',
256 'objdump',
257 'strip',
258 'compose',
259 'demangle',
260 'component',
261 'metadata',
262 'wit-smith',
263 'addr2line',
264 'completion',
265 'json-from-wast',
266 'wast',
267 ]
268
269 # Each subcommand is gated behind a feature and lists the dependencies it needs
270 validate = [
271 'rayon',
272 'dep:addr2line',
273 'dep:gimli',
274 'dep:bitflags',
275 'wasmparser/validate',
276 'wasmparser/features',
277 ]
278 print = []
279 parse = []
280 smith = ['wasm-smith', 'arbitrary', 'dep:serde', 'dep:serde_derive', 'dep:serde_json']
281 shrink = ['wasm-shrink', 'is_executable']
282 mutate = ['wasm-mutate']
283 dump = []
284 objdump = []
285 strip = ['wasm-encoder', 'regex']
286 compose = ['wasm-compose']
287 demangle = ['rustc-demangle', 'cpp_demangle', 'wasm-encoder']
288 component = [
289 'wit-component',
290 'wit-encoder',
291 'wit-parser',
292 'dep:wast',
293 'wasm-encoder',
294 'dep:serde_json',
295 ]
296 metadata = ['wasm-metadata', 'dep:serde_json']
297 wit-smith = ['dep:wit-smith', 'arbitrary']
298 addr2line = ['dep:addr2line', 'dep:gimli']
299 completion = ['dep:clap_complete']
300 json-from-wast = ['dep:json-from-wast', 'dep:wast', 'dep:serde_json']
301 wast = [
302 'dep:wast',
303 'wast/component-model',
304 'wasm-encoder/wasmparser',
305 'dep:pretty_assertions',
306 'validate',
307 # These subcommands are executed from `wasm-tools wast` so make sure they're
308 # built-in if this is enabled.
309 'dump',
310 'json-from-wast',
311 ]