Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathetake/alvm
Run Linux ELF binary directly on macOS via hypervisor.framework
https://github.com/mathetake/alvm
Last synced: 8 days ago
JSON representation
Run Linux ELF binary directly on macOS via hypervisor.framework
- Host: GitHub
- URL: https://github.com/mathetake/alvm
- Owner: mathetake
- Created: 2024-05-18T00:50:41.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-18T00:52:58.000Z (7 months ago)
- Last Synced: 2024-12-01T10:08:31.402Z (11 days ago)
- Language: Rust
- Homepage:
- Size: 164 KB
- Stars: 41
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rainmana - mathetake/alvm - Run Linux ELF binary directly on macOS via hypervisor.framework (Rust)
README
# alvm: Apple Linux Virtual Machine
alvm allows you to run any Linux binary on MacOS machine without Linux VMs. This is just my experiment to build a low
level Linux emulator via Apple's Hypervisor.framework.It simply runs the Linux ELF binary in a hypervisor VM without kernel, and handles the syscall `svc` instruction,
which is trapped as a hardware exception, in the user land Rust code.## Example
```
$ ./tests/cases/c/hello_world.exe
zsh: exec format error: ./tests/cases/c/hello_world.exe$ file ./tests/cases/c/hello_world.exe
./tests/cases/c/hello_world.exe: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped$ ./target/release/alvm -- ./tests/cases/c/hello_world.exe
Hello, World!
```