This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
66 lines (49 loc) · 2.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
layout: home
---
<section id=hero>
<div id=hero-wrapper><img id=hero-background src="hero.jpg"></div><img id=logo src="logo.png"><h2>Rust <span class=unicode-heart>❤</span> Node</h2>
</section>
<!--
<img id=construction src="construction.png">
-->
<section class=body id=hack-without-fear>
<div class=contents>
<h1>Don’t Let Node Plugins Scare You!</h1>
<p id=overview>Neon makes writing native Node.js modules safe and fun, so you can <strong>hack without fear</strong>.</p>
<p id=wip-fine-print>(Work in progress! See the <a href="https://github.com/neon-bindings/neon/issues/144">safety checklist issue</a> to track our progress.)</p>
<pre id=console><span class=comment># Install the Neon CLI.</span>
<span class=prompt>$</span> npm install --global neon-cli
<span class=comment># Create a new project!</span>
<span class=prompt>$</span> neon new my-project</pre>
</div>
</section>
<section class=body id=crash-free-memory-management>
<div class=contents>
<h1>Crash-Free Memory Management</h1>
<p>Neon works together with the JS garbage collector so allocations are always properly managed.<p>
<pre><span class=kw>fn</span> <span class=fn>hello</span>(call: Call) → JsResult<JsString> {
<span class=comment>// safely tracked throughout this function!</span>
<span class=kw>let</span> val = JsString::<span class=fn>new</span>(call.scope, <span class=str>"hello, Node"</span>)
.<span class=fn>unwrap</span>();
<span class=comment>...</span>
Ok(val)
}</pre>
</div>
</section>
<section class=body id=easy-parallelism>
<div class=contents>
<h1>Easy Parallelism</h1>
<p>Safely run multiple threads, which is easy with convenient Rust APIs like <a href="https://github.com/nikomatsakis/rayon">Rayon</a>.<p>
<pre>lines.<span class=fn>into_par_iter</span>() <span class=comment>// iterate in parallel</span>
.<span class=fn>map</span>(|line| <span class=fn>wc</span>(line, word)) <span class=comment>// count words for each</span>
.<span class=fn>sum</span>() <span class=comment>// calculate the total</span></pre>
</div>
</section>
<section class=body id=learn-more>
<div class=contents>
<h1>Learn More</h1>
<p>Neon is a work in progress. Watch this talk to learn more about the state of the project:</p>
<iframe width="640" height="380" src="https://www.youtube.com/embed/jINMIAicaS0" frameborder="0" allowfullscreen></iframe>
</div>
</section>