C++ runtime with multi-tier tracing JIT.
AOT compile to native binaries. 2–5× faster than Python.
Zero dependencies. Runs everywhere.
Everything you need to build fast
use http; and go.Real Neutron code
use http;
fun handler(req) {
say("${req.method} ${req.path}");
if (req.path == "/") {
return "Hello from Neutron!";
}
return { "status": 404 };
}
var server = http.createServer(handler);
http.listen(server, 8080);
class Animal {
var name;
init(n) {
this.name = n;
}
fun speak() {
say("${this.name} says hi");
}
}
var cat = Animal();
cat.init("Whiskers");
cat.speak();
use http;
use json;
var res = http.get(
"https://api.github.com/users/yasakei"
);
var user = json.parse(res.body);
say("Name: ${user.name}");
say("Repos: ${user.public_repos}");
fun status(code) {
match (code) {
case 200 => say("OK");
case 404 => say("Not Found");
case 500 => say("Error");
default => say("Unknown");
}
}
status(200); // OK
status(404); // Not Found
No npm install needed
Available for all major platforms