cargo-rusnap

Crates.iocargo-rusnap
lib.rscargo-rusnap
version0.1.1
sourcesrc
created_at2023-10-04 10:32:24.641768
updated_at2023-10-04 11:11:55.416013
descriptionCargo tool for Rusnap
homepage
repositoryhttps://github.com/tiannian/rusnap
max_upload_size
id992090
size20,770
(tiannian)

documentation

README

RuSnap

Build Metamask Snap use Rust.

Install and Usage

Install cargo-rusnap.

cargo install rusnap

Dependencies

Please install these dependencies.

  • wasm-pack
  • npm (yarn or pnpm)

Create Snap

cargo rusnap new rusnap-pkg

Build Snap

# Build dev mode in default
cargo rusnap build

# Build release mode
cargo rusnap build --release 

Start Snap

cargo rusnap start

Then you can load snap in metamask.

Execute these js statement in broswer devtool:

window.ethereum.request({
  method: "wallet_requestSnaps",
  params: { "local:http://localhost:8080": {} },
});

Or use Metamask Snap Debug Tool.

Commit count: 80

cargo fmt