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

Download history 56/week @ 2024-03-29 1/week @ 2024-04-05 90/week @ 2024-04-26 5/week @ 2024-05-24 3/week @ 2024-05-31 6/week @ 2024-06-28 63/week @ 2024-07-05

69 downloads per month

Apache-2.0

31KB
493 lines

w3bstream-wasm-rust-sdk

A Rust SDK for writing Webassembly for W3bstream.

Crates.io Apache licensed

Website | Guides | API Docs

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