bamts-node 0.1.0

Node.js host environment compatibility layer for BamTS
Documentation
[package]
name = "bamts-node"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
publish.workspace = true
license.workspace = true
repository.workspace = true
description = "Node.js host environment compatibility layer for BamTS"

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

[features]
default = ["node-host"]
node-host = ["bamts-native/node-host"]
# The classic-script `CompileProvider`. Off by default: it is the only feature
# that links the compiler frontend into a host, and `node:vm` is installed only
# when a host supplies a provider.
script-compiler = ["dep:bamts-compiler", "dep:bamts-bytecode"]
aot-main = [
    "node-host",
    "dep:bamts-bytecode",
    "bamts-native/aot-image",
]

[dependencies]
bamts-bytecode = { path = "../bamts-bytecode", version = "0.1.0", optional = true }
bamts-compiler = { path = "../bamts-compiler", version = "0.1.0", optional = true }
bamts-native = { path = "../bamts-native", version = "0.1.0" }
bamts-runtime = { path = "../bamts-runtime", version = "0.1.0" }
tokio = { version = "=1.53.1", features = ["rt", "sync", "time"] }
tokio-util = { version = "=0.7.19", features = ["time"] }

[lints.rust]
# `unsafe_code` is downgraded from the workspace `forbid` to `deny` so that a
# single `#[allow(unsafe_code)]` may cover the one required item: the
# edition-2024 `#[unsafe(no_mangle)]` export marker on the AOT staticlib `main`.
# The crate has no unsafe operations; every unsafe operation lives in
# bamts-native. Crate-wide `deny` still rejects any accidental unsafe elsewhere.
unsafe_code = "deny"