All Projects â†’ NectarJS â†’ Nectarjs

NectarJS / Nectarjs

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

Programming Languages

javascript
184084 projects - #8 most used programming language
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
Objective-C++
1391 projects

Projects that are alternatives of or similar to Nectarjs

Mysensors
MySensors library and examples
Stars: ✭ 1,150 (-63.06%)
Mutual labels:  arduino, raspberry
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+191.29%)
Mutual labels:  arduino, wasm
leaflet-rs
A wasm-bindgen wrapper for Leaflet.js
Stars: ✭ 19 (-99.39%)
Mutual labels:  wasm
Arduino Cli
Arduino command line tool
Stars: ✭ 3,173 (+1.93%)
Mutual labels:  arduino
Octopus
Security Analysis tool for WebAssembly module (wasm) and Blockchain Smart Contracts (BTC/ETH/NEO/EOS)
Stars: ✭ 261 (-91.62%)
Mutual labels:  wasm
Arduinoplaystimberman
Arduino Plays Timberman
Stars: ✭ 254 (-91.84%)
Mutual labels:  arduino
Duckuino
Simple DuckyScript to Arduino C converter.
Stars: ✭ 263 (-91.55%)
Mutual labels:  arduino
papito
A Beginner Friendly Rusty WASM Framework
Stars: ✭ 51 (-98.36%)
Mutual labels:  wasm
Il2c
IL2C - A translator for ECMA-335 CIL/MSIL to C language.
Stars: ✭ 270 (-91.33%)
Mutual labels:  arduino
Openknit
an open project about a digital knitting machine
Stars: ✭ 260 (-91.65%)
Mutual labels:  arduino
Kupiki Hotspot Script
Create automatically a full Wifi Hotspot on Raspberry Pi including a Captive Portal
Stars: ✭ 265 (-91.49%)
Mutual labels:  raspberry
Deepc
vendor independent deep learning library, compiler and inference framework microcomputers and micro-controllers
Stars: ✭ 260 (-91.65%)
Mutual labels:  arduino
Riscv Rust
RISC-V processor emulator written in Rust+WASM
Stars: ✭ 253 (-91.87%)
Mutual labels:  wasm
Idawasm
IDA Pro loader and processor modules for WebAssembly
Stars: ✭ 264 (-91.52%)
Mutual labels:  wasm
wasm-arrays
A couple of helper functions to make WebAssembly array parameters easy to use
Stars: ✭ 33 (-98.94%)
Mutual labels:  wasm
Umqttbroker
MQTT Broker library for ESP8266 Arduino
Stars: ✭ 264 (-91.52%)
Mutual labels:  arduino
raspberry pi home security system
Home monitoring system with a Raspberry Pi and sending notifications with a Telegram bot
Stars: ✭ 14 (-99.55%)
Mutual labels:  raspberry
Sinric
Amazon Alexa Smart home skill / Google Home Action for ESP8266 / ESP32 / Arduino
Stars: ✭ 259 (-91.68%)
Mutual labels:  arduino
Wasm Git
GIT for nodejs and the browser using https://libgit2.org compiled to WebAssembly with https://emscripten.org
Stars: ✭ 261 (-91.62%)
Mutual labels:  wasm
Raspibackup
Backup and restore your running Raspberry
Stars: ✭ 268 (-91.39%)
Mutual labels:  raspberry

Tweet


Javascript's God Mode: one language to rule them all.

Code everything, everywhere, for everything, in JavaScript.

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

Help needed to integrate NodeJS std modules

Table of contents

About NectarJS

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

NectarJS is in active development, join us on Discord or IRC 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 ...

Changelog

Sponsors

Contributors

Get started

Installation

Install NectarJS from NPM

npm install -g nectarjs

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 NectarJS:

nectar file.js

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 (see Advanced usage):

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

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

nectar file.js --run

You can enable the quiet mode with --quiet:

nectar file.js --quiet

Changing the stack size (useful on Windows):

nectar --stack 10000000 flood.js

You can install a module with:

nectar -i module_name

You can see the module list and participate in their development here: https://github.com/NectarJS/nectar_modules

You can initialize an empty module with the command:

nectar --init-module module_name --author me

For more informations about compilation output, use --verbose

For help, use --help

Advanced usage

Benchmarks

Compiled with GCC v10.2.0 on Windows

NodeJS v12.8.1 QuickJS 2020-07-05 NectarJS 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.

Contributing

Code Of Conduct

TODO

Stores

NectarJS compiled apps are tested to be publishable on:

  • Apple Store

ECMAScript Support

NectarJS 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].