Chakracore Rs

screenshot of Chakracore Rs

An idiomatic Rust wrapper for the JSRT interface

Overview

The chakracore-rs project serves as an idiomatic Rust wrapper for ChakraCore, which is a JavaScript engine used by Microsoft Edge and Node.js. Despite its potential, it must be noted that this project is currently not maintained as ChakraCore itself is no longer under active development. As such, users should be aware that it is still in the pre-release stage, meaning that while it offers some functionality, there may be unexpected behavior, including memory leaks and segmentation faults.

The library consists of two main crates: chakracore-sys, which provides raw bindings to the JavaScript Runtime, and chakracore, an idiomatic interface built on top of chakracore-sys. Developers looking to integrate JavaScript capabilities into Rust applications might find this library useful, but should approach with caution due to the stability issues currently present.

Features

  • Raw Bindings to JSRT: The chakracore-sys crate offers direct access to the JavaScript Runtime, ensuring all API functionalities are available.
  • Idiomatic Wrapper: The chakracore crate provides a more user-friendly interface for Rust developers, abstracting some complexities of the underlying API.
  • Dynamic and Static Linking: By default, the library supports dynamic linking of ChakraCore, but it also offers a feature for static linking.
  • Build Support: It includes a build script that manages ChakraCore's compilation directly in the source tree, simplifying the setup process.
  • Cross-Platform Compatibility: The library has been successfully built on multiple operating systems, including macOS, Ubuntu, and Windows 10.
  • Rust Bindgen Integration: Utilizes rust-bindgen for generating bindings on the fly, allowing developers to access ChakraCore's entirety without manual intervention.
  • Visual Studio Compatibility: Comes with detailed build instructions for Windows environments, requiring specific versions of Visual Studio and SDKs.
  • Community Contribution: Although it is not actively maintained, users are encouraged to report issues, supporting a community-driven approach to enhancements or fixes.