zlayer-sdk 0.11.19

ZLayer Plugin Development Kit for Rust
Documentation
[package]
name = "zlayer-sdk"
version = "0.11.19"
edition = "2021"
rust-version = "1.85"
description = "ZLayer Plugin Development Kit for Rust"
license = "MIT OR Apache-2.0"
repository = "https://github.com/BlackLeafDigital/ZLayer"
keywords = ["wasm", "wasi", "plugin", "zlayer", "wasip2"]
categories = ["wasm", "development-tools"]
readme = "README.md"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
# wit-bindgen 0.51+ has proper std/no_std feature support
wit-bindgen = { version = "0.51", default-features = false, features = ["macros", "realloc"] }

# Allocator for no_std WASM targets
# This is conditionally enabled via features, not target cfg
dlmalloc = { version = "0.2", features = ["global"], optional = true }

[dev-dependencies]
# For testing plugins locally
wasmtime = "41"

[build-dependencies]
# wit-bindgen generates bindings at compile time

[features]
default = ["wasm-alloc"]
# Enable additional debugging features
debug = []
# Enable testing utilities (MockHost, zlayer_test! macro)
# Note: testing feature enables std for allocator/panic handler in tests
testing = ["std"]
# Enable std library (for testing and non-WASM targets)
std = ["wit-bindgen/std"]
# Enable WASM allocator for no_std builds (enabled by default)
# Disable this when building with std feature
wasm-alloc = ["dep:dlmalloc"]

[package.metadata.component]
package = "zlayer:plugin"

[package.metadata.component.dependencies]
# WASI dependencies are resolved via wit/deps.toml

[lints.rust]
unsafe_code = "warn"
dead_code = "warn"

[lints.clippy]
all = "warn"
pedantic = "warn"

# Configure panic behavior for release builds (abort instead of unwind for smaller binaries)
[profile.release]
panic = "abort"

[profile.dev]
panic = "abort"

# This crate is independent of the ZLayer workspace
# (it's meant to be published and used by plugin authors)
[workspace]
exclude = ["examples/hello"]