7 releases
0.1.17 | Jul 3, 2023 |
---|---|
0.1.16 | May 26, 2023 |
0.1.15 | Apr 22, 2023 |
0.1.12 | Feb 16, 2023 |
#95 in #found
69 downloads per month
31KB
493 lines
w3bstream-wasm-rust-sdk
A Rust SDK for writing Webassembly for W3bstream.
Example
Say “Hello World!” to the w3bstream with rust-sdk.
Make sure you added the ws-sdk crate on Cargo.toml:
cargo add ws-sdk
Then, on your lib.rs:
use ws_sdk::log::log_info;
#[no_mangle]
pub extern "C" fn start(_: i32) -> i32 {
log_info("hello world!");
return 0;
}
More examples can be found here.
lib.rs
:
A Rust SDK for writing Webassembly for W3bstream.
W3bstream is a general framework for connecting data generated in the physical world to the blockchain world. Webassembly is selected as the programming language for data processing.
At a high level, W3bstream provides several Application Binary Interfaces (ABIs) to enhance the Webassembly ability for developers:
- streaming: Reading or Writing the data in the stream
- database: Storing or accessing the data in the database
- blockchain: Writing or reading the contract on the blockchain
- logging: Logging information or errors
Guide level documentation is found on the website.
Examples
Say "Hello World!" to the w3bstream:
use ws_sdk::log::log_info;
#[no_mangle]
pub extern "C" fn start(_: i32) -> i32 {
log_info("Hello World!");
return 0;
}
Dependencies
~4.5MB
~98K SLoC