Just going through the hello world at https://neon-bindings.com/docs/hello-world
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
AJ ONeal 46a9917dc3 remove cruft 5 anos atrás
lib initial commit 5 anos atrás
native remove cruft 5 anos atrás
.gitignore initial commit 5 anos atrás
README.md update examples and docs 5 anos atrás
example.js update examples and docs 5 anos atrás
package.json initial commit 5 anos atrás

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

  1. Install Node.js.
  2. 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
  1. Install Rust
  2. 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