Grift Arena Embedded
Embedded-specific features for the Grift Scheme interpreter.
This crate provides native Rust functions for:
- Hardware register access (read/write)
- Memory peek/poke operations
- GPIO control
- Bit manipulation utilities
Design
This crate is designed to be modular and work in no_std environments.
The core Lisp interpreter (grift_eval) remains independent of hardware,
while this crate provides the bridge to embedded functionality.
Usage
use ;
use register_embedded_natives;
let lisp: = new;
let mut eval = new.unwrap;
// Register all embedded native functions
register_embedded_natives.unwrap;
// Now you can call embedded functions from Lisp:
// (peek 0) ; Read memory at address
// (poke 0 42) ; Write to memory
// (gpio-read 0) ; Read GPIO register 0
// (gpio-write 0 1) ; Write 1 to GPIO register 0
Safety
Memory access functions are inherently unsafe on real hardware. This crate provides a mock implementation for testing that uses a simulated memory space rather than real hardware registers.