Debian Codegraph @

Cargo.toml

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