Skip to content
Javascript's God Mode
JavaScript C++
Branch: master
Clone or download

Latest commit

Latest commit 26f3140 Apr 5, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
base Add require Mar 9, 2020
compiler Add let keyword Apr 5, 2020
example Add let keyword Apr 5, 2020
nectar_modules FFI example Mar 11, 2020
CHANGELOG.md Updated Feb 19, 2020
CONTRIBUTOR.md Update CONTRIBUTOR.md Oct 18, 2018
FUNDING.yml v0.2.6 Mar 5, 2020
LICENSE Update LICENSE Jan 8, 2019
README.md Updated Mar 6, 2020
TODO.md v0.2.6 Mar 5, 2020
nectar.js Add nectar_modules Mar 9, 2020
package.json update to 0.2.19 Apr 5, 2020

README.md


Javascript's God Mode : one language to rule them all. Code everything, everywhere, for everything, in JavaScript.

Any questions or ideas, join us : NectarJS' Discord Trello


NPM

Full documentation is here : NetcarJS Doc

Install

npm install -g nectarjs

Basic bytecode compilation

The simplest way to use NectarJS is :

nectar file.js

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

To show more compilation infos :

nectar --verbose file.js

You can run any JS or BIN file like this :

nectar --exec file[.js|.bin|.exe]

For more informations about compilation output, use --verbose

For help, use --help

Using native compiler

  • You need to have GCC installed on your machine and registered in your path to compile.

You can install Mingw for Windows here : https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/

On linux, you can install it with your distro (apt install gcc, yum install gcc, ...)

nectar -b native file.js
or
nectar file.js

You can select a preset (speed or size):

nectar -b bc file.js --preset [size|size]

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

nectar -b bc file.js --run

You can enable the quiet mode with --quiet:

nectar -b bc file.js --quiet

Tested on this targets/platforms :

  • wasm

  • asm-js

  • wast

  • mac-osx

  • linux-x86-32

  • linux-x86-64

  • linux-arm32v7

  • win-x86-32

  • win-x86-64

  • arduino-uno

  • arduino-mega1280

  • arduino-mega2560

  • nucleo-l152re

  • nucleo-l432kc

You can’t perform that action at this time.