3 releases
0.2.2 | Mar 30, 2020 |
---|---|
0.2.1 | Mar 20, 2020 |
0.2.0 | Mar 13, 2020 |
#398 in #distributed
53KB
729 lines
ProximaX Supercontracts Rust SDK
Official ProximaX Supercontracts SDK Library in Rust lang.
Getting Started
All Supercontracts stuff include in dependency:
[dependencies]
xpx_supercontracts_sdk = "0.1"
To start new development new Supercontrac follow this steps:
-
cargo new sc-app
-
Add to
Cargo.toml
:
[dependencies]
xpx_supercontracts_sdk = "0.1"
- Add to
src/main.rs
:
extern xpx_supercontracts_sdk;
use xpx_supercontracts_sdk::utils::ping;
#[no_mangle]
pub extern "C" fn app_main() -> i64 {
ping(100).unwrap()
}
- Build:
cargo build --target wasm32-unknown-unknown --release
- If build success result contains in:
target
- Convert to Wat/Wast format:
wasm2wat sc-app
SDK Documentation
See Docs
directory.
Exampels
- See
eamples
directory - Build specific exmaple:
cargo build --target wasm32-unknown-unknown --example ping --release
License: Apache 2.0
Copyright (c) 2019 ProximaX Limited
Dependencies
~1.7–2.6MB
~42K SLoC