michaelsproul / rust_radix_trie

Fast generic radix trie implemented in Rust
https://docs.rs/radix_trie/
MIT License
184 stars 32 forks source link

c ffi #39

Open hanabi1224 opened 6 years ago

hanabi1224 commented 6 years ago

@michaelsproul Here is an implementation proposal with some basic APIs for demonstration, let me know your comments.

michaelsproul commented 6 years ago

I think this looks promising.

Do you think the use of a Trie<Vec<u8>, usize> is about as general as we can do? Obviously we can't allow arbitrary value types (like Trie<Vec<u8>, V>) because of C's lack of generics, but we can store pointers to data allocated on the C side, which is pretty good?

hanabi1224 commented 6 years ago

@michaelsproul yes exactly

hanabi1224 commented 6 years ago

@michaelsproul Can you please take another look?

michaelsproul commented 5 years ago

Hi @hanabi1224! Sorry I missed your comment in September, I seemed to only get notified about it last week!

Anyway, I think the code is looking pretty good. I'm just wondering if you have tried using the API from a GC'd language like Python/Ruby/Haskell, and how that went?