Skip to content
/ keetree Public

A lightweight and fast router with no_std support.

License

Notifications You must be signed in to change notification settings

leizaf/keetree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keetree (WIP)

Version License

A lightweight and fast router with no_std support. The main library comes in at 182 lines only.

use keetree::Node;

fn main() {
    let router = Node::default();
    node.insert("a/b/c".split('/'), 1)
    assert_eq!(node.match("a/b/c".split('/')).unwrap(), 1)
}

Notable Behavior

Inserts on the same route with different values will update it.

Benchmarks

Only twice as slow as matchit which is the fastest rust router (that I know of). Not bad for something that's completely unoptimized. You can find matchit's benchmarks here.

Library Match
matchit 190.58 ns
keetree 490.32 ns

About

A lightweight and fast router with no_std support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages