3 releases
new 0.1.2 | Nov 7, 2024 |
---|---|
0.1.1 | Nov 7, 2024 |
0.1.0 | Nov 1, 2024 |
#433 in WebAssembly
116 downloads per month
4KB
55 lines
Clique WASM SDK
The Clique WASM SDK is a convenient WebAssembly toolkit designed to simplify interactions with the Clique Network.
Quick Start
Add this dependency to your Cargo.toml
:
clique-wasm-sdk = "0.1"
#![no_std]
extern crate alloc;
use alloc::format;
use clique_wasm_sdk::{console_log, get_param, set_output, Val};
#[no_mangle]
pub extern "C" fn evaluate() {
// Get param
let param: Val = get_param("param").unwrap().unwrap();
console_log(&format!("{:?}", param));
// Set output
set_output("output", &Val::Bytes(b"hello world".to_vec()));
}
Dependencies
~30KB