[package]
name = "wasmtime-c-api"
version.workspace = true
authors.workspace = true
description = "C API to expose the Wasmtime runtime"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition.workspace = true
publish = false

[lib]
name = "wasmtime"
crate-type = ["staticlib", "cdylib", "rlib"]
doc = false
test = false
doctest = false

[dependencies]
env_logger = { workspace = true }
anyhow = { workspace = true }
once_cell = { workspace = true }
wasmtime = { workspace = true, features = ['cranelift'] }
wasmtime-c-api-macros = { path = "macros" }

# Optional dependency for the `wat2wasm` API
wat = { workspace = true, optional = true }

# Optional dependencies for the `wasi` feature
wasi-cap-std-sync = { workspace = true, optional = true }
wasmtime-wasi = { workspace = true, default-features = true, optional = true }
cap-std = { workspace = true, optional = true }
wasi-common = { workspace = true, optional = true }

# Optional dependencies for the `async` feature
futures = { workspace = true, optional = true }

[features]
default = ['jitdump', 'wat', 'wasi', 'cache', 'parallel-compilation', 'async']
async = ['wasmtime/async', 'futures']
jitdump = ["wasmtime/jitdump"]
cache = ["wasmtime/cache"]
parallel-compilation = ['wasmtime/parallel-compilation']
wasi = ['wasi-cap-std-sync', 'wasmtime-wasi', 'cap-std', 'wasi-common']
