Getting started
From nothing to a live HTTP endpoint in about two minutes. A rusted function is one JavaScript file; the platform gives it a URL, a sandbox, and hard limits.
1 · Install the CLI
curl -fsSL https://raw.githubusercontent.com/iluxav/rusted/main/install.sh | sh
Prebuilt binaries cover Apple Silicon and Linux (x86_64 and arm64). Anywhere else: cargo install --path crates/rusted-cli from a source checkout.
2 · Sign in
rusted login
The CLI prints a short code and a URL. Open it, approve once with GitHub, and the CLI stores the API key it is granted in ~/.config/rusted/credentials.json (owner-readable only). Nothing to copy — and the key appears in the console's API keys page like any other, so you can revoke it if you lose the machine.
3 · Create a function
rusted new hello --js
cd hello
That scaffolds a ready-to-run directory. index.js is a complete function already:
export const http = { name: "hello", methods: ["POST"] };
export default async function handler(request, context) {
const { name } = await request.json().catch(() => ({}));
return context.json({ message: `Hello, ${name ?? "world"}` });
}
The optional access field in the http export decides who may call the URL. Undeclared, it follows the server — on rusted.sh that means open to anyone. access: "private" demands one of your API keys on every call, even here; access: "public" keeps it keyless even on a self-hosted server running --require-auth — what a webhook target or OAuth callback needs, since the third party calling it cannot present your key.
Develop it locally first if you like — rusted run index.js serves it at http://127.0.0.1:7400/f/hello with hot reload, no server or database needed. When it works:
rusted push index.js
→ deployed hello (rev 1) at https://rusted.sh/f/hello
4 · Call it
curl -X POST https://rusted.sh/f/hello -d '{"name":"Ada"}'
→ {"message":"Hello, Ada"}
That URL is live for anyone (unless the function declares access: "private"), rate-limited and sandboxed under your plan. Every invocation is recorded — rusted logs hello shows outcomes, timings, and your console.log output; the console dashboard shows the aggregates.
Where to next: the CLI reference for the full command set, the module reference for every field a function can declare, the runtime reference for what code finds when it runs, security for secrets and environments, the database for relational app data, web apps for Express-style routes and server-rendered pages, inboxes to receive webhooks and callbacks without hosting a receiver, MCP to serve tools to AI models, or AI agents if a model is the one doing the building.
rusted