Just going through the hello world at https://neon-bindings.com/docs/hello-world
Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
AJ ONeal
46a9917dc3
|
vor 5 Jahren | |
---|---|---|
lib | vor 5 Jahren | |
native | vor 5 Jahren | |
.gitignore | vor 5 Jahren | |
README.md | vor 5 Jahren | |
example.js | vor 5 Jahren | |
package.json | vor 5 Jahren |
README.md
hello
I wanted to try out neon (rust bindings for node.js), so I started reading the neon guide and spun this up as my playground.
There's probably not too much interesting here,
but if you look in native/src/lib.rs
you'll see
the examples I've been trying out.
npm install -g neon
git clone https://git.coolaj86.com/coolaj86/hello.neon.js.git
pushd hello.neon.js/
neon build --release
node
var hello = require('.');
console.log(hello);
hello.any();
node example.js
How I made this
- Install Node.js.
- Install build tools
- macOS: XCode and
xcode-select install
(CLI Tools) - Windows:
npm install --global --production windows-build-tools
- Ubuntu:
sudo apt install -y build-essential
- Install Rust
- Install neon; Create (and rename) project
npm install --global neon-cli
neon version
neon new hello.neon
mv hello.neon hello.neon.js
pushd hello.neon.js
neon build
Then I just followed along in the docs and the examples