This commit is contained in:
2026-05-20 13:12:39 -06:00
parent bb36a1b63d
commit 541add786d
4 changed files with 15 additions and 6 deletions

View File

@@ -45,6 +45,7 @@
clang-tools # clangd clang-tools # clangd
gdb gdb
gdbgui gdbgui
rust-analyzer
]; ];
}; };
}; };

View File

@@ -1 +0,0 @@
use flake

View File

@@ -1,7 +1,14 @@
use std::{io::{stdout, Write}}; use std::{io::{stdout, Write}};
const scm_tc3_cons: u64 = 0;
const scm_tc2_int : u64 = 2; const scm_tc2_int : u64 = 2;
const scm_tc3_cons : u64 = 0;
const scm_tc7_weak_set : u64 = 0x55;
const scm_tc7_symbol : u64 = 0x05;
const scm_tc7_string : u64 = 0x15;
const scm_false : SCM = scm_pack (0b00100);
const scm_true : SCM = scm_pack (0b01100);
const scm_eol : SCM = scm_pack (0b10100);
type scm_bits = u64; type scm_bits = u64;
@@ -12,7 +19,7 @@ struct SCM {
n : scm_bits n : scm_bits
} }
fn scm_pack (bits : scm_bits) -> SCM { const fn scm_pack (bits : scm_bits) -> SCM {
SCM {n: bits} SCM {n: bits}
} }
@@ -88,9 +95,9 @@ pub extern "C" fn scm_write (x: SCM) -> SCM {
} }
#[unsafe(no_mangle)] #[unsafe(no_mangle)]
pub extern "C" fn scm_from_utf8_string (s: scm_bits, len: scm_bits) -> scm_bits { pub extern "C" fn scm_from_utf8 (s: &str) -> SCM {
println! ("scm_from_utf8_string"); println! ("scm_from_utf8_string");
return 0; return scm_pack (0);
} }
pub fn add (left: u64, right: u64) -> u64 { pub fn add (left: u64, right: u64) -> u64 {

2
runtime/src/weak-set.rs Normal file
View File

@@ -0,0 +1,2 @@
use std::collections;