4 releases
| 0.1.3 | Mar 24, 2026 |
|---|---|
| 0.1.2 | Mar 24, 2026 |
| 0.1.1 | Mar 24, 2026 |
| 0.1.0 | Mar 24, 2026 |
#4 in #js-value
933 downloads per month
Used in 4 crates
10KB
176 lines
jolt_core
Core types and traits for the Jolt JavaScript runtime.
This crate provides:
JsRuntime— the trait all Jolt backends implementJsValue— values exchanged between Rust and JavaScriptJsEntry— key-value pairs in JS objectsJoltError— error types for evaluation, conversion, and runtime failures
Usage
Most users should depend on a backend crate (jolt_quickjs, jolt_jsc, jolt_web) or the jolt facade. Use jolt_core directly when you need the trait or types without a specific engine.
use jolt_core::{JsRuntime, JsValue, JoltError};
fn run_js(rt: &mut impl JsRuntime) -> Result<JsValue, JoltError> {
rt.eval("1 + 1")
}
License
MIT
Dependencies
~120–485KB
~11K SLoC