runtime/README.md
TheBrokenRail bfbb477f60
Some checks failed
CI / Test (ARM64) (push) Failing after 2m58s
CI / Test (AMD64) (push) Failing after 2m48s
CI Attempt
2025-02-15 00:04:19 -05:00

25 lines
1.2 KiB
Markdown

# Reborn Runtime
This is a simple program allowing ARM32 code to easily call "native" code.
By running an ARM32 program inside this runtime, it gains the ability to call `raw_trampoline()`. This function copies its arguments and passes them to the "host" code.
The runtime also automatically uses QEMU on non-ARM systems.
## Terminology
- "Guest" code is the main ARM32 program. It is running inside the runtime.
- "Host" code is the native code located in `libtrampoline.so`. It is running "alongside" the runtime.
## Example
There is a simple C example [here](./example).
## Syscall Vs. Pipe Trampolines
The runtime supports two methods of passing data between the guest and host.
- System Call
- Data is passed through a custom system-call added to QEMU.
- Only supported on x86_64.
- Pipes
- Data is passed through standard UNIX pipes.
- Can be forced using an environmental variable.
## Licensing
The runtime itself is licensed with [GPLv2](./LICENSE) to comply with [QEMU's license](https://wiki.qemu.org/License). However, the `raw_trampoline` function and associated headers are licensed with the [Unlicense](lib/LICENSE) as they do not directly link to the runtime.