tiny-bip39
tiny-bip39 copied to clipboard
C++ function wrapper
Good day, I've created C++ library access functions in lib.rs. The C++ header file and demo application is contained inside the C++ sub directory.
Ahoy! I do not want to belay your efforts, but putting these functions and their imports into the lib.rs seems to be a bit intrusive to me. There are 2 ways to get it out from there:
- Create a module (say
mod cpp) and extract them there. - Create another crate that depends on this one and put it there.
The second has the advantage that build times do not increase for those who only use this crate from Rust. And has the disadvantage that it is difficult to notice your crate when someone only knows this one. Although I sometimes check the dependent crates of a crate to see how they are used: https://crates.io/crates/tiny-bip39/reverse_dependencies