neonious / lowjs

A port of Node.JS with far lower system requirements. Community version for POSIX systems such as Linux, uClinux or Mac OS X.
http://www.lowjs.org/
Other
1.27k stars 72 forks source link

How to build lowjs from sources... #138

Open Honya2000 opened 3 years ago

Honya2000 commented 3 years ago

I'm quite confused how to build low_js folder using duktape runtime. There is tool dukc, which compiles lib_js folder to lib .low files.

But the problem is ALL files in this folder are not compilable by duktape. First because duktape doesn't support let variable declaration.

And even without let - it reports errors on each second line for all js files.

For example:

const { Buffer } = require('buffer');

const { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE } = require('internal/errors').codes;

duktape throws errors on this lines.

So how this .low files where compiled which are existing in binary distribution ?

ThomasRogg commented 3 years ago

The Makefile transpiles these files with tsc before compiling them with DukTape.