diff --git a/Cargo.lock b/Cargo.lock index 4e5561d..9232549 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1908,7 +1908,7 @@ dependencies = [ [[package]] name = "hyperlight-javascript-sandbox" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "hyperlight-js", @@ -1986,7 +1986,7 @@ dependencies = [ [[package]] name = "hyperlight-sandbox" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "bitflags 2.13.0", @@ -2011,7 +2011,7 @@ dependencies = [ [[package]] name = "hyperlight-sandbox-backend-hyperlight-js" -version = "0.6.0" +version = "0.7.0" dependencies = [ "hyperlight-javascript-sandbox", "hyperlight-sandbox", @@ -2021,7 +2021,7 @@ dependencies = [ [[package]] name = "hyperlight-sandbox-backend-wasm" -version = "0.6.0" +version = "0.7.0" dependencies = [ "hyperlight-sandbox", "hyperlight-sandbox-pyo3-common", @@ -2031,7 +2031,7 @@ dependencies = [ [[package]] name = "hyperlight-sandbox-dotnet-ffi" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "hyperlight-javascript-sandbox", @@ -2046,7 +2046,7 @@ dependencies = [ [[package]] name = "hyperlight-sandbox-pyo3-common" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "hyperlight-sandbox", @@ -2120,7 +2120,7 @@ dependencies = [ [[package]] name = "hyperlight-wasm-sandbox" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 998762f..70e58a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.6.0" +version = "0.7.0" edition = "2024" rust-version = "1.94" license = "Apache-2.0" @@ -20,9 +20,9 @@ keywords = ["hyperlight", "isolation", "sandbox", "wasm"] categories = ["virtualization"] [workspace.dependencies] -hyperlight-sandbox = { version = "0.6.0", path = "src/hyperlight_sandbox" } -hyperlight-javascript-sandbox = { version = "0.6.0", path = "src/javascript_sandbox" } -hyperlight-wasm-sandbox = { version = "0.6.0", path = "src/wasm_sandbox" } +hyperlight-sandbox = { version = "0.7.0", path = "src/hyperlight_sandbox" } +hyperlight-javascript-sandbox = { version = "0.7.0", path = "src/javascript_sandbox" } +hyperlight-wasm-sandbox = { version = "0.7.0", path = "src/wasm_sandbox" } hyperlight-sandbox-pyo3-common = { path = "src/sdk/python/pyo3_common" } hyperlight-common = { version = "0.17.0", default-features = false } hyperlight-component-macro = "0.17.0" diff --git a/README.md b/README.md index 360f59b..547a5b5 100644 --- a/README.md +++ b/README.md @@ -24,43 +24,6 @@ hyperlight-sandbox provides a unified API across multiple isolation backends. Al - **Network allow listing** -- Network traffic is off by default; allow specific domains and HTTP verbs with `allow_domain()` For a more in depth walkthrough, see the overview slide deck in `docs/end-user-overview-slides.md` (or run `just slides` to view in the browser). - -### Writable filesystem limits - -Writable output is bounded by default to 5 MiB per file, 20 MiB of cumulative -logical file size, and 20 files per sandbox. Logical size includes sparse -holes, so a guest cannot bypass the limit by writing a small buffer at a very -large offset. Hosts can configure larger limits or explicitly opt out through -their SDK. - -These library limits do not measure physical blocks, metadata, compression, or -deduplication. Deployments running hostile or multi-tenant workloads should -also place output directories on isolated, quota-controlled storage and prevent -other host processes from modifying them during guest execution. - -Rust hosts can override the defaults on the builder: - -```rust -use hyperlight_sandbox::{FilesystemLimits, SandboxBuilder}; -use hyperlight_wasm_sandbox::Wasm; - -let limits = FilesystemLimits::new( - 128 * 1024 * 1024, - 512 * 1024 * 1024, - 2_048, -)?; - -let sandbox = SandboxBuilder::new() - .filesystem_limits(limits) - .module_path("guest.aot") - .temp_output() - .guest(Wasm) - .build()?; -``` - -Use `FilesystemLimits::unlimited()` only when the host provides equivalent -resource controls and intentionally accepts unbounded logical output. - ### Use Cases - **File Processing**: Process provided files and return a summarized report @@ -232,6 +195,42 @@ console.log('10 + 20 = ' + sum); See [examples](./src/javascript_sandbox/examples/) for file I/O and network demos. +### Writable filesystem limits + +Writable output is bounded by default to 5 MiB per file, 20 MiB of cumulative +logical file size, and 20 files per sandbox. Logical size includes sparse +holes, so a guest cannot bypass the limit by writing a small buffer at a very +large offset. Hosts can configure larger limits or explicitly opt out through +their SDK. + +These library limits do not measure physical blocks, metadata, compression, or +deduplication. Deployments running hostile or multi-tenant workloads should +also place output directories on isolated, quota-controlled storage and prevent +other host processes from modifying them during guest execution. + +Rust hosts can override the defaults on the builder: + +```rust +use hyperlight_sandbox::{FilesystemLimits, SandboxBuilder}; +use hyperlight_wasm_sandbox::Wasm; + +let limits = FilesystemLimits::new( + 128 * 1024 * 1024, + 512 * 1024 * 1024, + 2_048, +)?; + +let sandbox = SandboxBuilder::new() + .filesystem_limits(limits) + .module_path("guest.aot") + .temp_output() + .guest(Wasm) + .build()?; +``` + +Use `FilesystemLimits::unlimited()` only when the host provides equivalent +resource controls and intentionally accepts unbounded logical output. + ## Building Tool requirements: diff --git a/pyproject.toml b/pyproject.toml index 51723d6..84833e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hyperlight-sandbox-dev" -version = "0.6.0" +version = "0.7.0" requires-python = ">=3.10" [tool.uv] diff --git a/src/sdk/dotnet/Directory.Build.props b/src/sdk/dotnet/Directory.Build.props index 0207b07..ef6b53f 100644 --- a/src/sdk/dotnet/Directory.Build.props +++ b/src/sdk/dotnet/Directory.Build.props @@ -1,6 +1,6 @@ - 0.6.0 + 0.7.0 Hyperlight developers hyperlight-dev Copyright © Microsoft 2026 diff --git a/src/sdk/python/core/pyproject.toml b/src/sdk/python/core/pyproject.toml index db3aac4..70539d4 100644 --- a/src/sdk/python/core/pyproject.toml +++ b/src/sdk/python/core/pyproject.toml @@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta" [project] name = "hyperlight-sandbox" -version = "0.6.0" +version = "0.7.0" description = "Python API for running code in isolated Hyperlight sandboxes with swappable backends" readme = "README.md" license = "Apache-2.0" requires-python = ">=3.10" dependencies = [] -optional-dependencies = { wasm = ["hyperlight-sandbox-backend-wasm>=0.6.0"], hyperlight_js = ["hyperlight-sandbox-backend-hyperlight-js>=0.6.0"], python_guest = ["hyperlight-sandbox-python-guest>=0.6.0"], javascript_guest = ["hyperlight-sandbox-javascript-guest>=0.6.0"], dev = ["atheris>=2.3.0; python_version < '3.13'"] } +optional-dependencies = { wasm = ["hyperlight-sandbox-backend-wasm>=0.7.0"], hyperlight_js = ["hyperlight-sandbox-backend-hyperlight-js>=0.7.0"], python_guest = ["hyperlight-sandbox-python-guest>=0.7.0"], javascript_guest = ["hyperlight-sandbox-javascript-guest>=0.7.0"], dev = ["atheris>=2.3.0; python_version < '3.13'"] } classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", diff --git a/src/sdk/python/hyperlight_js_backend/pyproject.toml b/src/sdk/python/hyperlight_js_backend/pyproject.toml index c0917f2..6e0dfbd 100644 --- a/src/sdk/python/hyperlight_js_backend/pyproject.toml +++ b/src/sdk/python/hyperlight_js_backend/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "hyperlight-sandbox-backend-hyperlight-js" -version = "0.6.0" +version = "0.7.0" description = "HyperlightJS backend implementation for hyperlight-sandbox" readme = "README.md" license = "Apache-2.0" diff --git a/src/sdk/python/wasm_backend/pyproject.toml b/src/sdk/python/wasm_backend/pyproject.toml index dba16f8..12a300f 100644 --- a/src/sdk/python/wasm_backend/pyproject.toml +++ b/src/sdk/python/wasm_backend/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "hyperlight-sandbox-backend-wasm" -version = "0.6.0" +version = "0.7.0" description = "Wasm backend implementation for hyperlight-sandbox" readme = "README.md" license = "Apache-2.0" diff --git a/src/sdk/python/wasm_guests/javascript_guest/pyproject.toml b/src/sdk/python/wasm_guests/javascript_guest/pyproject.toml index 44b6d9f..63c8557 100644 --- a/src/sdk/python/wasm_guests/javascript_guest/pyproject.toml +++ b/src/sdk/python/wasm_guests/javascript_guest/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "hyperlight-sandbox-javascript-guest" -version = "0.6.0" +version = "0.7.0" description = "Packaged Hyperlight Wasm JavaScript guest exposed as javascript_guest.path" readme = "README.md" license = "Apache-2.0" diff --git a/src/sdk/python/wasm_guests/python_guest/pyproject.toml b/src/sdk/python/wasm_guests/python_guest/pyproject.toml index 8157198..bbbef02 100644 --- a/src/sdk/python/wasm_guests/python_guest/pyproject.toml +++ b/src/sdk/python/wasm_guests/python_guest/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "hyperlight-sandbox-python-guest" -version = "0.6.0" +version = "0.7.0" description = "Packaged Hyperlight Wasm Python guest exposed as python_guest.path" readme = "README.md" license = "Apache-2.0" diff --git a/src/wasm_sandbox/guests/javascript/package-lock.json b/src/wasm_sandbox/guests/javascript/package-lock.json index 8ade87d..d5d12fe 100644 --- a/src/wasm_sandbox/guests/javascript/package-lock.json +++ b/src/wasm_sandbox/guests/javascript/package-lock.json @@ -1,12 +1,12 @@ { "name": "hyperlight-sandbox-js-guest", - "version": "0.6.0", + "version": "0.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hyperlight-sandbox-js-guest", - "version": "0.6.0", + "version": "0.7.0", "devDependencies": { "@bytecodealliance/componentize-js": "^0.22.0", "@bytecodealliance/jco": "^1.32.1" diff --git a/src/wasm_sandbox/guests/javascript/package.json b/src/wasm_sandbox/guests/javascript/package.json index eed3637..9bd5ba8 100644 --- a/src/wasm_sandbox/guests/javascript/package.json +++ b/src/wasm_sandbox/guests/javascript/package.json @@ -1,6 +1,6 @@ { "name": "hyperlight-sandbox-js-guest", - "version": "0.6.0", + "version": "0.7.0", "private": true, "type": "module", "scripts": { diff --git a/uv.lock b/uv.lock index b92b394..ca8b37c 100644 --- a/uv.lock +++ b/uv.lock @@ -533,7 +533,7 @@ wheels = [ [[package]] name = "hyperlight-sandbox" -version = "0.6.0" +version = "0.7.0" source = { editable = "src/sdk/python/core" } [package.optional-dependencies] @@ -565,17 +565,17 @@ provides-extras = ["wasm", "hyperlight-js", "python-guest", "javascript-guest", [[package]] name = "hyperlight-sandbox-backend-hyperlight-js" -version = "0.6.0" +version = "0.7.0" source = { editable = "src/sdk/python/hyperlight_js_backend" } [[package]] name = "hyperlight-sandbox-backend-wasm" -version = "0.6.0" +version = "0.7.0" source = { editable = "src/sdk/python/wasm_backend" } [[package]] name = "hyperlight-sandbox-dev" -version = "0.6.0" +version = "0.7.0" source = { virtual = "." } [package.dev-dependencies] @@ -639,12 +639,12 @@ dev = [ [[package]] name = "hyperlight-sandbox-javascript-guest" -version = "0.6.0" +version = "0.7.0" source = { editable = "src/sdk/python/wasm_guests/javascript_guest" } [[package]] name = "hyperlight-sandbox-python-guest" -version = "0.6.0" +version = "0.7.0" source = { editable = "src/sdk/python/wasm_guests/python_guest" } [[package]]