Crates.io | rquickjs |
lib.rs | rquickjs |
version | 0.6.2 |
source | src |
created_at | 2020-02-23 15:41:54.480192 |
updated_at | 2024-05-06 10:43:08.768055 |
description | High level bindings to the QuickJS JavaScript engine |
homepage | |
repository | https://github.com/DelSkayn/rquickjs.git |
max_upload_size | |
id | 211785 |
size | 57,513 |
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.
FromJs
and IntoJs
derive macros can help adapt user defined types tooRuntime
can be created using custom allocatorembed
macroHasRefs
trait to get garbage collector works properly)bind
macro)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.
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.
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 |
This library is licensed under the MIT License