Ultimate SDK

Build high-volume actor apps in Rust. Share their logic across the Internet Computer, browsers, native clients and servers.

A shuttle carries two requests between four cutaway actors. Each base bears the RSX logo and its actor name. Below each deck, three bays are labeled “Workflows”, “Reducers” and “Schema & relations”.

Reactor High-throughput actor communication

Reactor batches messages headed to the same actor into one call. In the 16-actor Heavy16 benchmark, it carried 360,000 message frames in 2,434 calls.

148 frames per call · Heavy16 average
A raised blue Rechain platform on Actor B holds dispatch, two reducers with their own state, and a row of linked blocks labeled blockchain. Ashroot’s amber stack stands to its right.

Rechain State machines with verifiable history

Write business rules as pure reducer logic. Each reducer owns its state. For a recorded action, Rechain commits their changes together and appends a block to a chain you can verify and replay.

Read the Rechain guide
On Actor A’s deck, a panel labeled Workflow shows two branches. Delivery has its reply. Reservation is waiting for B’s receipt before the branches can rejoin.

Takt Durable workflows across actors

An actor can run many workflows at once. Define each one as steps, branches and waits. Takt saves each run’s progress and resumes it when the expected reply arrives.

Explore the workflow inspector
Beside Rechain, a vertical rail links the layers of the Ashroot device, with an integrity check on top. Amber groups of rows fill the bay labeled “Schema & relations” below it.

Ashroot Relations between records

Define tables and the relations between them in your database schema. A cinema can require every screening to reference an existing room and tell Ashroot to block deletion of any room still in use.

Watch the Ashroot lesson

Application performance · PocketIC

Forum, workflow, and exchange benchmarks

Showtime’s seven-actor exchange acknowledged 20,000 order additions and cancellations per simulated second over the final ten seconds of a PocketIC run. Those actions arrived in 40 ingress updates per second, with 500 actions in each.

All benchmarks

SDK comparison · PocketIC

90.8% fewer instructions in a compute-heavy call

RSX compared with Motoko on a call that scanned and summarized 4,096 posts in Harbor Forum’s million-post dataset.

Mean instructions · one audit call

RSX Nyxus
157.25M
DFINITY Rust Stable structures
636.52M
Motoko Enhanced persistence
1.71B

Average of 16 calls per build. All three builds retained sampled data on upgrade.

See the forum audit results

Heavy16 · 16 actors · PocketIC

20,625 workflow steps per simulated second

RSX completed 594,000 steps and 19,200 workflows in 28.8 seconds of simulated time. Reactor packed 360,000 message frames into 2,434 calls between actors, averaging 148 frames per call. The run includes the time to finish queued work.

Logical requests and notifications per simulated second
6,250
Physical messages between actors per simulated second
169

Showtime exchange · 7 actors · PocketIC

30,000 order actions per simulated second

Six collectors and one matcher handled 600,000 adds and cancels on a 50,000-order book. At 60 ingress updates per simulated second, the exchange acknowledged 30,000 actions per second over the final ten seconds of arrivals. Orders rested on the book until canceled. Signing and verification ran with the simulated clock paused.

Order actions per ingress call
500
Simulated seconds until all actions were acknowledged
20.5

Do more work with each network call

The Internet Computer limits message sizes and the queue between each pair of actors. DFINITY’s Rust CDK gives you the APIs for calls, timers and state. RSX supplies the batching, workflow engine and replayable log that a team building a high-volume app would otherwise have to put together.

Compare the SDKs

Let peers carry signed actions

A Showtime trader signs up to 20 actions with one Schnorr signature. A submitter combines 25 full packs into a single update. In the P2P game, a browser can forward another player’s move and the referee can still verify who signed it.

Compare individual and batched Schnorr verification

Give independent work its own actor

Showtime divides accounts among six collector actors. While one collector checks an order, another can check an order for a different account. Because the collectors own separate accounts, a distributed runtime can spread that work across cores or servers.

See how Showtime divides the work

Touch fewer memory pages

Each module chooses its collections and where they live, in the Nyxus heap or Hylix stable memory. Tracking free space by page and allocation size cut Heavy16 from 105.15B to 95.88B instructions in a separate Nyxus allocator test.

See the allocator measurements

IC message limits · DFINITY Rust CDK reference

Build your first actor

Save a score, upgrade the app, and read the score back.

Inside Showtime · six collectors and one matcher

Follow one order cancellation

