Build production-grade backends
in minutes, not weeks.
Carrier™ compiles one .carrier source tree into the full stack a real service ships with — REST API, auth, database, workflows, observability, deploy artifacts. No framework wiring. No glue code. No drift between the diagram and the binary.
From idea to production. Describe → approve → compile → ship.
One source tree. Everything a real backend ships with.
Carrier compiles a .carrier project into the working set below — generated, governed, and reviewable. Nothing here is a stretch goal: every item is implemented in 1.3.4 today and produced from one of the thirty-three top-level constructs.
- Typed REST routes — path params, query, body, response
- Generated CRUD — list · get · create · update · delete · restore
- Filters, pagination, sort, full-text search, soft delete
- Idempotency-key handling at the edge
- JWT auth — issuer, audience, JWKS, secret rotation
- Role hierarchy + all_roles / any_roles guards
- OpenAPI 3.1 spec + /docs explorer + api_explorer Try-it
- MCP stdio server (action / workflow tools, free)
- React Native SDK with persisted offline mutation queue
- Postgres models with @version, @unique, @index, @primary
- Generated migrations + schema snapshots
- Row-level security (RLS) compiled from policy declarations
- Tenant + workspace session context per request
- pgvector search — HNSW + IVFFlat, cosine / euclidean / inner
- Hybrid search (text + vector) with weight overrides
- Materialized views, governed precomputed reads
- Hash-chained audit log (carrier_audit_log)
- Tenant-scoped data exports (NDJSON / CSV)
- Durable workflows — linear, saga, parallel graph
- Per-step retry budgets + typed compensation
- Cron schedules + jobs + durable events
- Typed Redis queues — consumers · DLQ · retry backoff
- Tenant lifecycle hooks — on_create / on_suspend / on_delete
- Realtime streams — WebSocket → SSE → long-poll fallback
- watch blocks: CRUD changes → typed events post-commit
- Feature flags — percentage + tenant rules
- First-class SLAs — attainment, deadline, escalation
- llm client with typed tool surface, generated schemas
- respond_as(TypeName) — structured outputs without JSON glue
- Per-tenant USD budgets + downgrade-on-overage
- Routed clients — primary / fallback on outage / 429 / cost
- rag — retriever + embedder + LLM in one declaration
- agent declarations bound as chat-thread participants
- Persisted conversations (carrier_llm_conversations)
- eval blocks — graded LLM regression checks under carrier test
- finetune — curated datasets pinned to a model version
- OTLP traces, metrics, and logs — HTTP or gRPC export
- Spans on every route, action, job, workflow, client, LLM call
- Trace context propagated through jobs and workflows
- Stable carrier.* span attributes (route_name, tenant_id, …)
- Structured JSON logs to stdout, mirrored to OTLP
- trace.annotate({...}) + metrics.counter / gauge
- Carrier Flight Recorder at /ops/flight
- Evidence bundles — request id, stack hash, recent probes
- /health, /ready, /openapi.json, /docs, /ops/runtime
- pdf.render_html — text-first deterministic PDFs
- pdf.render_svg_template — visual SVG with custom fonts + assets
- blob.put + blob.signed_url — file storage + signed downloads
- image.* helpers — resize / crop / thumbnail
- template.render_html — typed Handlebars-style rendering
- Generated certificate, invoice, and report flows
- invariant blocks — must_always / must_never / transition
- Bounded verification with z3 (and deterministic fallback)
- carrier check --verify --fail-on-unknown as a CI gate
- Compliance bundles — HIPAA · FERPA · PCI-DSS · SOC 2
- Audit-chain verification (verify-audit-chain)
- service.runtime — depth limits, panic policy, ops_routes
- carrier harden --chaos --run --sandbox-db (Tank harness)
- carrier tune — local sizing advisor for prod runtime knobs
- carrier manifest audit — secrets, sizes, drift
- FHIR helpers — Questionnaire, Observation, Patient, Encounter
- Generated /fhir/* routes for the phase-1 resource set
- HL7v2 receive handlers + runtime coverage
- Module + recipe registry (org/name with semver, SBOM, lock)
- Recipes — vertical solution bundles + analytics packs
- carrier audit — provenance + OSV.dev advisories
- Forms — V3 runtime form promotion to native source
- carrier build --target rust — native binary, Tokio + Axum + sqlx
- carrier build --target java — Spring Boot 3.x service, JDBC + HikariCP
- carrier build --target node — Fastify dev server, ~200ms restart
- Same migration SQL across all three targets, byte-identical
- carrier build --compile-remote=true — SSH build server, rsync round-trip
- Carrier Cloud — carrier remote login / deploy / status / logs
- carrier deploy compose — docker-compose + Dockerfile
- carrier deploy k8s --multi-region — k8s manifests with HPA + PDB
- carrier deploy edge --target cloudflare | fastly — edge WASM
- Built-in tests, property tests, in-language eval blocks
- carrier agent-docs — project-local AGENTS.md + CLAUDE.md
Fast because it compiles. Tiny because there’s no runtime framework to carry.
Six identical APIs, one Postgres-backed GET /items endpoint, 30 seconds of 64-in-flight traffic. Carrier lands in the Go tier on throughput with a fraction of the memory of the managed-runtime stacks.
| Stack | RPS | p99 | peak RSS |
|---|---|---|---|
| Carrier™ (Rust-compiled) | 19,808 | 6.3 ms | 15 MB |
| Go · Gin | 21,259 | 6.3 ms | 38 MB |
| .NET · Minimal APIs | 18,377 | 7.0 ms | 221 MB |
| Spring Boot | 13,559 | 11.9 ms | 334 MB |
| Node · Fastify | 10,863 | 8.3 ms | 277 MB |
| Python · FastAPI | 2,805 | 76.6 ms | 54 MB |
Single host. Native processes, no Docker. Same 10k-row Postgres, same pool size, same client. See /benchmarks for methodology, charts for /health and /compute, and all three endpoints in full.
Built narrow, so the backend gets out of the way.
Most backend frameworks give you a generic language plus conventions. Carrier inverts that. The backend patterns that actually matter — routes, auth, CRUD, policies, transactions, jobs — are language-level constructs the compiler understands.
.carrier source tree compiles through lexer, parser, semantic analysis, IR, Rust codegen, and Cargo into a native service binary. Rust is an implementation detail.crud generates list, get, create, update, delete, and restore — with filters, sort, pagination, search, soft delete, and explicit scopes.action blocks open Postgres transactions, lock rows with get_for_update, and call auth, cache, jobs, audit, and typed external clients.policy declarations produce PostgreSQL RLS SQL and runtime session context for carrier.current_roles and carrier.current_tenant.idempotent and Carrier stores the JSON response in Postgres, short-circuiting retries with the same Idempotency-Key.job, event, and schedule give you durable async work, cron-driven fan-out, and audit-backed event records.Durable workflows, typed LLM tools, vector search, realtime streams.
Four language-level platforms sit alongside CRUD and actions. They compile the same way, share auth, policy, telemetry, and audit plumbing — and now feed into the 1.0 surface (RAG, agents, MCP, PDF, recipes, Carrier Cloud) below.
workflow CheckoutSaga { input: CheckoutRequest output: CheckoutResult timeout_seconds: 300 max_retries: 2 step reserve_inventory -> ReservationSummary retry { max_retries: 3 delay_seconds: 10 } { return Inventory.reserve(input.sku, input.quantity) } compensate reserve_inventory { Inventory.release(reserve_inventory.reservation_id) } step charge_card -> ChargeSummary { if input.simulate_failure { fail("checkout_failed", "card authorization declined") } return Payments.charge(input.payment_method, input.amount_cents) } compensate charge_card { Payments.refund(charge_card.charge_id) } step fulfill -> CheckoutResult after charge_card { return Fulfillment.ship( reservation: reserve_inventory.reservation_id, charge: charge_card.charge_id ) } return fulfill}fn search_help_docs(term: String) -> String[] { return [term, "billing", "password reset"]} action get_support_profile() -> MeResponse { let actor = auth.current_user() return { id: actor.id, email: actor.email, name: actor.name }} llm client SupportAgent { provider: env("LLM_PROVIDER", "openai") wire_format: env("LLM_WIRE_FORMAT", "openai") model: env("LLM_MODEL", "gpt-4.1-mini") api_key: env("LLM_API_KEY", "replace-me") max_turns: env_int("LLM_MAX_TURNS", 8) temperature: 0.2 system_prompt: "You are a concise support assistant." tool search_help_docs(term: String) -> String[] = search_help_docs tool get_support_profile() -> MeResponse = get_support_profile} route POST "/support/draft" protect Auth -> SupportTicketDraft { input: SupportReplyRequest handler { return SupportAgent.respond_as(SupportTicketDraft, { user_prompt: input.message conversation_id: input.conversation_id }) }}model Doc { id: UUID title: String body: String embedding: Vector(1536) @index(hnsw, metric: cosine) created_at: Time updated_at: Time} crud Doc at "/docs" { list: public get: public searchable { title body }} native fn embed_text(value: String) -> Vector(1536) = "embed_text" route POST "/docs/search" public -> DocHybridMatch[] { input: SimilarDocRequest handler { return Doc.hybrid_search( query: input.query, embedding: embed_text(input.query), limit: 20 ) }}service App { openapi { title: "App API" version: "0.9.0" } server { host: env("HOST", "0.0.0.0") port: env_int("PORT", 3000) } telemetry { provider: opentelemetry endpoint: env("OTEL_EXPORTER_OTLP_ENDPOINT", "") service_name: "app-api" protocol: otlp_http sampling: parentbased_ratio(0.1) }} route GET "/checkout" protect Auth -> CheckoutResult { handler { let actor = auth.current_user() trace.annotate({ actor_id: actor.id, tenant_id: actor.tenant_id }) metrics.counter("checkout.requests").increment({ tenant_id: actor.tenant_id }) return Checkout.place(input) }}retry_compensation.carrier_llm_conversations, realtime stream surface per client.Vector(N) columns, HNSW + IVFFlat indexes, generated similar_with_scores and hybrid_search helpers.stream · subscription · watch with WS → SSE → long-poll transport negotiation and tenant/workspace scoping.RAG, agents, api_explorer, native PDF, MCP servers, Carrier Cloud.
The 1.0 line keeps the same compiler-checked envelope and adds the surfaces production AI-friendly backends actually need: typed retrieval, typed agent budgets and routing, a built-in API explorer, native PDF rendering, MCP exposure, and one-command deploy targets.
rag SupportAnswerer { retriever: Doc.similar_with_scores embed_with: embed_text llm: SupportAgent context_window_tokens: 4000 rerank: score_threshold(0.7) top_k: 8} route POST "/support/answer" public -> String { input: SimilarDocRequest handler { let response = SupportAnswerer.respond(input.query) return response.text }}llm client SupportAgent { provider: "openai" wire_format: "openai" model: env("LLM_MODEL", "gpt-4.1-mini") api_key: env("LLM_API_KEY", "") max_tokens: 600 max_turns: 8 temperature: 0.2 budget_per_tenant_per_day_usd: 5.0 over_budget_behavior: downgrade("SupportAgentFallback") tool search_help_docs(term: String) -> String[] = search_help_docs} llm client SupportAgentFallback { provider: "openai" wire_format: "openai" model: "gpt-4.1-mini" api_key: env("OPENAI_API_KEY", "") max_tokens: 600 max_turns: 4 temperature: 0.2} llm client routed RoutedSupportAgent { primary: SupportAgent fallback: SupportAgentFallback route_by: cost_vs_latency(target_per_request_usd: 0.05) on_primary_outage: fallback on_rate_limit: fallback on_budget_pressure: fallback}api_explorer HospitalApi { upstream: service mount_target: full_panel collection AdmissionFlow { step admit { call: action admit_patient params: { input: { mrn: "TEST001", age: 65 } } capture { admission_id: response.id admitted_at: response.admitted_at } } step record_vitals { call: route POST "/vitals/{admission_id}" params: { admission_id: admission_id } input: { admission_id: admission_id, bp: "130/85", hr: 72 } assert: status == 200 && response.recorded_at > admitted_at } } safety { redact_pii: auto audit_every_request: true max_environment: dev_or_staging }}type CertificateContext { recipient_name: String completion_date: String instructor_name: String} route POST "/certificates/{recipient_name}" public -> String { handler { let ctx = CertificateContext { recipient_name: params.recipient_name completion_date: "April 23, 2026" instructor_name: "Niko Ma" } let pdf = pdf.render_svg_template( load_template("ryt200.svg"), ctx, "/tmp/certs/" + ctx.recipient_name + ".pdf", font_paths: ["/fonts/PlayfairDisplay.ttf"], resource_dir: "/tmp/cert-assets", title: "RYT-200 Certificate" ) let stored = blob.put(pdf.path, "certs/" + ctx.recipient_name + ".pdf", pdf.content_type) return blob.signed_url(stored.key, expires_seconds: 300, download_name: pdf.filename) }}Model.similar_with_scores), embedder, and llm client. Trim to context budget, optional rerank by score threshold.llm client routed wraps primaries + fallbacks with cost_vs_latency routing, budget_per_tenant_per_day_usd ceilings, and downgrade behavior on outage / 429 / 5xx.collection / step / assert / capture checks.pdf.render_html(...) for deterministic text-first PDFs; pdf.render_svg_template(...) for rich visual SVG-driven output with custom fonts and assets.# log in to Carrier Cloud$ carrier remote login --base-url https://cloud.carrierlang.com # reproducible HTTPS upload; poll until terminal state$ carrier remote deploy --service clinic-app --wait # live tail + open$ carrier remote status clinic-app$ carrier remote logs clinic-app$ carrier remote open clinic-app # k8s + edge targets for self-hosted stacks$ carrier deploy k8s --multi-region$ carrier deploy edge --target cloudflare.carrier/build/<svc> mcp. Actions become synchronous tools; workflows enqueue runs and return run_id. Schemas come straight from the Carrier compiler.carrier publish → carrier install with locked checksum, signature, provenance, and SBOM. Recipes ship vertical analytics packs.carrier compliance generate --standard hipaa writes evidence bundles backed by Carrier metadata and observed audit data. Hash-chain verification via verify-audit-chain.Node target, remote build, Tank hardening, SLAs, formal invariants, RN SDK.
The 1.x line keeps the same compiler-checked envelope and adds the surfaces production AI-friendly backends actually need: three codegen targets (Rust, Spring Boot, Node), SSH remote build, runtime depth limits + Flight Recorder, first-class SLAs, deterministic invariant verification, and a React Native SDK generator.
# production native Rust binary — Tokio + Axum + sqlx$ carrier build --target rust --release$ ./.carrier/build/clinic-app # Spring Boot service — Java 21, JDBC + HikariCP$ carrier build --target java --release$ java -jar .carrier/generated-java/target/clinic-app.jar # dev iteration target — Fastify + pg, ~200ms restart$ carrier build --target node$ node .carrier/generated-node/main.mjs # the migration SQL is byte-identical across all three targets# develop with node, ship to Rust or Spring Boot from the same source# rsync project up, run carrier on the build server, fetch artifacts$ carrier build --target rust --release --compile-remote=true # upload + remote build streams progress live; nothing is silent# the remote command always runs with --compile-remote=false (no recursion) # default rsync excludes: target/, .carrier/, node_modules/, .git/,# .env, .env.*, secrets/, credentials/, service-account*.json# Carrier never ships your .env filesservice App { openapi { title: "Tank-Hardened API" version: "1.0.0" } runtime { request_depth_limit: 32 action_depth_limit: 16 workflow_depth_limit: 16 expression_depth_limit: 64 json_body_depth_limit: 16 schema_expansion_depth: 16 body_size_limit: 2_megabytes artifact_size_limit: 50_megabytes request_timeout_ms: 5_000 panic_policy: catch evidence: emit_when_explicitly_enabled ops_routes: local_only }}# 1. local sizing advisor$ carrier tune --profile production# writes .carrier/tune.json + .carrier/tune.runtime.carrier (copy-ready) # 2. budgets + verification + invariant proofs + tests$ carrier check --verify --profile production --fail-on-unknown # 3. attack harness — health/auth/depth/oversize/concurrency probes$ carrier harden --chaos --run --sandbox-db# spawns the binary on loopback, mints tenant A/B JWTs,# probes isolation, drops the owned database after probes # 4. live evidence + Flight Recorder$ curl -s http://127.0.0.1:4000/ops/flight?request_id=... | jqverification { solver: z3 mode: bounded max_records: 1 max_workflow_depth: 10 timeout: 30_seconds} invariant InventoryNeverNegative { subject: InventoryItem must_always: quantity_on_hand >= 0} invariant LabResultRequiresReviewer { subject: LabResult transition: status -> "reviewed" requires: reviewed_by != ""} invariant NoProviderOverlap { subject: Appointment must_never: exists other Appointment where other.provider_id == provider_id && overlaps(other.start_slot, other.end_slot, start_slot, end_slot)} assume StripeDoesNotOverRefund { external: stripe.refund guarantees: refund.amount <= charge.remaining_refundable_amount}sla SepsisBundle { workflow: AdmitSuspectedSepsis starts_when: step_started("RecordVitals") ends_when: step_completed("CompleteBundle") attainment: 95% deadline: 4_hours warning_at: 80% breach_at: 100% scope: tenant measure_by: calendar_month escalation: notify(role: "charge_nurse") on breach_imminent compliance_evidence: attach_to_audit report: include_in("ClinicalQualityDashboard") exclude_when: field("comfort_care_only") == true}auth jwt AdminAuth { issuer: env("JWT_ISSUER", "carrier") audience: env("JWT_AUDIENCE", "carrier-users") secret: env("JWT_SECRET", "local-dev-secret") jwks_url: env("JWT_JWKS_URL", "") roles_claim: "roles" roles { super_admin includes [admin] admin includes [editor, viewer] editor includes [viewer] }} route POST "/orgs/{id}/archive" protect AdminAuth all_roles [admin, compliance_officer] -> Org{ params { id: UUID } handler { return Org.archive(params.id) }}# manifest-driven React Native SDK — no recompile needed$ carrier check$ carrier sdk react-native --output mobile/carrier-sdk # generated package exposes:# createCarrierSdk(...) low-level fetch client# createTokenSession(...) JWT/session hook# CarrierMutationQueue persisted offline queue (idempotency keys)# useCarrierQuery(...) React hooks layered on top# useCarrierMutation(...)# useCarrierSubscription(...) typed realtime helpers # offline queue guarantees:# queued writes survive restart (with a storage adapter)# deterministic replay ordering# stable Idempotency-Key per write# bounded retry backoff# conflicts + poison items stay visible to the app[remote_build] in carrier.toml + an SSH host. Carrier rsyncs up, builds, fetches artifacts back. Excludes .env, target/, node_modules/ by default.harden --chaos --run --sandbox-db spawns the binary on loopback, mints tenant A/B JWTs, runs health/auth/depth/oversize/concurrency probes, drops the owned DB.invariant + verification + assume compile to deterministic bounded checks. z3 when on PATH, else a deterministic fallback.A real compiler, not a macro wrapper over a web framework.
Each stage has a clean responsibility and lives in its own crate. Carrier separates language surface from runtime, so the generated Rust service stays boring and reviewable.
.carrier files under src/. Every file compiles together, sorted by path..carrier/generated/ holds the Rust service, migrations, and the machine-readable manifest..carrier/build/<binary> is a native service. Tokio async server, /health, /ready, /openapi.json, /docs.Thirty-three top-level constructs. That’s the whole surface.
Carrier’s entire declaration surface fits on one screen. Every one of these is implemented in the 1.3.4 release candidate. Scope is the feature.
/// Transaction-safe admin action with row lockingaction audit_locked_doctor(id: UUID) -> Doctor { let actor = auth.current_user() transaction { let locked = Doctor.get_for_update(id: id, scope: "all") logs.info("doctor lock audit", { action_name: "audit_locked_doctor" doctor_id: locked.id actor_email: actor.email }) } return Doctor.get(id: id, scope: "all")} /// Idempotent admin route; retries return the stored responseroute POST "/admin/doctors/{id}/lock" protect AdminAuth roles [admin] idempotent -> Doctor{ params { id: UUID } handler { return audit_locked_doctor(params.id) }}policy AppointmentSlot { tenant_field: org_id read: roles [viewer, scheduler] write: roles [scheduler] deleted: roles [scheduler]} model AppointmentSlot { id: UUID org_id: String @index clinician_name: String @length(min: 3, max: 120) starts_at: Time status: SlotStatus = open version: Int @version deleted_at: Time? created_at: Time updated_at: Time}Postgres-first. Jobs, cache, idempotency, RLS — built in.
Generated services depend on the Carrier runtime for the boring, load-bearing parts you’d otherwise rebuild per project.
get_for_update, optimistic @version, and explicit scopes for soft-deleted records.policy compiles to PostgreSQL ENABLE ROW LEVEL SECURITY. Per request, the runtime sets carrier.current_roles and carrier.current_tenant.cache.get_as, cache.set, redis.publish. Uses Redis when REDIS_URL is healthy, otherwise an in-memory fallback.idempotent. Replays with the same Idempotency-Key return the stored response body without re-running the handler./openapi.json, /docs, and a first-class .carrier/manifest.json of declarations — AI-friendly, tooling-friendly.route GET "/search/doctors" public -> DoctorListResponse { query { q: String? specialty: String? city: String? country: String? page: Int = 1 per_page: Int = 20 sort: String = "rating" direction: String = "desc" scope: String = "active" } handler { let key = "doctor-search:" + json.stringify({ q: query.q, city: query.city, page: query.page }) if cache.exists(key) { return cache.get_as("DoctorListResponse", key) } let result = Doctor.search( q: query.q, city: query.city, page: query.page, per_page: query.per_page, sort: query.sort, direction: query.direction, scope: query.scope ) cache.set(key, result, ttl_seconds: 120) emit DoctorSearchCached { cache_key: key, scope: query.scope } return result }}event SlotReminderQueued { slot_id: UUID trigger: String} job send_slot_reminder(payload: Json) -> Void { logs.info("slot reminder job", { job_name: "send_slot_reminder", payload: payload }) audit.record("send_slot_reminder", "AppointmentSlot", "scheduled", payload)} schedule "*/15 * * * *" run send_slot_reminder route POST "/slots/{id}/notify" protect StaffAuth roles [scheduler] idempotent -> Json{ params { id: UUID } handler { let job_id = jobs.enqueue("send_slot_reminder", { slot_id: params.id }, delay_seconds: 5) emit SlotReminderQueued { slot_id: params.id, trigger: "manual" } return { job_id: job_id } }}- Declarations
- 33
- top-level constructs
- Built-ins
- auth · logs · cache · redis · audit · sql · db · jobs · flags · workflows · trace · metrics · pdf · blob · template · rag · math · finance · time · crypto · http
- typed namespaces
- Artifacts
- manifest · OpenAPI · migrations · OTLP · MCP · k8s · edge · binary
- Targets
- Carrier Cloud · Compose · k8s · Cloudflare · Fastly
- carrier deploy / remote
1.3.4 is the release candidate. 1.0 is a promise, not a rewrite.
The 1.0 surface is anchored by a written stability policy, fixture-based manifest/OpenAPI drift tests in CI, and a documented 1.x upgrade guarantee.
fail(code, message) shape.llm client grammar and runtime helpers, benchmark harness internals.carrier check → carrier migrate generate / up. No hand-edits to .carrier source or checked-in migrations.Precise enough for humans. Constrained enough for agents.
Carrier’s advantage isn’t maximal language power. It’s that the backend surface is small, explicit, and compiler-checked — exactly the shape that lets code generators stay consistent across a project.
.carrier/manifest.json with models, routes, policies, jobs, schedules, and clients. Tools read it instead of scraping source.carrier check runs the full semantic pass: type errors, CRUD misuse, auth/policy validation, invalid idempotency scope, and more.00_models, 10_types, 20_actions, 30_routes) keeps generation order stable across agents.// docs/ai-authoring.md — fast generation recipe1. write carrier.toml2. declare one service3. add auth jwt if any route is protected4. create enum used by models or query defaults5. create model declarations6. create type declarations for I/O and pagination7. add crud for resource-like models8. add policy for role or tenant visibility9. add action for real business writes10. add custom route11. add job / event / schedule only when needed12. add client for outbound integrations13. add pure fn helpers lastFour checked-in examples. Ladder from minimal to platform.
Every example in the repository compiles today. They’re ordered so you can learn the language by walking up the ladder.
Single-file 0.9 showcase: workflows, LLM tools, vectors, queues, tenants, flags, tests.
Recommended multi-file production shape with role-only policy.
Tenant-aware slots, optimistic @version, jobs, events, schedules.
Full platform showcase: cache, SQL, DB functions, clients, audit.
/// Admin reporting endpoint using raw SQL mapped into a typed result listroute GET "/reports/doctors/by-city" protect AdminAuth roles [admin] -> DoctorCityReportRow[]{ handler { return sql.list_as( "DoctorCityReportRow", "select city, count(*)::bigint as total
from doctors
where deleted_at is null
group by city
order by total desc, city asc" ) }}client WeatherApi { base_url: env("WEATHER_API_URL", "https://api.example.com") header "x-api-key": env("WEATHER_API_KEY", "") timeout_ms: 3000} type WeatherResponse { city: String temperature_c: Float condition: String} route GET "/weather/{city}" public -> WeatherResponse { handler { return WeatherApi.get("/forecast", query: { city: params.city }) }}From zero to a native binary in three commands.
The compiler workspace is a Rust project; Carrier services compile through it.
$ cargo test$ cargo run -p carrierc -- --helpBuild and test the compiler. The carrierc CLI scaffolds projects, type-checks .carrier sources, generates Rust + OpenAPI + migrations, and drives build, run, and dev.
# new project, then in the project root:$ carrier check$ carrier build$ carrier run # or ./.carrier/build/<binary>$ carrier openapi > openapi.json$ carrier migrate generateWorks identically across every example in the repo — hello-carrier, inventory-control, booking-service, and the flagship api/.
transaction { } opens a real DB transaction. return inside the block is not supported yet — return after the block closes.Fast, secure APIs with less code.
Compiled, not configured.
Read the language reference, review the benchmark numbers, walk the examples, and ship a native service binary.