DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
431 stars 58 forks source link

rquickjs

github crates docs status

This library is a high level bindings the QuickJS JavaScript engine. Its goal is to be an easy to use, and safe wrapper similar to the rlua library.

QuickJS is a small and embeddable JavaScript engine. It supports the ES2020 specification including modules, asynchronous generators, proxies and BigInt. It optionally supports mathematical extensions such as big decimal floating point numbers (BigDecimal), big binary floating point numbers (BigFloat) and operator overloading.

Main features of QuickJS

Features provided by this crate

Development status

This bindings is feature complete, mostly stable and ready to use. The error handling is only thing which may change in the future. Some experimental features like parallel may not works as expected. Use it for your own risk.

Using rquickjs on windows

Note that the QuickJS library does not support windows natively, this library supports windows by patching QuickJS. For patching we use the patch utility which needs to be installed when building for windows. For more information see #88.

Supported platforms

Rquickjs needs to compile a C-library which has it's own limitation on supported platforms, furthermore it needs to generate bindings for that platform. As a result rquickjs might not compile on all platforms which rust supports. In general you can allways try to compile rquickjs with the bindgen feature, this should work for most platforms. Rquickjs ships bindings for a limited set of platforms, for these platforms you don't have to enable the bindgen feature. See below for a list of supported platforms.

platform shipped bindings tested supported by quickjs
x86_64-unknown-linux-gnu
i686-unknown-linux-gnu
aarch64-unknown-linux-gnu
x86_64-unknown-linux-musl
aarch64-unknown-linux-musl
x86_64-pc-windows-gnu
i686-pc-windows-gnu
x86_64-pc-windows-mvsc ❌ experimental!
x86_64-apple-darwin
aarch64-apple-darwin
wasm32-wasi
other Unknown

License

This library is licensed under the MIT License