In the app, peers relay encrypted orders from the browser. The Showtime benchmark submitted packs directly and timed the trip from collector to matcher and back. Signing, encryption and verification queries ran while the simulated clock was paused.

Showtime architecture
  1. Trader

    Sign one pack

    The trader’s browser signs up to 20 order actions with one Schnorr signature, then encrypts the pack for the trader’s home collector. A peer forwards the encrypted pack to an authorized submitter.

  2. Ingress

    Group 25 full packs

    The submitter gathers 25 full packs for the same collector. The collector verifies their signatures in a query and seals the batch. The submitter sends that batch back in one ingress call carrying 500 order actions.

  3. Reactor

    Share a call to the matcher

    The collector checks the cancellation against the trader’s account. Reactor carries it to the matcher alongside other commands. In the separate 16-actor Heavy16 run, Reactor carried 360,000 frames in 2,434 calls, about 148 frames per call.

  4. Order book

    Remove the resting order

    The cancellation tells the matcher which range of the queue belongs to the order. The matcher removes the quantity still open there and sends the exact result back to the trader’s home collector.

  5. Acknowledgement

    Release the reservation

    The collector releases the funds or inventory tied to the canceled quantity. Once the collector has applied every result in the batch, it sends an acknowledgment. The matcher records it in Rechain and retires those results in the same commit.

In the arena game, peers relay signed player inputs while the browser shows the next move immediately. A referee actor verifies the inputs for a 128-tick window before it commits the checkpoint. Follow a signed move through the P2P game

Candid vs. IC Wire

More room for your actor’s API

Our 128-method Candid test shows why API size matters. With one shared schema, the executable code took up 1.03 MiB. Giving each method its own schema pushed that to 8.90 MiB of the IC’s 12 MiB code budget. We compared codecs on a separate API with 20 updates.

IC-WIRERSX uses this open-source codec for typed calls and replies.Explore on GitHub

82.8% less Wasm added by 20 methods

The empty RSX actor was 196,561 bytes. Adding the API took 92,812 more bytes with IC Wire and 538,110 with optimized Candid.

Whole module · uncompressed bytes

DFINITY ic-cdk · stock Candid
775,955
RSX · optimized Candid
734,671
RSX · IC Wire
289,373

Including the runtime, the IC Wire module was 60.6% smaller than RSX with optimized Candid and 62.7% smaller than DFINITY ic-cdk with stock Candid.

67.2% fewer instructions per transfer acknowledgement

One update decodes a transfer record and returns a receipt. Both RSX builds do the same work, using IC Wire or optimized Candid.

Complete update · mean instructions

DFINITY ic-cdk · stock Candid
539,306
RSX · optimized Candid
506,658
RSX · IC Wire
166,266

RSX with IC Wire used 69.2% fewer instructions than DFINITY ic-cdk with stock Candid.

All three builds implement the same 20 updates. The DFINITY build uses stock Candid 0.10.38 on Wasm32. The RSX builds use optimized Candid 0.10.38 or IC Wire 0.7.21 on Wasm64. Each instruction count is the mean of eight complete updates, including decoding, the reply and memory-page charges.

Seven lanes for evolving an app

Start from the release you support. Each lane gives you the rules, a tested example, and the skill your coding agent can follow. Rehearse every lane your change touches.

SDK evolution guide

Wire and public interfaces

Add compatible fields or cases to IC Wire messages. Test requests and populated replies with the clients and peers you still support.

Persistent memory (EOP)

Enhanced orthogonal persistence keeps the actor’s Wasm memory across upgrades. When a module’s saved data changes shape, give it a new version and a typed conversion. RSX checks the saved memory contract before opening the actor’s state.

Takt workflows

Keep supported definitions available for work in progress, or convert eligible saved executions while preserving their IDs and deadlines.

Rechain logs and history

Add action kinds or fields while preserving original records and their certified history. Rehearse replay and reads across the archive boundary.

Ashroot tables and relations

Reindex rebuilds indexes over compatible primary storage. Recode converts rows or changes storage engines. Before the upgrade completes, Ashroot checks every foreign key against the new database.

Maps, graphs, and other collections

Move unchanged collections or explicitly convert their entries inside the owner. Rebuild indexes when key ordering changes and check retained graph cursors against their saved contracts.

SDK, allocators, and Rust

Qualify the exact build pair when implementation fingerprints change and the persistence contract stays compatible. Plan a separate migration for an incompatible storage format.

