Debian Codegraph @

Cargo.toml

raw ◀ ▶
Source reconstructed at patch state 11 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.7.3, <= 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 thiserror = "2.0.12"
139
140 wasm-compose = { version = "0.239.0", path = "crates/wasm-compose" }
141 wasm-encoder = { version = "0.239.0", path = "crates/wasm-encoder", default-features = false }
142 wasm-metadata = { version = "0.239.0", path = "crates/wasm-metadata", default-features = false }
143 wasm-mutate = { version = "0.239.0", path = "crates/wasm-mutate" }
144 wasm-shrink = { version = "0.239.0", path = "crates/wasm-shrink" }
145 wasm-smith = { version = "0.239.0", path = "crates/wasm-smith" }
146 wasmparser = { version = "0.239.0", path = "crates/wasmparser", default-features = false, features = ['simd'] }
147 wasmprinter = { version = "0.239.0", path = "crates/wasmprinter", default-features = false }
148 wast = { version = "239.0.0", path = "crates/wast", default-features = false }
149 wat = { version = "1.239.0", path = "crates/wat", default-features = false }
150 wit-component = { version = "0.239.0", path = "crates/wit-component" }
151 wit-encoder = { version = "0.239.0", path = "crates/wit-encoder" }
152 wit-parser = { version = "0.239.0", path = "crates/wit-parser" }
153 wit-smith = { version = "0.239.0", path = "crates/wit-smith" }
154 json-from-wast = { version = "0.239.0", path = "crates/json-from-wast" }
155
156 [dependencies]
157 anyhow = { workspace = true }
158 clap = { workspace = true, features = ['wrap_help'] }
159 clap_complete = { workspace = true, optional = true }
160 comfy-table = { workspace = true }
161 env_logger = { workspace = true }
162 log = { workspace = true }
163 tempfile = "3.2.0"
164 termcolor = { workspace = true }
165 wasmparser = { workspace = true, features = ['std', 'component-model', 'simd'] }
166 wat = { workspace = true, features = ['dwarf', 'component-model'] }
167
168 # Dependencies of `validate`
169 bitflags = { workspace = true, optional = true }
170 rayon = { workspace = true, optional = true }
171
172 # Dependencies of `print`
173 wasmprinter = { workspace = true, features = ['component-model', 'validate'] }
174
175 # Dependencies of `smith`
176 arbitrary = { workspace = true, optional = true }
177 serde = { workspace = true, optional = true }
178 serde_derive = { workspace = true, optional = true }
179 serde_json = { workspace = true, optional = true }
180 wasm-smith = { workspace = true, features = ["_internal_cli", "wasmparser"], optional = true }
181
182 # Dependencies of `shrink`
183 wasm-shrink = { workspace = true, features = ["clap"], optional = true }
184
185 # Dependencies of `mutate`
186 wasm-mutate = { workspace = true, features = ["clap"], optional = true }
187
188 # Dependencies of `strip`
189 regex = { version = "1.6.0", optional = true }
190 wasm-encoder = { workspace = true, features = ["std"], optional = true }
191
192 # Dependencies of `compose`
193 wasm-compose = { workspace = true, optional = true }
194
195 # Dependencies of `demangle`
196 cpp_demangle = { version = "0.5.1", optional = true }
197 rustc-demangle = { version = "0.1.21", optional = true }
198
199 # Dependencies of `component`
200 wast = { workspace = true, optional = true, features = ['wasm-module', 'component-model'] }
201 wit-component = { workspace = true, optional = true, features = ['dummy-module', 'wat', 'semver-check'] }
202 wit-encoder = { workspace = true, optional = true }
203 wit-parser = { workspace = true, optional = true, features = ['decoding', 'wat', 'serde'] }
204
205 # Dependencies of `metadata`
206 wasm-metadata = { workspace = true, features = ["clap", "default"], optional = true }
207 bytesize = { workspace = true }
208
209 # Dependencies of `wit-smith`
210 wit-smith = { workspace = true, features = ["clap"], optional = true }
211
212 # Dependencies of `addr2line`
213 addr2line = { version = ">= 0.24.0, <= 0.25", optional = true }
214 gimli = { workspace = true, optional = true }
215
216 # Dependencies of `wast`
217 pretty_assertions = { workspace = true, optional = true }
218
219 # Dependencies of `json-from-wast`
220 json-from-wast = { workspace = true, optional = true }
221
222 [target.'cfg(not(target_family = "wasm"))'.dependencies]
223 is_executable = { version = "1.0.1", optional = true }
224
225 [dev-dependencies]
226 indexmap = { workspace = true }
227 libtest-mimic = { workspace = true }
228 pretty_assertions = { workspace = true }
229 serde_json = "1.0"
230 tempfile = "3.1"
231 wast = { workspace = true }
232 arbitrary = { workspace = true }
233 wasm-smith = { workspace = true }
234
235 [[test]]
236 name = "cli"
237 harness = false
238 required-features = ["broken"]
239
240 [features]
241 # By default, all subcommands are built
242 default = [
243 'shrink',
244 'smith',
245 'mutate',
246 'validate',
247 'print',
248 'parse',
249 'dump',
250 'objdump',
251 'strip',
252 'compose',
253 'demangle',
254 'component',
255 'metadata',
256 'wit-smith',
257 'addr2line',
258 'completion',
259 'json-from-wast',
260 'wast',
261 ]
262
263 # Each subcommand is gated behind a feature and lists the dependencies it needs
264 validate = [
265 'rayon',
266 'dep:addr2line',
267 'dep:gimli',
268 'dep:bitflags',
269 'wasmparser/validate',
270 'wasmparser/features',
271 ]
272 print = []
273 parse = []
274 smith = ['wasm-smith', 'arbitrary', 'dep:serde', 'dep:serde_derive', 'dep:serde_json']
275 shrink = ['wasm-shrink', 'is_executable']
276 mutate = ['wasm-mutate']
277 dump = []
278 objdump = []
279 strip = ['wasm-encoder', 'regex']
280 compose = ['wasm-compose']
281 demangle = ['rustc-demangle', 'cpp_demangle', 'wasm-encoder']
282 component = [
283 'wit-component',
284 'wit-encoder',
285 'wit-parser',
286 'dep:wast',
287 'wasm-encoder',
288 'dep:serde_json',
289 ]
290 metadata = ['wasm-metadata', 'dep:serde_json']
291 wit-smith = ['dep:wit-smith', 'arbitrary']
292 addr2line = ['dep:addr2line', 'dep:gimli']
293 completion = ['dep:clap_complete']
294 json-from-wast = ['dep:json-from-wast', 'dep:wast', 'dep:serde_json']
295 wast = [
296 'dep:wast',
297 'wast/component-model',
298 'wasm-encoder/wasmparser',
299 'dep:pretty_assertions',
300 'validate',
301 # These subcommands are executed from `wasm-tools wast` so make sure they're
302 # built-in if this is enabled.
303 'dump',
304 'json-from-wast',
305 ]