| Crates.io | blockless-sdk |
| lib.rs | blockless-sdk |
| version | 0.2.3 |
| created_at | 2023-06-17 00:45:52.988281+00 |
| updated_at | 2025-07-15 14:29:04.351013+00 |
| description | blockless runtime sdk |
| homepage | |
| repository | https://github.com/blocklessnetwork/sdk-rust |
| max_upload_size | |
| id | 892637 |
| size | 144,347 |

Install the rust with rustup, please visit the site 'https://rustup.rs/'.
Use follow command for build the project.
cargo build --release --target wasm32-wasip1
cargo add blockless-sdk
Examples are in the examples directory.
# Build example
cargo build --release --target wasm32-wasip1 --example coingecko_oracle
# Run example with blockless runtime
echo "bitcoin" | runtime target/wasm32-wasip1/release/examples/coingecko_oracle.wasm --permission https://api.coingecko.com/
# Build example
cargo build --release --target wasm32-wasip1 --example http_client
# Run example with blockless runtime
~/.bls/runtime/bls-runtime target/wasm32-wasip1/release/examples/http_client.wasm --permission http://httpbin.org/anything
# Build example
cargo build --release --target wasm32-wasip1 --example llm-mcp
# Run example with blockless runtime and tool servers running
# Make sure you have the tool servers running on ports 3001 and 3002
~/.bls/runtime/bls-runtime target/wasm32-wasip1/release/examples/llm-mcp.wasm
| Example | Description | Browser runtime support | Native runtime support |
|---|---|---|---|
| coingecko_oracle | Coingecko Oracle to query price of bitcoin from coingecko | ✅ | ❌ |
| http_client | HTTP client demonstrating various request types (GET, POST, auth, multipart) | ✅ | ❌ |
| llm | LLM to chat with Llama-3.1-8B-Instruct-q4f32_1-MLC and SmolLM2-1.7B-Instruct-q4f16_1-MLC models |
✅ | ✅ |
| llm-mcp | LLM with MCP (Model Control Protocol) demonstrating tool integration using SSE endpoints | ✅ | ✅ |
| web-scrape | Web Scraping to scrape content from a single URL with custom configuration overrides | ✅ | ❌ |
The SDK uses FFI (Foreign Function Interface) calls that are only available in the Blockless WASM runtime environment.
To run tests without host runtime, use the mock-ffi feature which provides mock implementations:
cargo test --all --features mock-ffi
This feature enables mock implementations of all FFI functions, allowing you to:
Note: