[quickjs-devel] Re: precompiled and/or builtin modules

  • From: Carlos Alberto Castaño García <calbertts@xxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Wed, 21 Aug 2019 15:38:40 +0200

I've made this example:
https://github.com/calbertts/async-quickjs

Check out the Makefile, the order of compilation is important.

Regards

*Carlos Alberto Castaño*
Tecnólogo en Sistemas de Información
Movil: +34 684 275 791
Madrid - España


El mié., 21 ago. 2019 a las 15:27, Mario Gliewe (<mag@xxxxxxxxx>) escribió:


On 21.08.19 15:03, Carlos Alberto Castaño García wrote:

Take a look on this article:


https://medium.com/@calbertts/how-to-create-asynchronous-apis-for-quickjs-8aca5488bb2e

Thats what i was thinking, so i did:

$ qjsc -M events,events -m -o events.so events.js

and tryed to import, but failed, since there is no js_init_module() in the
binary.

The -M does not seem to change anything, since

$ qjsc -e -m -o events1.c events.js
$ qjsc -e -m -M events,events -o events2.c events.js
$ diff events1.c events2.c

tells me, there is no change..

greets maG


*Carlos Alberto Castaño*
Tecnólogo en Sistemas de Información
Movil: +34 684 275 791
Madrid - España


El mié., 21 ago. 2019 a las 14:58, Mario Gliewe (<mag@xxxxxxxxx>)
escribió:

Hi,

is there a way to use qjsc to precompile javascript modules, and use
them as shared libs?

Or, even better, register such precompilations as known/builtin modules
into the qjs binary?

I noticed the -M flag for qjsc, but couldn't quiet figure out what that
is for or how it works..

greets maG



Other related posts: