mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 05:43:58 +00:00
Complete implementation of the RVM microhypervisor: 13 Rust crates (all #![no_std], #![forbid(unsafe_code)]): - rvm-types: Foundation types (64-byte WitnessRecord, ~40 ActionKind variants) - rvm-hal: AArch64 EL2 HAL (stage-2 page tables, PL011 UART, GICv2, timer) - rvm-cap: Capability system (P1/P2 proof verification, derivation trees) - rvm-witness: Witness logging (FNV-1a hash chain, ring buffer, replay) - rvm-proof: Proof engine (3-tier, constant-time P2 evaluation) - rvm-partition: Partition model (lifecycle, split/merge, IPC, device leases) - rvm-sched: Scheduler (2-signal priority, SMP coordinator, switch hot path) - rvm-memory: Memory tiers (buddy allocator, 4-tier, RLE compression) - rvm-coherence: Coherence engine (Stoer-Wagner mincut, adaptive frequency) - rvm-boot: Bare-metal boot (7-phase measured, EL2 entry, linker script) - rvm-wasm: Agent runtime (7-state lifecycle, migration, quotas) - rvm-security: Security gate (validation, attestation, DMA budget) - rvm-kernel: Integration kernel (boot/tick/create/destroy) 602 tests, 0 failures, 0 clippy warnings. 21 criterion benchmarks (all ADR targets exceeded). 9 ADRs (132-140), 15 design constraints (DC-1 through DC-15). 11 security findings addressed. Co-Authored-By: claude-flow <ruv@ruv.net>
65 lines
1.6 KiB
Makefile
65 lines
1.6 KiB
Makefile
# RVM Build System for AArch64 QEMU virt
|
|
#
|
|
# Prerequisites:
|
|
# rustup target add aarch64-unknown-none
|
|
# cargo install cargo-binutils
|
|
# rustup component add llvm-tools
|
|
# brew install qemu (or equivalent)
|
|
#
|
|
# Usage:
|
|
# make build - Build the kernel for AArch64
|
|
# make check - Type-check without building (fast)
|
|
# make run - Build and run in QEMU
|
|
# make test - Run host tests (all crates)
|
|
# make clean - Remove build artifacts
|
|
|
|
TARGET = aarch64-unknown-none
|
|
KERNEL_CRATE = rvm-kernel
|
|
KERNEL_ELF = target/$(TARGET)/release/$(KERNEL_CRATE)
|
|
KERNEL_BIN = target/$(TARGET)/release/rvm-kernel.bin
|
|
|
|
# QEMU settings
|
|
QEMU = qemu-system-aarch64
|
|
QEMU_MACHINE = virt
|
|
QEMU_CPU = cortex-a72
|
|
QEMU_MEM = 128M
|
|
|
|
# Cargo flags
|
|
CARGO_FLAGS = --target $(TARGET) --release
|
|
LINKER_SCRIPT = rvm.ld
|
|
|
|
.PHONY: build check run test clean objdump
|
|
|
|
# Type-check the HAL crate for AArch64 (fast verification).
|
|
check:
|
|
cargo check --target $(TARGET) -p rvm-hal
|
|
|
|
# Build the full kernel binary for AArch64.
|
|
build:
|
|
RUSTFLAGS="-C link-arg=-T$(LINKER_SCRIPT)" \
|
|
cargo build $(CARGO_FLAGS) -p $(KERNEL_CRATE)
|
|
|
|
# Convert ELF to raw binary for QEMU -kernel.
|
|
bin: build
|
|
rust-objcopy --strip-all -O binary $(KERNEL_ELF) $(KERNEL_BIN)
|
|
|
|
# Run in QEMU (press Ctrl-A X to exit).
|
|
run: build
|
|
$(QEMU) \
|
|
-M $(QEMU_MACHINE) \
|
|
-cpu $(QEMU_CPU) \
|
|
-m $(QEMU_MEM) \
|
|
-nographic \
|
|
-kernel $(KERNEL_ELF)
|
|
|
|
# Run host tests for all workspace crates.
|
|
test:
|
|
cargo test --workspace
|
|
|
|
# Disassemble the kernel binary.
|
|
objdump: build
|
|
rust-objdump -d $(KERNEL_ELF) | head -200
|
|
|
|
# Remove build artifacts.
|
|
clean:
|
|
cargo clean
|