Skip to main content
// JavaScript
const URL = "https://jsonplaceholder.typicode.com/todos";

async function todos() {
  return (await fetch(URL)).json();
}
module.exports = todos;
// Neon
const URL: &str = "https://jsonplaceholder.typicode.com/todos";

#[neon::export(json)]
async fn todos() -> Result<serde_json::Value, Error> {
    Ok(reqwest::get(URL).await?.json().await?)
}

[object Object]Simple tooling.

No build scripts. No finicky system dependencies. Just Node and Rust.

[object Object]Guaranteed safety.

If a Neon module compiles, it is guaranteed by the Rust compiler to be memory-safe.

[object Object]Easy parallelism.

Safely run multiple threads—without data races.