Zurück zum Ranking

NerdLang/nerd

C++nectarjs.com

🔱 Javascript's God Mode. No VM. No Bytecode. No GC. Just native binaries.

jsarduinoraspberrycompilationnodejswasm
Sterne-Wachstum
Sterne
3.6k
Forks
124
Wochenwachstum
Issues
16
1k2k3k
Jan. 2017März 2020Mai 2023Juli 2026
README

No VM. No Bytecode. No packaging. No Garbage Collector. Fully compiled to native binaries.

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

  • Supporting EcmaScript 3 standard (then 5, 6 ...)
  • Supporting NodeJS and NPM ecosystem
  • Supporting a maximum of platforms (Windows, Mac, Linux, Android, Arduino, ...)
  • Being secure
  • Embeding debuging tools
  • Compile everything that can be transpiled in JS: Ruby (Opal), Python (Transcript, Brython, JavaScrypthon), TypeScript ...

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

  • Linux / FreeBSD Install it with your distro (apt install gcc, yum install gcc, ...). You can use GCC, CLANG, as well as any derivative of those compilers (arm-gcc ...)

  • Apple iOS Install xCode and you are ready.

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

  • Need update

Compiled with GCC v10.2.0 on Windows

NodeJS v12.8.1 QuickJS 2020-07-05 Nerd 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
  • Some code can be evaluated compile-time

Supported platforms

Actively tested for

  • Windows
    • win-x86-32
    • win-x86-64
  • Linux
    • linux-x86-32
    • linux-x86-64
    • linux-arm32v7
  • Arduino
    • arduino-nano
    • arduino-uno
    • arduino-mega1280
    • arduino-mega2560
  • STM32 Nucleo
    • nucleo-l152re
    • nucleo-l432kc
    • nucleo-f446re
  • Mobile
    • android
  • Web
    • wasm
    • wast
    • asm-js
  • macOS
  • Sun OS

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.

Prototype
  • .call()
  • .bind()
Array
  • .length
  • .push(value)
Class
  • constructor
  • methods
  • static methods
Console
  • .log(variadic)
JSON
  • .parse(str)
  • .stringify(obj)
Math **(DONE)**
  • [All static methods and constants]
Object
  • .keys
performance
  • timeOrigin
  • .now()
String
  • .length
  • .toString()
  • .indexOf(needle)
  • .lastIndexOf(needle)
  • .search(needle)
  • .slice(start, end)
  • .substring(start, end)
  • .substr(start, end)
  • .replace(needle, str)
Syntax
  • for
  • while / do while
  • if / else if / else
  • try / catch / finally
  • function / lambda
  • class
  • new
  • typeof
  • instanceof
  • undefined
  • null
  • Infinite
  • NaN / isNaN
  • true / false
Ähnliche Repositories
nodejs/node

Node.js JavaScript runtime ✨🐢🚀✨

JavaScriptnpmOthernodejsjavascript
nodejs.org
118.4k36.2k
Asabeneh/30-Days-Of-JavaScript

30 days of JavaScript programming challenge is a step-by-step guide to learn JavaScript programming language in 30 days. This challenge may take more than 100 days, please just follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

JavaScriptnpm30daysofjavascriptjavascript-for-everyone
46.6k10.5k
ueberdosis/tiptap

The headless rich text editor framework for web artisans.

TypeScriptnpmMIT Licensejsvue
tiptap.dev
37.7k3.1k
denysdovhan/wtfjs

🤪 A list of funny and tricky JavaScript examples

JavaScriptnpmDo What The F*ck You Want To Public Licensejavascriptspecification
bit.ly/wtfjavascript
37.7k2.7k
CopilotKit/CopilotKit

The Frontend Stack for Agents & Generative UI. React, Angular, Mobile, Slack, and more. Makers of the AG-UI Protocol

TypeScriptnpmMIT Licenseaillm
docs.copilotkit.ai
36.2k4.5k
ComposioHQ/composio

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

TypeScriptnpmMIT Licenseaipython
docs.composio.dev
29.3k4.7k
Asabeneh/30-Days-Of-React

30 Days of React challenge is a step by step guide to learn React in 30 days. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

JavaScriptnpmchallengejavascript
27.5k7.7k
haizlin/fe-interview

前端面试每日 3+1,以面试题来驱动学习,提倡每日学习与思考,每天进步一点!每天早上5点纯手工发布面试题(死磕自己,愉悦大家),6000+道前端面试题全面覆盖,HTML/CSS/JavaScript/Vue/React/Nodejs/TypeScript/ECMAScritpt/Webpack/Jquery/小程序/软技能……

JavaScriptnpmMIT Licensefrontendinterview
h-camel.com
26.3k3.2k
zloirock/core-js

Standard Library

JavaScriptnpmMIT Licenseproposalpolyfill
core-js.io
25.5k1.7k
doczjs/docz

✍ It has never been so easy to document your things!

TypeScriptnpmMIT Licensedocsdocumentation
docz.site
23.7k1.5k
pedronauck/docz

✍ It has never been so easy to document your things!

TypeScriptnpmMIT Licensedocsdocumentation
23.6k1.4k
justadudewhohacks/face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js

TypeScriptnpmMIT Licenseface-recognitionjavascript
17.9k3.9k