Hasty Briefsbeta

Show HN: Tiny VM sandbox in C with apps in Rust, C and Zig

a day ago
  • #virtual-machine
  • #RISC-V
  • #embedded
  • uvm32 is a minimalist, dependency-free virtual machine sandbox for microcontrollers.
  • Designed for resource-constrained devices, it requires under 4KB flash/1KB RAM on an STM32L0.
  • Functions as a RISC-V emulator with a management interface and tools for efficient code execution.
  • Use cases include an alternative to embedded script engines, sandboxing untrusted code, and cross-platform development.
  • Features non-blocking design, no stdio assumptions, simple execution model, and safe FFI.
  • Aims for safety over speed, ensuring VM code cannot crash the host.
  • Not intended for hardware simulation but for custom script-like logic.
  • Targets small footprint, ease of integration, and robustness against misbehaving VM code.
  • Does not focus on maximum efficiency or frictionless FFI.
  • Includes sample applications in C, Rust, Zig, and assembly.
  • Provides VM hosts like host-mini, host-parallel, and host-arduino.
  • Portable code requiring only a C compiler, with Docker support for environment setup.
  • Licensed under MIT License, suitable for research, products, and embedded devices.