Skip to content

πŸ¦€ Rust smart contract library designed for Elrond's Arwen VM. Also provides a debugging mode with mocks.

License

Notifications You must be signed in to change notification settings

MWFIAE/elrond-wasm-rs

This branch is 6331 commits behind multiversx/mx-sdk-rs:master.

Folders and files

NameName
Last commit message
Last commit date
Nov 1, 2021
Nov 5, 2021
Oct 25, 2021
Oct 25, 2021
Nov 5, 2021
Nov 5, 2021
Nov 5, 2021
Nov 4, 2021
Aug 4, 2021
Nov 5, 2021
Oct 25, 2021
Nov 1, 2021
Jun 29, 2021
Dec 9, 2020
Nov 5, 2021
Nov 4, 2021
Oct 28, 2021
Jan 4, 2020
Nov 27, 2020
Feb 9, 2021
Mar 8, 2021
Mar 25, 2021
Sep 30, 2020
May 18, 2021
Sep 30, 2021
Oct 28, 2021
Jul 28, 2021
Sep 10, 2021
Nov 5, 2021
Nov 1, 2021
Nov 1, 2021
Jul 28, 2021

Repository files navigation

elrond-wasm-rs

Rust smart contract library designed for Elrond's Arwen VM. Also provides a debugging mode with mocks.

Examples

For examples on how to use the Elrond WASM framework, see https://github.com/ElrondNetwork/elrond-wasm-rs/tree/master/contracts/examples

IDE

The framework is designed to be easiest to use with the Elrond IDE VSCode extension: https://marketplace.visualstudio.com/items?itemName=Elrond.vscode-elrond-ide

Manual build

To build a smart contract without the IDE, run the following command in the contract crate:

./build-wasm.sh

In case this doesn't work, you might not have rustc configured properly. Try:

rustup toolchain install nightly
rustup default nightly
rustup target add wasm32-unknown-unknown

Debugging

Step-by-step debugging of smart contracts is possible in VSCode. To do this, it is required to have a separate debug crate and to have tasks.json and launch.json in .vscode properly configured. See https://github.com/ElrondNetwork/elrond-wasm-rs/tree/master/contracts/examples for examples on how to set this up.

Advanced

To debug macros:

cargo +nightly rustc --bin wasm -- -Z unstable-options --pretty=expanded > demacroed.rs

To check wasm size:

twiggy top -n 20 target/wasm32-unknown-unknown/release/wasm.wasm

About

πŸ¦€ Rust smart contract library designed for Elrond's Arwen VM. Also provides a debugging mode with mocks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 97.3%
  • Shell 1.7%
  • Other 1.0%