| 1 |
[package] |
| 2 |
name = "wit-parser" |
| 3 |
authors = ["Alex Crichton <[email protected]>"] |
| 4 |
version.workspace = true |
| 5 |
edition.workspace = true |
| 6 |
license.workspace = true |
| 7 |
readme = "README.md" |
| 8 |
repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-parser" |
| 9 |
homepage = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-parser" |
| 10 |
documentation = "https://docs.rs/wit-parser" |
| 11 |
description = """ |
| 12 |
Tooling for parsing `*.wit` files and working with their contents. |
| 13 |
""" |
| 14 |
rust-version.workspace = true |
| 15 |
|
| 16 |
[lints] |
| 17 |
workspace = true |
| 18 |
|
| 19 |
[dependencies] |
| 20 |
anyhow = { workspace = true } |
| 21 |
id-arena = { workspace = true } |
| 22 |
indexmap = { workspace = true, features = ['std'] } |
| 23 |
log = { workspace = true } |
| 24 |
semver = { workspace = true } |
| 25 |
serde = { workspace = true, optional = true } |
| 26 |
serde_derive = { workspace = true, optional = true } |
| 27 |
serde_json = { workspace = true, optional = true } |
| 28 |
unicode-xid = "0.2.2" |
| 29 |
wasmparser = { workspace = true, optional = true, features = ['std', 'validate', 'component-model', 'features'] } |
| 30 |
wat = { workspace = true, optional = true, features = ['component-model'] } |
| 31 |
|
| 32 |
[features] |
| 33 |
default = ['serde', 'decoding'] |
| 34 |
|
| 35 |
# Enables support for `derive(Serialize, Deserialize)` on many structures, such |
| 36 |
# as `Resolve`, which can assist when encoding `Resolve` as JSON for example. |
| 37 |
serde = ['dep:serde', 'dep:serde_derive', 'indexmap/serde', 'serde_json'] |
| 38 |
|
| 39 |
# Enables support for decoding WIT from WebAssembly. This can be done to support |
| 40 |
# decoding a WIT package encoded as wasm automatically. |
| 41 |
decoding = ['dep:wasmparser'] |
| 42 |
|
| 43 |
# Enables support for parsing the wasm text format in conjunction with the |
| 44 |
# `decoding` feature. |
| 45 |
wat = ['decoding', 'dep:wat'] |
| 46 |
|
| 47 |
[dev-dependencies] |
| 48 |
env_logger = { workspace = true } |
| 49 |
libtest-mimic = { workspace = true } |
| 50 |
pretty_assertions = { workspace = true } |
| 51 |
serde_json = { workspace = true } |
| 52 |
wit-parser = { path = '.', features = ['serde', 'wat'] } |
| 53 |
|
| 54 |
[[test]] |
| 55 |
name = "all" |
| 56 |
harness = false |