Debian Codegraph @

Cargo.toml

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