{"id":26873592,"url":"https://github.com/hyperlight-dev/hyperlight-wasm","last_synced_at":"2026-04-01T18:54:58.533Z","repository":{"id":284734852,"uuid":"955277538","full_name":"hyperlight-dev/hyperlight-wasm","owner":"hyperlight-dev","description":"hyperlight-wasm is a rust library crate that enables Wasm Modules and components to be run inside lightweight Virtual Machine backed Sandbox. It is built on top of Hyperlight.","archived":false,"fork":false,"pushed_at":"2026-03-30T21:03:54.000Z","size":1082,"stargazers_count":701,"open_issues_count":29,"forks_count":36,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-03-30T23:14:01.188Z","etag":null,"topics":["wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperlight-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-26T11:48:48.000Z","updated_at":"2026-03-30T15:14:36.000Z","dependencies_parsed_at":"2026-01-26T07:04:25.929Z","dependency_job_id":null,"html_url":"https://github.com/hyperlight-dev/hyperlight-wasm","commit_stats":null,"previous_names":["hyperlight-dev/hyperlight-wasm"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/hyperlight-dev/hyperlight-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperlight-dev%2Fhyperlight-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperlight-dev%2Fhyperlight-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperlight-dev%2Fhyperlight-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperlight-dev%2Fhyperlight-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperlight-dev","download_url":"https://codeload.github.com/hyperlight-dev/hyperlight-wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperlight-dev%2Fhyperlight-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wasm"],"created_at":"2025-03-31T09:19:35.137Z","updated_at":"2026-04-01T18:54:58.523Z","avatar_url":"https://github.com/hyperlight-dev.png","language":"Rust","funding_links":[],"categories":["Tools","Rust"],"sub_categories":["Host Runtimes"],"readme":"# Hyperlight-Wasm - Run Wasm Modules in a Virtual Machine backed sandbox\n\n_Hyperlight-Wasm_ is a component that enables Wasm Modules to be run inside lightweight  Virtual Machine backed Sandbox. Its purpose is to enable applications to  safely run untrusted or third party Wasm code within a VM with very low latency/overhead. It is built on top of [Hyperlight](https://github.com/hyperlight-dev/hyperlight).\n\nHyperlight-Wasm currently supports running applications using either the [Windows Hypervisor Platform](https://docs.microsoft.com/en-us/virtualization/api/#windows-hypervisor-platform) on Windows, [KVM](https://www.linux-kvm.org/page/Main_Page) on Linux or [/dev/mshv](https://github.com/rust-vmm/mshv).\n\nWARNING: This is experimental code. It is not considered production-grade by its developers, neither is it \"supported\" software.\n\nThis repo contains hyperlight-wasm along with a couple of sample Wasm modules and an example host application that can be used to either test or try it out.\n\nThis document contains instructions on  building `Hyperlight-Wasm`. For usage instructions, please see [RustDev.md](./RustDev.md).\n\n## Prerequisites\n\n### Windows\n\nMake sure the following are installed:\n\n1. [Rust](https://www.rust-lang.org/tools/install)\n1. [just](https://github.com/casey/just).  is used as a command runner  `cargo install just`. Do not install `just` with Chocolately because it installs an older incompatible version, make sure to use at least version 1.5.0 if not installed through cargo.\n1. [pwsh](https://github.com/PowerShell/PowerShell)\n1. [git](https://gitforwindows.org/)\n1. [GitHub CLI](https://github.com/cli/cli#installation)\n1. [wasm-tools](https://github.com/bytecodealliance/wasm-tools?tab=readme-ov-file#installation)\n1. [cargo component](https://github.com/bytecodealliance/cargo-component?tab=readme-ov-file#installation)   \n\nEnsure that Windows Hypervisor Platform is enabled:\n\n```PowerShell\nEnable-WindowsOptionalFeature -Online -FeatureName HyperVisorPlatform\n```\n\n### Linux\n\n#### Ubuntu/KVM\n\nMake sure the following are installed:\n\n1. build-essential: `sudo apt install build-essential`\n1. [Rust](https://www.rust-lang.org/tools/install) `curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh`\n1. [just](https://github.com/casey/just).  is used as a command runner  `cargo install just`. Do not install `just` through a package manager as it may install an older incompatible version, make sure to use at least version 1.5.0 if not installed through cargo.\n1. [GitHub CLI](https://github.com/cli/cli#installation)\n1. [wasm-tools](https://github.com/bytecodealliance/wasm-tools?tab=readme-ov-file#installation)\n1. [cargo component](https://github.com/bytecodealliance/cargo-component?tab=readme-ov-file#installation)   \n\nEnsure that KVM is enabled: On an Azure VM using a size that supports nested virtualisation:\n\n`sudo apt install cpu-checker \u0026\u0026 kvm-ok`\n\nIf KVM is installed and available you should see the output\n\n``` console\nINFO: /dev/kvm exists\nKVM acceleration can be used\n```\n\nYou should also add your user to the kvm group: `sudo adduser $USER kvm`\n\n## Building\n\nNOTE: Ensure that you use version 1.89 of rust toolchain.\n\n```Console\nrustup install 1.89\nrustup default 1.89\n```\n\nNow you can build the Rust Wasm library:\n\n```Console\njust build\n```\n\nAnd the example wasm modules used by the tests:\n```Console\njust build-wasm-examples\njust build-rust-wasm-examples\n```\n\nThen you can test the Rust Wasm library and run the example:\n\n```Console\njust test\ncargo run --example helloworld\n```\n\n## Component Model support\n\nHyperlight-Wasm has experimental support for running WebAssembly\nComponent Model components, rather than core wasm modules.  In this\nmode, set the `WIT_WORLD` environment variable to point to\na binary encoding of a component type (e.g. the result of running\n`wasm-tools component wit -w -o /path/to/output.wasm\n/path/to/input.wit`), which will ensure that the resultant library\nincludes a guest binary that is specialised to load components with\nthat type. Then, use `hyperlight_component_macro::host_bindgen!()` to\ngenerate bindings from the same component type in the host.  For a\ncomplete (albeit small) example of this, see [this\nexample](https://aka.ms/hyperlight-wasm-sockets-sample).\n\n### Selecting a specific world\n\nIf your WIT file contains multiple worlds, you can select which world\nto use by setting the `WIT_WORLD_NAME` environment variable to the name\nof the desired world. If not set, the last world in the file will be used.\n\nFor example, given a WIT file with multiple worlds:\n\n```wit\npackage example:worlds;\n\nworld http-world {\n    export http-interface;\n}\n\nworld queue-world {\n    export queue-interface;\n}\n```\n\nTo generate bindings for `http-world` instead of the default `queue-world`:\n\n```\nWIT_WORLD=/path/to/output.wasm WIT_WORLD_NAME=http-world cargo build -p hyperlight-wasm\n```\n\n### Debugging the macro\n\nYou can get more detailed error messages by expanding the Macro locally:\n\n```\ncargo clean -p hyperlight-wasm\nWIT_WORLD=\u003c/path/to/output.wasm\u003e  HYPERLIGHT_COMPONENT_MACRO_DEBUG=/tmp/guest.rs cargo build -p hyperlight-wasm\nHYPERLIGHT_COMPONENT_MACRO_DEBUG=/tmp/host.rs cargo build\n```\n\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of\nConduct](https://opensource.microsoft.com/codeofconduct/).\n\nFor more information see the [Code of Conduct\nFAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact\n[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## FOSSA Status\n[![FOSSA License Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhyperlight-dev%2Fhyperlight-wasm.svg?type=shield\u0026issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhyperlight-dev%2Fhyperlight-wasm?ref=badge_shield\u0026issueType=license)\n[![FOSSA Security Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhyperlight-dev%2Fhyperlight-wasm.svg?type=shield\u0026issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhyperlight-dev%2Fhyperlight-wasm?ref=badge_shield\u0026issueType=security)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperlight-dev%2Fhyperlight-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperlight-dev%2Fhyperlight-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperlight-dev%2Fhyperlight-wasm/lists"}