Expand description
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;
}
Modules§
- blockchain
- Interact with contracts on the blockchain in the wasm.
- crypto
- Wrapped cryptography library (e.g.
secp256k1
,secp256r1
) for data encryption and decryption - database
- Interact with database in the wasm.
- log
- Send a log from VM to the host.
- metrics
- Publish a metrics to Trusted Metrics Center.
- stream
- Interact with the source and sink of the stream.