A focused DSL (domain-specific language) for building REST APIs. No imports, no framework setup, no connection boilerplate. The route reads like the behavior it describes.
Reference a type anywhere without importing it, and reach databases, caches, and queues through native namespaces. There are no packages to add and no connection code to write.
export schema NewAccount
owner: stringroute POST "/accounts" take payload as NewAccount
account = doc.accounts.save({ owner: payload.owner, balance: 0 })
reply 201, account
route GET "/accounts/:id"
account = doc.accounts.find(params.id)
require account else fail 404, "account not found"
reply 200, accountRoutes, schemas, validation, and providers are built into the language.
Brazilian Portuguese for sledgehammer, the heavy tool that breaks through whatever is in the way.
The name stays in Portuguese on purpose: it keeps the project's Brazilian origin instead of hiding it behind a generic English brand. And the metaphor is the whole point. A focused tool that breaks through boilerplate to reach the code that actually describes your API.
Marreta Lang began as a research project at TM Dev Lab, set out to prove three hypotheses at once, all validated in experiments.
Efficient consumption, especially in containerized environments, with a predictable footprint that stays small under load.
The HTTP hot path is validated by experiments and shaped by profiling, not guesswork. Strong performance for real services.
SQL, NoSQL, messaging, cache, HTTP and OpenAPI without redoing the same infrastructure boilerplate, with zero project dependencies.
Running things in parallel usually means threads or callbacks. Here it is the broadcast
operator, *>>: it fans a value
out to several branches at once, and gathers their results in order.
export task load_profile(id) => http_client.get("https://api/users/#{id}")
export task load_orders(id) => http_client.get("https://api/orders/#{id}")route GET "/users/:id"
data = params.id *>>
-> users.load_profile
-> users.load_orders
reply 200, { profile: data[0], orders: data[1] }The route reaches the tasks with no import, and the branches run at the same time.
Pick a provider, set the host and credentials in marreta.env, and use it. No imports.
| Capability | Namespace | Backend |
|---|---|---|
| Relational database | db.* | PostgreSQL |
| Document database | doc.* | MongoDB |
| Cache | cache.* | Redis |
| Queues & topics | queue / topic | RabbitMQ |