jolt_core 0.1.3

Core trait and types for the Jolt JavaScript runtime
Documentation
  • Coverage
  • 43.33%
    13 out of 30 items documented1 out of 1 items with examples
  • Size
  • Source code size: 11.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.88 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • rlch/jolt
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rlch

jolt_core

crates.io docs.rs

Core types and traits for the Jolt JavaScript runtime.

This crate provides:

  • JsRuntime — the trait all Jolt backends implement
  • JsValue — values exchanged between Rust and JavaScript
  • JsEntry — key-value pairs in JS objects
  • JoltError — 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