[package] description = "A WIT encoder for Rust" documentation = "https://docs.rs/wit-encoder" edition.workspace = true license.workspace = true name = "wit-encoder" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-encoder" version.workspace = true [lints] workspace = true [features] default = ["serde", "from-parser"] # Enables JSON serialization/deserialization of the wit-encoder structures. # *Note*: The JSON that this generates is different from the JSON generated from wit-parser. # If you're looking to create WIT from JSON, then this is the crate and feature for you. But if # you're parsing WIT and reading the output through JSON, then wit-parser is probably the better # option. # *Note*: The exact structure of the JSON is likely not going to be very stable over time, # so slight tweaks and variants should be expected as this crate evolves. serde = ["dep:serde", "semver/serde"] from-parser = ["wit-parser", "id-arena"] [dependencies] id-arena = { workspace = true, optional = true } pretty_assertions = { workspace = true } semver = { workspace = true } serde = { workspace = true, optional = true, features = ["derive"] } wit-parser = { workspace = true, optional = true } [dev-dependencies] anyhow = { workspace = true } indoc = { workspace = true }