back to home

hyperlight-dev / hyperlight-wasm

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.

693 stars
35 forks
29 issues
RustShellJust

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing hyperlight-dev/hyperlight-wasm in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/hyperlight-dev/hyperlight-wasm)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Hyperlight-Wasm - Run Wasm Modules in a Virtual Machine backed sandbox _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. Hyperlight-Wasm currently supports running applications using either the Windows Hypervisor Platform on Windows, KVM on Linux or /dev/mshv. WARNING: This is experimental code. It is not considered production-grade by its developers, neither is it "supported" software. This 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. This document contains instructions on building . For usage instructions, please see RustDev.md. Prerequisites Windows Make sure the following are installed: • Rust • just. is used as a command runner . Do not install with Chocolately because it installs an older incompatible version, make sure to use at least version 1.5.0 if not installed through cargo. • pwsh • git • GitHub CLI • wasm-tools • cargo component Ensure that Windows Hypervisor Platform is enabled: Linux Ubuntu/KVM Make sure the following are installed: • build-essential: • Rust • just. is used as a command runner . Do not install 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. • GitHub CLI • wasm-tools • cargo component Ensure that KVM is enabled: On an Azure VM using a size that supports nested virtualisation: If KVM is installed and available you should see the output You should also add your user to the kvm group: Building NOTE: Ensure that you use version 1.89 of rust toolchain. Now you can build the Rust Wasm library: And the example wasm modules used by the tests: Then you can test the Rust Wasm library and run the example: Component Model support Hyperlight-Wasm has experimental support for running WebAssembly Component Model components, rather than core wasm modules. In this mode, set the environment variable to point to a binary encoding of a component type (e.g. the result of running ), which will ensure that the resultant library includes a guest binary that is specialised to load components with that type. Then, use to generate bindings from the same component type in the host. For a complete (albeit small) example of this, see this example. Debugging the macro You can get more detailed error messages by expanding the Macro locally: Code of Conduct This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. FOSSA Status