bittensor-rs Documentation
Welcome to the bittensor-rs SDK documentation. This Rust SDK provides typed, memory-safe access to the Bittensor decentralized AI network, mirroring the capabilities of the Python SDK while offering native performance, compile-time guarantees, and WASM compatibility.
Getting Started - Installation, prerequisites, your first program, connecting to the network
Crate
Documentation
Description
bittensor-core
Architecture
Balance arithmetic, error types, config, POW, shared types
bittensor-wallet
Wallet
Wallet, keypair, keyfile, mnemonic, SS58
bittensor-chain
Chain Client
Subtensor client, queries, extrinsics, events
bittensor-synapse
Synapse
Protocol types, headers, hashing, signing, streaming
bittensor-axon
Axon
Axum-based neuron server with middleware and routing
bittensor-dendrite
Dendrite
HTTP client with request signing and streaming
bittensor-metagraph
Metagraph
Subnet graph sync, iteration, and serialization
bittensor-cli
CLI
btcli-rs command-line tool
bittensor-tui
TUI
Terminal UI dashboard
bittensor-pyo3
Python Bindings
Python bindings (bittensor_rs package)
bittensor-wasm
WASM Bindings
Browser bindings via wasm-bindgen
bittensor-examples
Source only
Runnable code samples demonstrating each subsystem
Read-only storage queries against the Subtensor chain:
Signed transactions that modify chain state:
Staking - add_stake, remove_stake, move_stake, swap_stake, transfer_stake
Transfer - Transfer TAO between accounts
Registration - POW register, burned register, root register
Weights - set_weights, commit_weights, reveal_weights, commit_timelocked_weights
Serving - serve_axon, serve_axon_tls
Delegate - increase_take, decrease_take, become_delegate
Children - set_children, set_childkey_take
Proxy - add_proxy, remove_proxy
Root - root_set_weights, root_claim
Coldkey Swap - swap_coldkey
Migration Guide - Migrating from the Python bittensor SDK to Rust
Glossary - Bittensor and Rust SDK terminology
FAQ - Frequently asked questions
Network
WebSocket URL
Use Case
Finney (mainnet)
wss://entrypoint-finney.opentensor.ai:443
Production
Testnet
wss://test.finney.opentensor.ai:443
Testing
Local
ws://127.0.0.1:9944
Development
Archive
wss://archive.finney.opentensor.ai:443
Historical queries
Feature flags control optional functionality at compile time.
Feature
Default
Description
storage-subscriptions
yes
Enable subscribe_storage event stream
drand
no
Drand randomness beacon verification
mev-shield
no
Post-quantum MEV protection for extrinsics
integration-tests
no
Integration test suite (requires local node)
Feature
Default
Description
ml-backend
no
ML-based weight scoring backend
Feature
Default
Description
mev
no
MEV-shield protected transactions
Feature
Python SDK
Rust SDK
Performance
Interpreter overhead
Native binary, zero-cost abstractions
Memory safety
GC managed
Compile-time borrow checking
Concurrency
GIL-limited async
Native async with tokio, no GIL
WASM support
No
Full wasm-bindgen support
Python bindings
Native
Via bittensor-pyo3 (bittensor_rs)
Typing
Runtime duck typing
Static types, subxt-generated metadata
Keyfile format
NaCl secretbox
Same NaCl secretbox, cross-compatible
Chain client
substrate-interface
subxt 0.50, typed storage and extrinsics