Skip to content

What is the code coverage in Rust? #3902

Answered by satoshiotomakan
Rimantovas asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Rimantovas,
We do have plans to publish our crates to crates.io, but you can still use our Rust crates directly.
You only need to clone the whole https://github.com/trustwallet/wallet-core/ repository (no matter where to clone it).
Then you can import all required crates in Cargo.toml like this:

[dependencies]
tw_evm = { path = "path/to/wallet-core/rust/tw_evm" }

And then:

// main.rs
use tw_evm::address::Address;
use std::str::FromStr;

fn main() {
  let _ = Address::from_str("0xff00000000000000000000000000000000002694");
}

Please note that Rust crates have limited number of supported blockchains yet

Also, couldn't find if you currently generate rust bindings from the existing C++ co…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Rimantovas
Comment options

@satoshiotomakan
Comment options

Answer selected by Rimantovas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants