Git Product home page Git Product logo

node-api's Introduction

Node-API Build Status

Using this crate, you'll be easily able to write native node modules in Rust!

Design

I opted for using the new stable, vm-agnostic node api. It is still in an experimental stage and will probably change quite a bit. However, there are plenty of good reasons for using it:

  • it's a plain C api, making the creation of Rust bindings a breeze
  • once it's stable, ABI compatibility between node versions will make life for module maintainers easy
  • the VM agnostic nature of the API enables use on more platforms (ChakraCore, SpiderMonkey)

Furthermore, this crate will make writing asynchronous modules much easier. Due to the nature of NodeJS' event loop, there is almost no point in providing synchronous native modules. Native modules either do

  • compute-intensive work, in which case operations have to be performed in their own thread
  • operations involving IO

In both cases, it's undesirable to block the node event loop. Unfortunately, that's what most binding generators focus on. This crate uses futures-rs to make writing asynchronous modules for compute or IO tasks much easier.

Usage

This is a cargo workspace. Simply run cargo build --all

Status

pre-alpha, some parts work in a proof-of-concept way, but the crate cannot be consumed yet.

License

MIT

node-api's People

Contributors

jupp0r avatar hoodie avatar

Stargazers

伊撒尔 avatar vidy avatar Ja Nakh avatar Ishan Marikar avatar Amila Welihinda avatar Cheng JIANG avatar Will Franzen avatar Zheyu Zhang avatar Lisez Su avatar Pietro Paolo Vismara avatar Adaline Valentina Simonian avatar Victoria Brekenfeld avatar  avatar Rust avatar S.Y. Lee avatar  avatar Christoph Grabo avatar MarkTang avatar James Yang avatar 秋_ avatar David Cai avatar zhangjx avatar libchaos avatar xiaoyi avatar Fangdun Tsai avatar chai2010 avatar Amio Jin avatar wei avatar Pana avatar 狼叔 avatar Mike Vegeto avatar Ingvar Stepanyan avatar  avatar

Watchers

 avatar James Cloos avatar nswbmw avatar David Cai avatar Amila Welihinda avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.