Since i have real hardware and a flashcart (which is ideal, because emulators often inaccuracies-mask RDP quirks that real hardware catches), here is a clean, realistic roadmap to build this in Rust.
cargo-n64 / n64-pac) — Zero C dependencies, super clean #[no_std] Rust, great if you want to write the low-level hardware drivers yourself, though you'll write more boilerplate for fonts and UI rendering.Because the N64 runs best at 320×240 (or 640×480 interlaced if you want extra crisp text for a node editor—and you have an Expansion Pak), we can split the screen into two zones:
Cursor controlled by the N64 Analog Stick (with D-Pad snapping to pins for precision!) or a real N64 Mouse.
Right 35% of Screen: Live 3D Preview Viewport
Renders a spinning 3D primitive (Sphere, Torus, Cube, or Classic Teapot) using the compiled shader in real time.
A-button or C-buttons let you rotate the mesh, toggle wireframe, or switch preview shapes/lighting presets.
#[no_std])This is the heart of the project. You can build and unit-test this pure Rust module on your PC before even flashing it to the N64!
NodeId, PinId, and NodeType (Texture0, Texture1, VertexColor, PrimColor, EnvColor, Noise, Mix, Multiply, Add, Fresnel, Output).An arena or fixed-size array (heapless::Vec<Node, 32>) so you never deal with heap fragmentation in 4 MB of RDRAM.
The Graph-to-RDP Compiler:
Runs only when a wire is connected, disconnected, or a slider/color value changes (is_dirty = true).
Walks backward from the Output node.
Maps up to two math operations into RDP Cycle 1 and RDP Cycle 2 ((A - B) * C + D).
Packs the result into an rdpq_combiner_t configuration (or raw 64-bit G_SETCOMBINE command word).
If the graph exceeds what the RDP can do in 2 cycles (e.g., trying to multiply 4 different textures together), the compiler returns Err(CompileError::ExceedsTwoCycles(node_id)) and highlights that node red!