port to no_std

This commit is contained in:
Able 2024-12-04 02:36:09 -06:00
parent 553dbd6aad
commit 671a3002a2
4 changed files with 40 additions and 3 deletions

25
Cargo.lock generated
View file

@ -2,6 +2,31 @@
# It is not intended for manual editing.
version = 4
[[package]]
name = "foldhash"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
[[package]]
name = "hashbrown"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
dependencies = [
"foldhash",
"rustc-std-workspace-alloc",
]
[[package]]
name = "rlisp"
version = "0.1.0"
dependencies = [
"hashbrown",
]
[[package]]
name = "rustc-std-workspace-alloc"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d441c3b2ebf55cebf796bfdc265d67fa09db17b7bb6bd4be75c509e1e8fec3"

View file

@ -4,3 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
hashbrown = { version = "0.15", default-features = false, features = [
"alloc",
"default-hasher",
] }

View file

@ -1,7 +1,12 @@
use core::num::ParseFloatError;
use std::fmt;
use core::fmt;
use core::num::ParseFloatError;
// use std::hash::DefaultHasher;
extern crate alloc;
pub use hashbrown::hash_map::HashMap;
pub use std::collections::HashMap;
pub use std::io::Write;
pub use std::rc::Rc;

View file

@ -1,5 +1,8 @@
#![feature(slice_take)]
#![allow(special_module_name)]
#![feature(build_hasher_default_const_new)]
// #![no_std]
use std::io;
use std::io::Write;