rig-boa 0.1.0

A minimal Boa JavaScript executor for Rig applications.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 37.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 461.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gold-silver-copper

rig-boa

A minimal Boa JavaScript executor for applications built with Rig.

Every evaluation creates a fresh Boa context, keeping globals from independent calls isolated.

use rig_boa::BoaExecutor;

let result = BoaExecutor.eval("const x = 20; x + 22")?;
assert_eq!(result.display().to_string(), "42");
# Ok::<(), rig_boa::BoaError>(())

Safety

Boa executes JavaScript in-process. A fresh context does not impose CPU or memory limits; do not evaluate untrusted code without application-level isolation and limits.

License

MIT.