Skip to content

Commit

Permalink
0.12 wip, hirofa-quickjs-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
andrieshiemstra committed Jan 4, 2024
1 parent a7a4cb1 commit d4d8275
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 0.11.6
# 0.12.0

* uses hirofa-quickjs-sys 0.10.0 and ['bellard'] feature and thus the 2023-12-09 version of the original quickjs by Fabrice Bellard
* added get_proxy_instance_id for getting instance id without looking up the proxy
* console functions output source filename

Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quickjs_runtime"
version = "0.11.5"
version = "0.12.0"
authors = ["Andries Hiemstra <[email protected]>"]
edition = "2021"
description = "Wrapper API and utils for the QuickJS JavaScript engine with support for Promise, Modules, Async/await"
Expand All @@ -27,7 +27,8 @@ hirofa_utils = "0.7"
#hirofa_utils = {git="https://github.com/SreeniIO/utils.git"}
#hirofa_utils = {git="https://github.com/HiRoFa/utils"}
backtrace = "0.3.67"
libquickjs-sys = "0.10.0"

libquickjs-sys = {package="hirofa-quickjs-sys", path='../quickjs-sys', features=["bellard"]}
lazy_static = "1.4.0"
log = "0.4"
num_cpus = "1"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

quickjs_runtime is a library for quickly getting started with embedding a javascript engine in your rust project.

**DISCLAIMER: This project is not yet what I would call "Battle Tested", use at your own risk.**
**as of 2024 this lib no longer relies on [libquickjs-sys](https://github.com/theduke/quickjs-rs/tree/master/libquickjs-sys) but on out own [hirofa-quickjs-sys](https://github.com/HiRoFa/quickjs-sys) adding flexibility in used quickjs version**

An example on how to embed a script engine in rust using this lib can be found here: [github.com/andrieshiemstra/ScriptExtensionLayerExample](https://github.com/andrieshiemstra/ScriptExtensionLayerExample). It was published in TWIR as a walkthrough.

quickjs_runtime focuses on making [quickjs](https://bellard.org/quickjs/) easy to use and does not add any additional features, that's where these projects come in:
* A more feature-rich (e.g. fetch api support, http based module loader and much more) runtime: [GreenCopperRuntime](https://github.com/HiRoFa/GreenCopperRuntime).
* The commandline client: [GreenCopperCmd](https://github.com/HiRoFa/GreenCopperCmd).

This project is inspired by the quickjs wrapper at [theduke/quickjs-rs](https://github.com/theduke/quickjs-rs) and still uses its low level bindings [libquickjs-sys](https://crates.io/crates/libquickjs-sys).

The big difference to quickjs-rs is that quickjs_runtime executes all quickjs related code in a dedicated single-threaded EventLoop.

Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ pub mod reflection;
pub mod typescript;
pub mod values;

pub use libquickjs_sys;

#[cfg(test)]
pub mod tests {
use crate::builder::QuickJsRuntimeBuilder;
Expand Down

0 comments on commit d4d8275

Please sign in to comment.