{"id":13393648,"url":"https://github.com/NerdLang/nerd","last_synced_at":"2025-03-13T19:31:48.533Z","repository":{"id":37285837,"uuid":"78945412","full_name":"NerdLang/nerd","owner":"NerdLang","description":"🔱 Javascript's God Mode. No VM. No Bytecode. No GC. Just native binaries.","archived":false,"fork":false,"pushed_at":"2023-01-25T06:57:26.000Z","size":171778,"stargazers_count":3583,"open_issues_count":16,"forks_count":126,"subscribers_count":82,"default_branch":"master","last_synced_at":"2024-10-29T15:17:35.464Z","etag":null,"topics":["arduino","compilation","js","nodejs","raspberry","wasm"],"latest_commit_sha":null,"homepage":"https://nectarjs.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NerdLang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"nectarjs","open_collective":"nectarjs"}},"created_at":"2017-01-14T14:37:09.000Z","updated_at":"2024-10-27T01:36:08.000Z","dependencies_parsed_at":"2023-01-31T13:16:04.183Z","dependency_job_id":null,"html_url":"https://github.com/NerdLang/nerd","commit_stats":null,"previous_names":["nectarjs/nectarjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerdLang%2Fnerd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerdLang%2Fnerd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerdLang%2Fnerd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NerdLang%2Fnerd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NerdLang","download_url":"https://codeload.github.com/NerdLang/nerd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243469192,"owners_count":20295704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","compilation","js","nodejs","raspberry","wasm"],"created_at":"2024-07-30T17:00:58.017Z","updated_at":"2025-03-13T19:31:43.560Z","avatar_url":"https://github.com/NerdLang.png","language":"C++","readme":"\u003cp\u003e\nNo VM. No Bytecode. No packaging. No Garbage Collector. Fully compiled to native binaries.\n\u003c/p\u003e\n\n# NectarJS becomes Nerd\n\nCompile JavaScript and NerdLang in native binaries.\n\n# What is NerdLang\n\nNerdLang is a substract of JS with some additions, focus on efficiency.\n\n**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.\n\n\u003e **Nerd** is in active development, join us on [Discord](https://discord.gg/cpe2UuN) if you need more information.\n\n- [Roadmap on Trello](https://trello.com/invite/b/6F4rvEj2/ATTI8842296bacc92724fa8b4114fe1dc80aA9FA431B/nerd)\n\n## Main objectives\n* Supporting EcmaScript 3 standard (then 5, 6 ...)\n* Supporting NodeJS and NPM ecosystem\n* Supporting a maximum of platforms (Windows, Mac, Linux, Android, Arduino, ...)\n* Being secure\n* Embeding debuging tools\n* Compile everything that can be transpiled in JS: Ruby (Opal), Python (Transcript, Brython, JavaScrypthon), TypeScript ...\n\n# Get started\n\n## Installation\n\n### Install GCC/CLang for your platform\n\n- Windows\nInstall Mingw and Clang for Windows here: http://winlibs.com/ or Clang here: https://releases.llvm.org/\n\nYou can also install Linux for Windows and use a linux system on Windows\n\nYou need MinGW with POSIX threads\n\n- Linux / FreeBSD\nInstall it with your distro (apt install gcc, yum install gcc, ...).\nYou can use GCC, CLANG, as well as any derivative of those compilers (arm-gcc ...)\n\n- Apple iOS\nInstall xCode and you are ready.\n\n\nYou can check your installation with `npm start njs_test`\n\n## Usage\n\nSimplest way to use Nerd:\n```\nnerd file.js / file.ng\n```\n\nThe output file name will be automatically chosen regarding the target. You can specify another output with `-o something.out`\n\nYou can select a preset\n```\nnerd file.js --preset [none|speed|size]\n```\n\nYou can also run the compiled executable just after compilation using --run:\n```\nnerd file.js --run\n```\n\nYou can enable the quiet mode with --quiet:\n```\nnerd file.js --quiet\n```\n\nChanging the stack size (useful on Windows):\n```\nnerd --stack 10000000 flood.js\n```\n\nFor more informations about compilation output, use `--verbose`\n\nFor help, use `--help`\n\n# Benchmarks\n\n* _Need update_\n\nCompiled with GCC v10.2.0 on Windows\n\n|           | NodeJS v12.8.1 | QuickJS 2020-07-05 | Nerd v0.6.104 |\n|-----------|----------------|--------------------|-------------------|\n| sort(1e6) [No preset]                                               |\n| - Time:   |      0.33s     |         -          |     **0.33s**     |\n| - Memory: |      7.0Mb     |         -          |     **1.0Mb**     |\n|- Filesize:|     28.6Mb     |         -          |     **424Kb**     |\n| sort(1e6) [+Size preset]                                            |\n|- Filesize:|     28.6Mb     |         -          |     **260Kb**     |\n| sort(1e6) [+Speed preset]                                           |\n| - Time:   |      0.33s     |         -          |     **0.20s**     |\n| matrix(256) [No preset]                                             |\n| - Time:   |      0.33s     |         -          |     **0.21s**     |\n| - Memory: |      7.0Mb     |         -          |     **1.0Mb**     |\n|- Filesize:|     28.6Mb     |         -          |     **405Kb**     |\n| matrix(256) [+Size preset]                                          |\n|- Filesize:|     28.6Mb     |         -          |     **251Kb**     |\n| matrix(1e6) [+Speed preset]                                         |\n| - Time:   |      0.33s     |         -          |     **0.11s**     |\n\n* _Some code can be evaluated compile-time_\n\n# Supported platforms\n\nActively tested for\n\n- Windows\n* - win-x86-32\n* - win-x86-64\n- Linux\n* - linux-x86-32\n* - linux-x86-64\n* - linux-arm32v7\n- Arduino\n* - arduino-nano\n* - arduino-uno\n* - arduino-mega1280\n* - arduino-mega2560\n- STM32 Nucleo\n* - nucleo-l152re\n* - nucleo-l432kc\n* - nucleo-f446re\n- Mobile\n* - android\n- Web\n* - wasm\n* - wast\n* - asm-js\n- macOS\n- Sun OS\n\n# Development\n\nThis project is in heavy development and a lot features are not implemented yet.\n\n## ECMAScript Support\n\nNerd already supports more than 80% of ES3.\n\n\u003cdetails\u003e\n\u003csummary\u003ePrototype\u003c/summary\u003e\n\u003cbr\u003e\n \n* .call()\n* .bind()\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eArray\u003c/summary\u003e\n\u003cbr\u003e\n \n* .length\n* .push(value)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClass\u003c/summary\u003e\n\u003cbr\u003e\n \n* constructor\n* methods\n* static methods\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eConsole\u003c/summary\u003e\n\u003cbr\u003e\n \n* .log(variadic)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eJSON\u003c/summary\u003e\n\u003cbr\u003e\n \n* .parse(str) \n* .stringify(obj)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMath **(DONE)**\u003c/summary\u003e\n\u003cbr\u003e\n \n* [All static methods and constants]\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eObject\u003c/summary\u003e\n\u003cbr\u003e\n \n* .keys\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eperformance\u003c/summary\u003e\n\u003cbr\u003e\n \n* timeOrigin\n* .now()\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eString\u003c/summary\u003e\n\u003cbr\u003e\n\n* .length\n* .toString()\n* .indexOf(needle)\n* .lastIndexOf(needle)\n* .search(needle)\n* .slice(start, end)\n* .substring(start, end)\n* .substr(start, end)\n* .replace(needle, str)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSyntax\u003c/summary\u003e\n\u003cbr\u003e\n \n* for\n* while / do while\n* if / else if / else\n* try / catch / finally\n* function / lambda\n* class\n* new\n* typeof\n* instanceof\n* undefined\n* null\n* Infinite\n* NaN / isNaN\n* true / false\n\n\u003c/details\u003e","funding_links":["https://github.com/sponsors/nectarjs","https://opencollective.com/nectarjs"],"categories":["JavaScript","C++","arduino"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNerdLang%2Fnerd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNerdLang%2Fnerd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNerdLang%2Fnerd/lists"}