Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.
Rust agent-skillsclaude-codeclicode-migrationcodexffigolangjavajavascriptmcpmigrationnapiperformanceportingpyo3pythonrewriterubyrusttypescript
import express from "express";
const app = express();
const prefix = process.env.API_PREFIX ?? "/api";
app.get("/health", (_req, res) => res.send("ok"));
app.get("/users/:id", getUser);
app.post("/users", createUser);
app.delete("/users/:id", removeUser);
app.get(`${prefix}/status`, status);
function getUser(_req: unknown, res: { send(s: string): void }) {
res.send("user");
}
function createUser(_req: unknown, res: { send(s: string): void }) {
res.send("created");
}
function removeUser(_req: unknown, res: { send(s: string): void }) {
res.send("removed");
}
function status(_req: unknown, res: { send(s: string): void }) {
res.send(process.env.STATUS_TEXT ?? "up");
}
app.listen(Number(process.env.PORT ?? 3000));