Hyperstack turns Solana on-chain data into real-time streams for your applications. Instead of manually parsing accounts and managing WebSocket connections, you declare what data you want in Rust, and Hyperstack handles the rest.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hypertekorg/hyperstack/llms.txt
Use this file to discover all available pages before exploring further.
What You’ll Build
In this guide, you’ll create a complete streaming data pipeline:- Define your data model in Rust using the
#[hyperstack]macro - Compile to generate a stack specification
- Deploy to Hyperstack Cloud
- Connect from your application with a type-safe SDK
Prerequisites
Before you start, ensure you have:- Rust 1.70+ (install via rustup)
- Hyperstack CLI (
cargo install hyperstack-cli) - An IDL file for the Solana program you want to track
Quick Start
1. Create a new Rust library
2. Add Hyperstack dependencies
Update yourCargo.toml:
3. Get an IDL file
Place your program’s IDL in anidl/ directory:
4. Define your stack
Opensrc/lib.rs and write your first entity:
ore_sdk prefix is generated from the IDL’s program name. An IDL named “ore” produces ore_sdk::accounts::* and ore_sdk::instructions::*. Your IDL will generate a different prefix based on its metadata.
:::
5. Build your stack
.hyperstack/MyStream.stack.json file containing your compiled stack specification.
6. Initialize your project
hyperstack.toml linking your local stack to the cloud:
7. Deploy to Hyperstack Cloud
:::caution[Closed Beta] Hyperstack is currently in closed beta. You’ll need an API key to deploy. Contact us on X to request access. :::8. Generate the SDK
Create a typed SDK for your application:9. Connect from your app
What Just Happened?
- You wrote Rust — A declarative specification of what data you want
- Hyperstack compiled it — Into a portable
.stack.jsonfile - You deployed to the cloud — Hyperstack manages all infrastructure
- You got a WebSocket URL — Your app streams updates in real-time
- You used a typed SDK — Full TypeScript/Rust type safety
Development Workflow
-
Edit your stack definition in
src/lib.rs -
Build with
cargo buildto regenerate the.stack.json -
Deploy with
hs upto push changes to production -
Regenerate SDK with
hs sdk createif entity structure changed
Next Steps
- Configuration — Learn about
hyperstack.tomloptions - Stack Definitions — Deep dive into the declarative model
- Rust DSL — Complete macro reference
- Your First Stack — Full tutorial with ORE mining example
Troubleshooting
Build fails with “IDL file not found”
Ensure the IDL path in#[hyperstack(idl = "...")] is relative to your Cargo.toml.
”Stack file not found” during deployment
Runcargo build first. The #[hyperstack] macro generates the .stack.json during compilation.
WebSocket connection fails
Verify the URL fromhs up matches what you’re using in your app. Run hs stack list to see all deployed stacks.
Type errors in generated SDK
Regenerate the SDK after changing your entity structure:hs sdk create typescript my-stream --output ./sdk --force