Debian Codegraph @

Cargo.toml

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