• #Rust2018: A Neon Wish List

    While I’ve been thoroughly enjoying the Rust community’s spirited #Rust2018 blog-fest, I wasn’t really thinking of participating myself until Julia Evans pointed out the leadership wants to hear from everyone—even if I might not have anything especially new to add. So here’s my little wish list for Rust in 2018.

    Since I’m not in Rust’s leadership, I don’t have to worry about synthesizing some grand narrative for the whole of Rust. So I’ll just focus on a few things that would be personally useful to me. In particular, I’ll stick to topics that would be helpful for my Neon project, a set of bindings for writing native Node extension modules in Rust.

    Read on →

  • Neon Wants Your Help!

    My history with Rust goes back a long way. But it was when I really started to understand its enabling potential, its capacity to empower whole groups of people to do things they couldn’t do before, that I just had to find a more direct way to get involved with making that promise a reality.

    I decided that the best way I could help widen the on-ramp to Rust was to create Neon: a library for conveniently implementing native Node.js modules with Rust instead of C/C++. With Neon, JavaScript programmers can get access to all the power that Rust offers: high-performance native code, convenient multithreading, freedom from memory faults and data races, and access to native libraries and the Cargo ecosystem. And they can do this without throwing away their working apps or existing expertise. In short, my goal with Neon is to make it easy for JavaScript programmers to “dip their toe” into Rust without diving straight into the deep end.

    We’ve made some great progress recently, with some cool new features including Electron support and a new Task API for asynchronously spawning Rust computations to run in a background thread. But Neon is still a young project, and could use your help to take it to the next level! Neon is still primarily built by me and a small set of contributors, so I’m looking for contributors with a wide range of skills and interests who can join us to take Neon to the next level and eventually grow into a project leadership team. I think we’re onto something exciting here: a chance to build bridges between the JavaScript and Rust worlds and to create opportunities for aspiring new systems programmers. And I hope you’ll consider being a part of it!

    Read on →

  • Native JS Classes in Neon

    Last weekend I landed a PR that adds support for defining custom native classes in Neon. This means you can create JavaScript objects that internally wrap—and own—a Rust data structure, along with methods that can safely access the internal Rust data.

    As a quick demonstration, suppose you have an Employee struct defined in Rust:

    pub struct Employee {
        id: i32,
        name: String,
        // etc ...

    Read on →