Version 0.9.1
fromjs: add type information to JSArrayBufferView + some bindings
test: update results
Monoucha is a wrapper library to simplify the process of embedding the QuickJS-NG JavaScript engine into Nim programs.
Include Monoucha in your project using either Nimble or as a git submodule.
requires "monoucha"
Then,
At the time of writing, Monoucha only works with refc. This means you have to put the following in your nim.cfg:
--mm:refc
If you do not do this, you will be rewarded with strange crashes as your program grows.
monoucha depends on the nim-results library.
QuickJS-NG is already included in this repository; you do not need to install it separately.
I'm working on a manual. Please read the manual.
You did not read the above instructions, you have to set --mm:refc.
Monoucha does not (and never did) work with ORC, or other memory managers for that matter. You must use refc.
(If you are still experiencing issues, please open a ticket here and I'll look into it.)
Monoucha does not actually use stock QuickJS-NG, but a fork that tracks upstream.
This fork includes some GC modifications necessary for the synchronization of the Nim and QuickJS runtimes.
Possibilities are endless, but this looks like a better solution.
[insert JS engine]
instead of QuickJS?No. Feel free to fork and adapt it to whatever engine you want, but here we only support QuickJS.
A kind of tea, from the town once called Monou. You pronounce it as mo-no-u-cha.
Yes, it's a pun.
QuickJS was written by Fabrice Bellard and Charlie Gordon, and is maintained as QuickJS-NG by Ben Noordhuis and Saúl Ibarra Corretgé.
QuickJS-NG is distributed in this repository under the terms of the MIT license. See the monoucha/qjs/LICENSE file for details.
Monoucha is released into the public domain. See the UNLICENSE file for details.