Use case

Rust code generator: Rust applications from your database schema

Rust is fast and safe – but writing structs, data access and repetitive CRUD code for every table takes time. Scoriet generates that code from your database schema using templates, so your Rust project starts with a complete, consistent data layer and application structure.

Why generate Rust code with Scoriet?

Types straight from the schema

Columns become strongly typed struct fields – optional values, lengths and keys included.

No hand-written boilerplate

Data access and CRUD code for every table are generated in one run instead of written table by table.

Your crates, your style

Templates are plain text with placeholders. Use the frameworks and crates you prefer and keep them consistent across projects.

Regenerate safely

When the schema changes, regenerate. Scoriet shows changed files and creates the database migration script.

What you get

Generated for your Rust project

  • Structs for every table
  • Data access functions for create, read, update and delete
  • Relations between tables
  • Project structure and configuration
  • Consistent naming across the whole project
  • SQL migration scripts when the schema changes

How it works

From schema to Rust code

  1. 1

    Import the schema

    Import your MySQL schema or design the tables in the database designer.

  2. 2

    Choose or write a Rust template

    Use an existing Rust template or create one for your preferred framework and crates.

  3. 3

    Generate and build

    Generate the project and build it with cargo – then add your own logic.

Frequently asked questions

Which Rust frameworks are supported?

Scoriet is not tied to a framework. Whatever you put into the template is generated – you decide which web framework and database crates the project uses.

Is the generated Rust code idiomatic?

The code follows the template, so it is as idiomatic as your template. Improve the template once and every generation benefits.

Can I mix generated and hand-written code?

Yes. Scoriet tracks which generated files you changed and can take those changes back into the next generation.

Generate your foundation today

Free to start, open source, and the generated code belongs to you.