When a workflow spans actors, rehearse the upgrade with messages still queued, replies saved, and callbacks pending. Reactor delivery checks

Tools

Profile actor calls and trace workflows

See which code cost the most in a ledger transfer, or follow a purchase workflow as it retries a payment.

Built by the RSX team

RSX IC Profiler

Trace the cost of a PocketIC call down to individual Wasm blocks and memory pages. Read the capture in your browser or let an agent query it through MCP.

Reads recorded Takt runs

Takt Workflow Inspector

Follow a recorded workflow through its graph, branches, and attempts. Switch views to see where it waited and where it spent instructions.

Verification

Formal verification

RSX uses Creusot, Kani, and Verus to verify parts of its Rust runtime. The page-pool proofs check which memory recovery can reclaim and which it must preserve.

Verification scope
Page-pool methods checked
25
Page-authority proof goals discharged
779
Confirmed runtime defects fixed
2

The page-authority checkpoint covered 197 proof reports on native x86-64 under the documented memory backing assumptions. Read the proof record · Confirmed fixes

Reject partial memory pages

A proof review found that a native provider accepted an incomplete final page during initialization. It now checks the image length before changing it. The fix passed 44 platform tests.

Read the memory fix

Check the full owner ID on Wasm32

Minima narrowed an owner ID before checking it against the owner table. It now validates the full ID first. The fix was checked on Wasm32 and passed 483 native tests and doctests.

Read the Minima fix

Runtime

WebAssembly and the IC runtime

RSX compiles Rust to WebAssembly and defaults to Wasm64. The IC meters the instructions each call executes, so most benchmarks on this site report instruction counts.

Wasm target profiles

Actor isolation

The canister isolates the actor’s WebAssembly memory. If an update traps, the Internet Computer rolls back the writes made in that execution. Changes the actor committed in earlier executions stay in place.

IC isolation and safety

Parallel execution

A canister processes one update message at a time. The IC can run updates for different canisters in parallel.

IC execution thread limits

Orthogonal persistence

Committed state carries forward to the next call. On a KEEP upgrade, the IC retains Wasm memory. RSX checks the saved memory contract before opening it. Typed migrations can change application data when the Store kernel, allocator, and compiler remain compatible.

RSX upgrade checks

Replicated execution

Subnet consensus agrees on the order of incoming updates. Replicas execute the agreed messages deterministically to keep the same committed state.

How subnet consensus works

What RSX gives each actor

Design an actor
ModulePRIVATE MEMORYv1migratev2

Choose storage per module

Each module owns its data. Choose its memory engine and collections, then define how to migrate existing records when their shape changes.

Memory and upgrades
DONESend requestWAITINGAwait replyNEXTContinue

Follow work across actors

Reactor delivers requests between actors. Takt saves the workflow’s progress while it waits for a reply, so you can see which step comes next.

Workflows and delivery
RechainState change+History blockAshrootScreeningRoom

Keep records you can check

For recorded actions, Rechain commits the state change and its history block together. In an actor’s database, Ashroot enforces the relationships and uniqueness rules you declare and keeps indexes up to date.

History and integrity

p2pgame · TRACE Arena prototype

One set of game rules, in the browser and on the IC

Press jump and the browser shows the move immediately, using the game’s Rust rules. The referee actor runs the same rules on verified inputs and commits a checkpoint. The browser uses that checkpoint to correct its prediction.

See how the game shares its reducer
icgame-engineShared Rust rules for movement, collisions and combat
Browser WasmPredict the next tickApply local inputs from the latest accepted view.
Referee actorSettle the checkpointSimulate verified inputs and commit the accepted result.

Lessons

Watch how it works

Start with the introduction, then follow the protocols through Fourcans and Chatapp. The films include chapters, captions, and transcripts.

All lessons
A message channel connects Matinee’s box office and wallet actors

Introduction · 4 min 36 sec

From one database to many actors

Follow one seat and one payment as a cinema moves from a single database to separate owners. Then pick a lesson for the part you want to build.

Watch the introduction
The Stack opening slide on a light paper background

5 lessons · 21 min 24 sec

The Stack

See how Rechain records changes, Reactor delivers messages, and Takt coordinates workflows. Then follow all three through Fourcans and Chatapp.

Watch The Stack

Articles

What the tests showed

Each result links to the article and the report behind the number.

All articles

Browse articles by role

Choose the questions you’re working on. Each article links to the guides, tests, or reports behind it.

View all articles