Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/texora/mx-sdk-rs-layer2
Hackerrank Coding Challenges with Rust
https://github.com/texora/mx-sdk-rs-layer2
hackerrank python rust shell typescript
Last synced: about 2 months ago
JSON representation
Hackerrank Coding Challenges with Rust
- Host: GitHub
- URL: https://github.com/texora/mx-sdk-rs-layer2
- Owner: texora
- License: gpl-3.0
- Created: 2024-08-28T23:54:39.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T23:57:12.000Z (4 months ago)
- Last Synced: 2024-11-01T09:51:44.878Z (2 months ago)
- Topics: hackerrank, python, rust, shell, typescript
- Language: Rust
- Homepage:
- Size: 1.16 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# dharitri-wasm-rs
Rust smart contract library designed for Dharitri's VM. Also provides a debugging mode with mocks.
# Examples
For examples on how to use the Dharitri WASM framework, see https://github.com/DharitriNetwork/dharitri-wasm-rs/tree/master/contracts/examples
# IDE
The framework is designed to be easiest to use with the Dharitri IDE VSCode extension: https://marketplace.visualstudio.com/items?itemName=Dharitri.vscode-dharitri-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/DharitriNetwork/dharitri-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
```