[package]
edition = "2024"
rust-version = "1.89"
name = "hyperlight-js"
version = "0.2.0"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
hyperlight-js is a rust library crate that enables JavaScript code to be run inside lightweight Virtual Machine backed Sandbox.
It is built on top of Hyperlight.
"""
readme = "README.md"
license = "Apache-2.0"
repository = "https://github.com/hyperlight-dev/hyperlight-js"
resolver = "2"
[package.metadata.cargo-machete]
ignored = ["hyperlight-js-runtime"]
[features]
crashdump = ["hyperlight-host/crashdump"]
default = [
"function_call_metrics",
"kvm",
"mshv3",
]
function_call_metrics = []
gdb = ["hyperlight-host/gdb"]
guest-call-stats = []
kvm = ["hyperlight-host/kvm"]
monitor-cpu-time = [
"dep:libc",
"dep:windows-sys",
]
monitor-wall-clock = []
mshv3 = ["hyperlight-host/mshv3"]
print_debug = ["hyperlight-host/print_debug"]
trace_guest = ["hyperlight-host/trace_guest"]
[lib]
name = "hyperlight_js"
path = "src/lib.rs"
[[example]]
name = "execution_stats"
path = "examples/execution_stats/main.rs"
test = false
required-features = ["guest-call-stats"]
[[example]]
name = "interrupt"
path = "examples/interrupt/main.rs"
test = false
[[example]]
name = "metrics"
path = "examples/metrics/main.rs"
test = false
[[example]]
name = "run_handler"
path = "examples/run_handler/main.rs"
test = false
[[example]]
name = "runtime_debugging"
path = "examples/runtime_debugging/main.rs"
test = false
[[example]]
name = "tracing"
path = "examples/tracing/main.rs"
test = false
[[example]]
name = "tracing-otlp"
path = "examples/tracing-otlp/main.rs"
test = false
[[test]]
name = "builtin_crypto"
path = "tests/builtin_crypto.rs"
[[test]]
name = "builtin_globals"
path = "tests/builtin_globals.rs"
[[test]]
name = "builtin_modules"
path = "tests/builtin_modules.rs"
[[test]]
name = "execution_stats"
path = "tests/execution_stats.rs"
[[test]]
name = "handlers"
path = "tests/handlers.rs"
[[test]]
name = "host_functions"
path = "tests/host_functions.rs"
[[test]]
name = "module_loader"
path = "tests/module_loader.rs"
[[test]]
name = "monitors"
path = "tests/monitors.rs"
[[test]]
name = "printing"
path = "tests/printing.rs"
[[test]]
name = "runtime"
path = "tests/runtime.rs"
[[test]]
name = "termination"
path = "tests/termination.rs"
[[bench]]
name = "benchmarks"
path = "benches/benchmarks.rs"
harness = false
[dependencies.anyhow]
version = "1.0.102"
[dependencies.fn-traits]
version = "0.2.0"
[dependencies.hyperlight-host]
version = "0.14.0"
default-features = false
[dependencies.hyperlight-js-runtime]
version = "0.2.0"
[dependencies.metrics]
version = "0.24.3"
[dependencies.oxc_resolver]
version = "11.19.1"
[dependencies.phf]
version = "0.13"
features = ["macros"]
[dependencies.serde]
version = "1.0"
[dependencies.serde_json]
version = "1.0"
[dependencies.tokio]
version = "1.51"
features = [
"rt-multi-thread",
"time",
"sync",
"macros",
]
[dependencies.tracing]
version = "0.1.44"
[dev-dependencies.chrono]
version = "0.4.44"
[dev-dependencies.clap]
version = "4.6"
features = ["derive"]
[dev-dependencies.criterion]
version = "0.8.2"
features = ["html_reports"]
[dev-dependencies.crossbeam]
version = "0.8"
features = ["std"]
[dev-dependencies.crossbeam-queue]
version = "0.3"
features = ["std"]
[dev-dependencies.crossterm]
version = "0.29.0"
[dev-dependencies.dashmap]
version = "6.1.0"
[dev-dependencies.env_logger]
version = "0.11"
[dev-dependencies.hyperlight-common]
version = "0.14.0"
default-features = false
[dev-dependencies.lazy_static]
version = "1.4.0"
[dev-dependencies.metrics-exporter-prometheus]
version = "0.18"
[dev-dependencies.metrics-util]
version = "0.20.1"
[dev-dependencies.opentelemetry]
version = "0.31.0"
[dev-dependencies.opentelemetry-otlp]
version = "0.31.1"
features = [
"http-proto",
"reqwest-blocking-client",
"grpc-tonic",
]
default-features = false
[dev-dependencies.opentelemetry-semantic-conventions]
version = "0.31"
[dev-dependencies.opentelemetry_sdk]
version = "0.31.0"
features = ["rt-tokio"]
[dev-dependencies.plotters]
version = "0.3.5"
features = ["svg_backend"]
default-features = false
[dev-dependencies.rand]
version = "0.10.0"
[dev-dependencies.serde_json]
version = "1.0"
[dev-dependencies.tempfile]
version = "3.27"
[dev-dependencies.tracing-forest]
version = "0.3.1"
features = ["full"]
[dev-dependencies.tracing-opentelemetry]
version = "0.32.1"
[dev-dependencies.tracing-subscriber]
version = "0.3.23"
features = [
"std",
"env-filter",
]
[dev-dependencies.tracing-tracy]
version = "0.11"
features = [
"timer-fallback",
"ondemand",
]
[dev-dependencies.uuid]
version = "1.23.0"
[build-dependencies.cargo-hyperlight]
version = "0.1.8"
[build-dependencies.serde]
version = "1.0"
features = ["derive"]
[build-dependencies.serde_json]
version = "1.0"
[target.'cfg(target_os = "linux")'.dependencies.libc]
version = "0.2"
optional = true
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_System_Threading",
"Win32_System_Registry",
"Win32_System_WindowsProgramming",
]
optional = true