otter-jsc-sys

Crates.iootter-jsc-sys
lib.rsotter-jsc-sys
version0.1.1
created_at2026-01-15 12:36:04.321681+00
updated_at2026-01-15 15:10:14.880359+00
descriptionRaw FFI bindings to JavaScriptCore
homepagehttps://github.com/octofhir/otter
repositoryhttps://github.com/octofhir/otter
max_upload_size
id2045473
size45,642
Alexander Streltsov (octoshikari)

documentation

README

otter-jsc-sys

Raw FFI bindings to JavaScriptCore C API.

Overview

This crate provides low-level unsafe bindings to JavaScriptCore (JSC), the JavaScript engine used by WebKit and Safari. It supports multiple platforms:

  • macOS: Uses the system JavaScriptCore framework
  • Linux: Uses pre-built bun-webkit binaries (statically linked)
  • Windows: Uses pre-built bun-webkit binaries (statically linked)

Usage

This crate is intended for use by higher-level wrappers. For safe Rust APIs, use the otter-jsc-core or otter-runtime crates instead.

use otter_jsc_sys::*;

unsafe {
    let ctx = JSGlobalContextCreate(std::ptr::null_mut());
    // ... use JSC APIs
    JSGlobalContextRelease(ctx);
}

Platform Support

Platform Architecture Method
macOS x86_64, ARM64 System framework
Linux x86_64, ARM64 bun-webkit (static)
Windows x86_64 bun-webkit (static)

Build Requirements

macOS

No additional dependencies required.

Linux & Windows

The build script automatically downloads pre-built bun-webkit binaries from oven-sh/WebKit.

Environment Variables

  • BUN_WEBKIT_VERSION: Override the default bun-webkit version

License

MIT

Commit count: 0

cargo fmt