01 / 07 Architecture guide

When is Rust worth it for backend systems?

Rust earns its cost when a runtime mistake is more expensive than a slower first release: shared state under concurrency, latency that must stay predictable, and core logic that several products will depend on for years. For most other work, a faster-to-write language is the better business decision.

Written by Iavor Kolev, software architect and product builder

14

Rust packages in the Market Data Platform workspace

87

Cargo packages in the RustDX framework workspace

3

NativeCharts clients sharing one Rust runtime

02 / 07 Principle

Choose the language by the cost of being wrong

Use Rust where a bug at runtime costs more than the time it takes to satisfy the compiler. Everywhere else, optimise for how quickly you can learn.

Iavor Kolev

Language debates usually compare speed or popularity. The more useful comparison is where errors are caught. Rust moves a large class of mistakes, including data races, missing values and many ownership errors, from production to compile time. That is valuable exactly where those mistakes are expensive, and wasteful where the code will be rewritten next month.

The decision does not have to cover the whole system. The pattern that works best in practice is a small Rust core that owns the rules and the state, surrounded by adapters, scripts and interfaces written in whatever is fastest for that job.

03 / 07 Fit

Four signals that Rust will pay for itself

If none of these describe your system, Rust is probably a cost rather than an advantage.

01 / Concurrency

Shared state must stay correct under load

In the Market Data Platform, a core hub validates every normalised event and assigns it a monotonic sequence before fanning it out to live delivery and storage. An ordering bug there would corrupt every downstream consumer.

02 / Latency

Response time must be predictable, not just fast on average

Rust has no garbage collector, so there are no collection pauses on the hot path. That matters for live market updates and matters very little for a contact form.

03 / Shared core

One implementation must serve several products

NativeCharts runs the same headless Rust runtime for subscriptions, stale-data detection, reconnection and checkpoints across its desktop, web and mobile clients, instead of three diverging copies.

04 / Longevity

The architecture must survive years of change

RustDX spans 87 packages with a deliberate dependency direction from kernel to application. The compiler and the module boundaries keep that structure intact as it grows.

04 / 07 Not Rust

Where another language is the better call

Choosing Rust everywhere is as much a mistake as choosing it nowhere.

  • Automation and data

    Python for scripts, research and integrations

    When the job is transforming data, testing a hypothesis or wiring APIs together, iteration speed and library coverage matter more than runtime guarantees.

  • Content sites

    What reaches the browser matters more than the server language

    This site is generated by Rust, but visitors receive static HTML. For a team that edits content every day, a content management system is usually the better choice.

  • Early product

    A mainstream stack for forms, dashboards and first versions

    Admin panels, CRUD APIs and first releases change every week. A mainstream stack with a large hiring pool usually reaches a validated product faster.

Rust does not make an unclear product clear. Decide what the system must guarantee first; the language choice follows.

05 / 07 Costs

The costs to plan for up front

Rust's costs are real, predictable and manageable when they are planned rather than discovered.

Learning curve

Ownership and lifetimes take time to learn

Teams new to Rust are slower at first. Budget for that, or keep Rust in a contained core owned by people who already know it.

Build times

Compilation is slower than in interpreted languages

Large workspaces need deliberate crate boundaries and incremental builds so that feedback loops stay short.

Hiring

A smaller pool of experienced engineers

There are fewer Rust developers than Python or TypeScript developers. A small, well-documented core with clear boundaries reduces how many you need.

Integrations

Some ecosystems are thinner

Provider SDKs and niche integrations may not exist in Rust. Isolating them behind adapters, as the Market Data Platform does by stopping provider formats at ingress, keeps that gap from shaping the core.

07 / 07 Next step

Answer these five questions before choosing Rust

If most answers are yes, Rust is likely to repay its cost. If most are no, choose the faster path and revisit the decision when the product has proven itself.

Five questions

  1. Would a concurrency or memory bug cause data loss, financial loss or downtime?
  2. Must latency stay predictable under load, not just low on average?
  3. Will several applications or platforms depend on the same core logic?
  4. Will the core be maintained for years rather than rewritten after validation?
  5. Can the team own a contained Rust core, or bring in someone who can?