The website and docs for neon
git clone https://github.com/neon-bindings/website
cd website
yarn
yarn start
# Styles
yarn styles
yarn styles --watch
For details, see the docusarus docs
The Neon website
Home Page: https://neon-bindings.com
License: MIT License
The website and docs for neon
git clone https://github.com/neon-bindings/website
cd website
yarn
yarn start
# Styles
yarn styles
yarn styles --watch
For details, see the docusarus docs
When looking on the main site, the link to the demo shows this:
And when clicking the link, it shows a page that reads "All unclaimed recordings (the ones not linked to any user account) are automatically archived 7 days after upload."
The docs are not detailed enough and are very 'example-based'. The need to discuss the details of Neon more. They should be modeled after Rust's docs
I'm a bit confused by the example that lets you call a JS function within Rust. Having a heck of a time comprehending the
Calling JS functions
section located at https://neon-bindings.com/docs/functions. Keep in mind I'm early in my Rust learnings (so bear with me).
.is_a()
FunctionContext
MethodContext
vm::*
TypeError
s, RangeError
s, and Error
scx.borrorw_mut
cx.exceute_scoped
Some good examples would be:
https://github.com/nodejs/node-addon-examples
Ideally, we could have a neon example for each example
Document configs for the following files
.gitignore
: should ignore target
.editorconfig
: 4 spaces for toml and rs extensions.travis.yml
appveyor.yml
It expired a while ago. A new one should be made
https://amilajack.github.io/neon-docs/docs/en/word-counting-guide
References vm::lock
, which was removed from the API
Use Volta repo as example
Using eslint-config-bliss
and eslint-config-airbnb
// --snip--
method poll(mut cx) {
let cb = cx.argument::<JsFunction>(0)?;
let this = cx.this();
let events = cx.borrow(&this, |emitter| Arc::clone(&emitter.events));
let emitter = EventEmitterTask(events);
emitter.schedule(cb);
Ok(JsUndefined::new().upcast())
}
// --snip--
Taken from neon-bindings/neon#386
On this page, there's a link to a supposed "Handles and Memory guide" at https://neon-bindings.com/handles-and-memory/
, but that link doesn't work.
I've not read the documentation exhaustively yet, but at a glance I couldn't identify any existing pages that include this topic. Was this guide removed, or did it simply never exist? It seems like a pretty crucial topic to me :)
The project homepage says "this recording has been archived" at the bottom for the asciinema thing.
In the Hello World guide, the link to the Electron app guide (3rd paragraph, last sentence), points to this broken link. I think it's supposed to point here.
These kinds of examples will make it easier for JS programmers to see JS concepts map to Rust and Neon concepts
// JS
function foo() {
let t = true;
this.modified = t
return undefined
}
// neon equivalent
pub fn require_object_this(mut cx: FunctionContext) -> JsResult<JsUndefined> {
let this = cx.this();
// Downcast `this` so .set can be called on it
let this = this.downcast::<JsObject>().or_throw(&mut cx)?;
let t = cx.boolean(true);
// Equivalent to `this.modified = true` in JS
this.set(&mut cx, "modified", t)?;
Ok(cx.undefined())
}
The documentation at https://neon-bindings.com/docs/json has "JSON" as its title, but the contents of the page don't actually have anything to do with JSON (which is a separate language from JS entirely); rather, they're about serializing/deserializing JS data structures.
I'd suggest that "Data structures" is probably a better title for this page.
I'd create a PR, but unfortunately it seems that simply renaming json.md
and its metadata will result in the original https://neon-bindings.com/docs/json
URL breaking, and I'm not sure how redirects are handled in this setup.
to_vec
cx.borrow(this, |contents| { ... })
let body = cx.borrow(&body, |contents| contents.as_slice());
See https://rust-bindings.slack.com/archives/C0H978T55/p1532463490000347
neon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.