Skip to content

🪐 Easy-to-use string interning crate for building efficient compilers in the Rust programming language.

License

Notifications You must be signed in to change notification settings

abs0luty/tiny-interner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪐 tiny_interner crate.

~300 lines of Rust code that implement string internering for your programming language compiler.

Example

fn main() {
    let interner = Interner::default();
    let s1 = interner.get_or_intern("test");
    let s2 = interner.get_or_intern("test");
    assert_eq!(s1, s2);

    assert_eq!(interner.resolve(0).unwrap(), "test");
}

About

🪐 Easy-to-use string interning crate for building efficient compilers in the Rust programming language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages