Async Rust Powers a New Scheme Compiler: Introducing scheme-rs

2025-02-18

Matthew Plant introduces scheme-rs, his Scheme implementation leveraging the power of async Rust to address its slow compile times and challenging debugging experience. scheme-rs uses the R6RS standard and offers seamless interoperability with async Rust, facilitating code gluing and debugging. The author also envisions a future language, Gouki, built upon scheme-rs, combining Scheme's macro system with Rust's type system for a more powerful programming experience. While still a work in progress, scheme-rs boasts core functionality and the author plans to add built-ins and optimize compilation performance.

Read more
Development

Concurrent Cycle Collection: Garbage-Collected Smart Pointers in Rust for Scheme

2024-12-13

This article details the implementation of a concurrent cycle collector in Rust for garbage-collected smart pointers (Gc) within a Scheme interpreter. Gc functions similarly to Arc>, supporting interior mutability, cloning, and sending across threads. The article thoroughly explains the implementation of Gc, including thread-safe interior mutability using semaphores and read/write locks, and the implementation details of concurrent cycle collection based on the Bacon and Rajan algorithm. This includes the Trace trait, cycle detection, and mechanisms for handling concurrent modifications.

Read more