benjcal / neon-init

Simple script to add the excellent neon-bindings to an existing node.js app

Home Page:https://example.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neon-init

Simple script to add neon rust bindings to an existing node app

Installation

curl https://raw.githubusercontent.com/benjcal/neon-init/master/neon-init.sh -s | bash

warning: Right now the script is a little aggresive, it creates native/ on the root of the application and modifies package.json without asking.

Usage

The Rust source code is at native/src/lib.rs

Run npm run neon-build to compile the Rust scource code

Sample JS file:

const addon = require('./native')

console.log(addon.hello())

The script is simple and there's not a lot of things that can go wrong, but still use this under your own responsability and always git commit before!

Enjoy! 😃

Neon Documentation

Rust Documentation

Node Documentation

About

Simple script to add the excellent neon-bindings to an existing node.js app

https://example.com


Languages

Language:Shell 75.6%Language:Rust 24.4%