Skip to content

Tulpar vs Rust

Rust and Tulpar both compile ahead-of-time to native binaries with no VM or GC pause, and both land in the same performance class. The trade-off is memory model versus batteries: Rust’s ownership/borrow checker buys memory safety without a garbage collector, but its standard library ships no HTTP server, no SQLite bindings, and no ORM — those come from crates like actix-web, sqlx, and diesel. Tulpar has no borrow checker, but wings and orm are already part of the runtime.

JSON vs Struct Usage
Arrays and Loops
String Processing

Rust has no standard-library HTTP server, so even a minimal API reaches for a crate like actix-web plus serde for JSON — and SQLite, an ORM, and OpenAPI docs are each further crates (sqlx/diesel, utoipa, …) on top of that. Tulpar’s wings and orm ship in the compiler’s own runtime.

import "wings";
import "orm";
orm_open("app.db");
define_model("users", {
"id": "INTEGER PRIMARY KEY AUTOINCREMENT",
"name": "TEXT NOT NULL",
"age": "INTEGER"
});
func list_users(req) { return ok(orm_all("users")); }
func create_user(req) { return created(orm_create("users", req.json)); }
get("/users", "list_users");
post("/users", "create_user");
body_schema({"name": "str", "age?": "int"}); // invalid body → 422, automatically
serve(8080); // + Swagger UI, /openapi.json, /metrics, /healthz

See Wings Tutorial for the guided, three-app version of the Tulpar side, and Benchmarks for how the two compare on raw HTTP throughput.