Skip to content

Instantly share code, notes, and snippets.

View aditya-nv-06's full-sized avatar
💭
Learning the moments

Aditya NV aditya-nv-06

💭
Learning the moments
View GitHub Profile
@elricmann
elricmann / tracing-gc.rs
Created November 21, 2024 17:17
Basic Tracing GC implementation in Rust
// Copyright (c) 2024 Elric Neumann. All rights reserved. MIT license.
#![allow(unused)]
use std::rc::Rc;
use std::cell::{Cell, RefCell};
use std::collections::{HashMap, HashSet};
pub trait GcObject {
fn trace(&self, tracer: &TracingGC);
}