| 1 |
[package] |
| 2 |
description = "A WIT encoder for Rust" |
| 3 |
documentation = "https://docs.rs/wit-encoder" |
| 4 |
edition.workspace = true |
| 5 |
license.workspace = true |
| 6 |
name = "wit-encoder" |
| 7 |
repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-encoder" |
| 8 |
version.workspace = true |
| 9 |
|
| 10 |
[lints] |
| 11 |
workspace = true |
| 12 |
|
| 13 |
[features] |
| 14 |
default = ["serde", "from-parser"] |
| 15 |
|
| 16 |
# Enables JSON serialization/deserialization of the wit-encoder structures. |
| 17 |
|
| 18 |
# *Note*: The JSON that this generates is different from the JSON generated from wit-parser. |
| 19 |
# If you're looking to create WIT from JSON, then this is the crate and feature for you. But if |
| 20 |
# you're parsing WIT and reading the output through JSON, then wit-parser is probably the better |
| 21 |
# option. |
| 22 |
|
| 23 |
# *Note*: The exact structure of the JSON is likely not going to be very stable over time, |
| 24 |
# so slight tweaks and variants should be expected as this crate evolves. |
| 25 |
serde = ["dep:serde", "semver/serde"] |
| 26 |
from-parser = ["wit-parser", "id-arena"] |
| 27 |
|
| 28 |
[dependencies] |
| 29 |
id-arena = { workspace = true, optional = true } |
| 30 |
pretty_assertions = { workspace = true } |
| 31 |
semver = { workspace = true } |
| 32 |
serde = { workspace = true, optional = true, features = ["derive"] } |
| 33 |
wit-parser = { workspace = true, optional = true } |
| 34 |
|
| 35 |
[dev-dependencies] |
| 36 |
anyhow = { workspace = true } |
| 37 |
indoc = { workspace = true } |