Skip to main content

Tag

Rust

2 articles filed under Rust, newest first.

All topics All articles

Articles tagged Rust

Diagram of a ramdisk filesystem tree with bin, docs and README nodes backed by a file table stored in the kernel heap

Chapter 12 · Operating Systems

Build a Simple Filesystem: Turning the Heap Into a Ramdisk

Build an in-memory tree filesystem for PurgatoryOS in no_std Rust using Box<Node>, BTreeMap<String, NodeId>, and Vec<u8> on top of Post 11's allocator. Add three new syscalls (open, read, close), a per-task file descriptor table, and a working VFS layer that the shell in Post 13 can type against.

35 min Intermediate

Diagram of a C kernel calling a Rust no_std allocator crate across the extern C FFI boundary, linked into a single kernel.elf

Chapter 11 · Operating Systems

Rust no_std Kernel Allocator: Bringing Rust Into a C Kernel

Carve the C heap allocator out of PurgatoryOS and replace it with a no_std Rust implementation wired in via extern C FFI. Set up aarch64-unknown-none-softfloat, build-std core + alloc, the GlobalAlloc trait, a spin-locked free list, and a Makefile that links libpurgatory_rs.a into the existing kernel.elf, without rewriting a single line of C above the allocator.

37 min Intermediate