Home

Awesome

<p> No VM. No Bytecode. No packaging. No Garbage Collector. Fully compiled to native binaries. </p>

NectarJS becomes Nerd

Compile JavaScript and NerdLang in native binaries.

What is NerdLang

NerdLang is a substract of JS with some additions, focus on efficiency.

Nerd is a JavaScript native compiler aiming to make JavaScript universal, Nerd is able to compile native apps for Windows, Mac, Linux, iOS, Android, Raspberry, STM32 and more.

Nerd is in active development, join us on Discord if you need more information.

Main objectives

Get started

Installation

Install GCC/CLang for your platform

You can also install Linux for Windows and use a linux system on Windows

You need MinGW with POSIX threads

You can check your installation with npm start njs_test

Usage

Simplest way to use Nerd:

nerd file.js / file.ng

The output file name will be automatically chosen regarding the target. You can specify another output with -o something.out

You can select a preset

nerd file.js --preset [none|speed|size]

You can also run the compiled executable just after compilation using --run:

nerd file.js --run

You can enable the quiet mode with --quiet:

nerd file.js --quiet

Changing the stack size (useful on Windows):

nerd --stack 10000000 flood.js

For more informations about compilation output, use --verbose

For help, use --help

Benchmarks

Compiled with GCC v10.2.0 on Windows

NodeJS v12.8.1QuickJS 2020-07-05Nerd v0.6.104
sort(1e6) [No preset]
- Time:0.33s-0.33s
- Memory:7.0Mb-1.0Mb
- Filesize:28.6Mb-424Kb
sort(1e6) [+Size preset]
- Filesize:28.6Mb-260Kb
sort(1e6) [+Speed preset]
- Time:0.33s-0.20s
matrix(256) [No preset]
- Time:0.33s-0.21s
- Memory:7.0Mb-1.0Mb
- Filesize:28.6Mb-405Kb
matrix(256) [+Size preset]
- Filesize:28.6Mb-251Kb
matrix(1e6) [+Speed preset]
- Time:0.33s-0.11s

Supported platforms

Actively tested for

Development

This project is in heavy development and a lot features are not implemented yet.

ECMAScript Support

Nerd already supports more than 80% of ES3.

<details> <summary>Prototype</summary> <br> </details> <details> <summary>Array</summary> <br> </details> <details> <summary>Class</summary> <br> </details> <details> <summary>Console</summary> <br> </details> <details> <summary>JSON</summary> <br> </details> <details> <summary>Math **(DONE)**</summary> <br> </details> <details> <summary>Object</summary> <br> </details> <details> <summary>performance</summary> <br> </details> <details> <summary>String</summary> <br> </details> <details> <summary>Syntax</summary> <br> </details>