arora-engine 0.1.0

The Arora engine: loads and executes Arora modules (wasm and native hosts).
[package]
name = "arora-engine"
version = "0.1.0"
authors = ["Braden McDorman <bmcdorman@gmail.com>"]
edition = "2021"
description = "The Arora engine: loads and executes Arora modules (wasm and native hosts)."
license = "MIT"

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

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["wasmtime-host", "native-host"]
# Native host using wasmtime to instantiate guest modules.
wasmtime-host = ["dep:wasmtime", "dep:wasmtime-wasi"]
# Native host using libloading to load .so/.dylib modules.
native-host = ["dep:libloading", "dep:tempfile"]

[dependencies]
anyhow = "1"
arora-buffers = { path = "../arora-buffers", version = "0.1" }
arora-types = { path = "../arora-types", version = "1.4" }
async-trait = "0.1"
bytes = "1"
derive_more = { version = "2", features = ["display", "error", "from"] }
lazy_static = "1"
rand = "0.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
uuid = { version = "1", features = ["serde", "v4"] }

# Native-only optional deps. Disabled when targeting wasm32 (browser host).
libloading = { version = "0.9", optional = true }
tempfile = { version = "3", optional = true }
wasmtime = { version = "45", features = ["async"], optional = true }
wasmtime-wasi = { version = "45", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
wasm-bindgen-futures = "0.4"
serde-wasm-bindgen = "0.6"
console_error_panic_hook = "0.1"
web-sys = { version = "0.3", features = ["console"] }
# Browser RNG backend for `rand`. `wasm_js` (plus the getrandom_backend cfg in
# .cargo/config.toml) lets getrandom build for wasm32-unknown-unknown.
getrandom = { version = "0.4", features = ["wasm_js"] }

[build-dependencies]
cbindgen = "0.29"

[dev-dependencies]
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.8"
uuid = { version = "1", features = ["serde", "v4"] }

# Browser-host integration test (tests/browser.rs), wasm32-only. serde_yaml +
# uuid above supply the header/value types; these add the test harness, the
# panic hook, and the guest module the test loads through the browser executor.
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
arora-types = { path = "../arora-types", version = "1.4" }
wasm-bindgen-test = "0.3"
console_error_panic_hook = "0.1"
# test-rust-wasm guest (wasm32-wasip1) that the browser test include_bytes!s;
# cargo exposes its path as CARGO_CDYLIB_FILE_TEST_RUST_WASM_test_rust_wasm.
test-rust-wasm = { path = "../../modules/test-rust-wasm", artifact = "cdylib", target = "wasm32-wasip1" }