alexcrichton / wasm-sodium

PoC of libsodium being used in Rust on wasm32-unknown-unknown
25 stars 3 forks source link

wasm32-unknown-unknown and sodiumoxide

A proof-of-concept repository showing how libsodium and the sodiumoxide bindings can be used in the browser with the wasm32-unknown-unknown target.

To test this out you'll need:

And with all that in place you can execute the example with:

./build.sh

And you should see something like:

...
+ node run.js
10 randomly generated bytes are [132, 50, 0, 212, 16, 153, 236, 63, 8, 107]
sha256("Hello, World!") = dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f