rust-crypto wasm build
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bench make benchmark work again Jun 29, 2018
src
.gitignore
Cargo.toml (cargo-release) version 0.1.1 Jun 29, 2018
README.md chore: update benchmark Jun 29, 2018

README.md

crypto-wasm

Dependencies

Make sure you have rust installed in your environment. follow this link: https://www.rust-lang.org/en-US/install.html to install rust toolchains.

如果你是中国用户, 执行

cat > $HOME/.cargo/config << EOF
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
EOF

然后

curl https://sh.rustup.rs -sSf | sed "s/https:\/\/static.rust-lang.org\/rustup\/dist/https:\/\/mirrors.ustc.edu.cn\/rust-static\/rustup\/dist/g" | sh

And then install the wasm-pack:

cargo install wasm-pack

And then use nightly rust

rustup default nightly

Build

wasm-pack init -t nodejs

Benchmark

  • yarn
  • node bench/{md5|sha256}