# denoland/rusty_v8

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/denoland-rusty-v8).**

3,866 stars · 367 forks · Rust · mit

## Links

- GitHub: https://github.com/denoland/rusty_v8
- Homepage: https://crates.io/crates/v8
- awesome-repositories: https://awesome-repositories.com/repository/denoland-rusty-v8.md

## Topics

`rust` `v8`

## Description

rusty_v8 is a Rust wrapper for the V8 JavaScript engine that allows for the embedding of a JavaScript runtime into native applications. It provides core components for managing engine bindings, memory allocation, sandboxed isolates, and the execution of WebAssembly modules.

The project features a native host function bridge to map Rust functions to JavaScript objects and a dedicated memory allocator to manage thread-safe allocation and heap pressure. It includes a system for compiling and executing binary WebAssembly modules within the hosted native environment.

The runtime covers capabilities for sandboxed code execution and untrusted code isolation through the use of independent execution contexts. It also provides tools for JavaScript type management, object access interception, and script execution debugging via an inspection interface.

## Tags

### Programming Languages & Runtimes

- [JavaScript Engine Embedding](https://awesome-repositories.com/f/programming-languages-runtimes/c-library-embedding/runtime-embedding/webassembly-engine-embedding/javascript-engine-embedding.md) — Integrates the V8 JavaScript engine into native Rust applications to execute scripts and manage the runtime.
- [Host Function Exposure](https://awesome-repositories.com/f/programming-languages-runtimes/host-function-exposure.md) — Registers native Rust functions to be callable from within the embedded JavaScript environment.
- [JavaScript-to-Native Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/interoperability/javascript-to-native-bridges.md) — Provides a bridge for mapping native Rust functions to JavaScript objects for cross-environment communication.
- [Native Value Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/native-value-wrappers.md) — Allows wrapping JavaScript primitives and objects as native Rust types to modify engine state. ([source](https://docs.rs/v8))
- [C++ FFI Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/systems-languages/rust/c-ffi-bridges.md) — Implements a memory-safe Rust wrapper around the V8 C++ API for embedding the engine.
- [Sandboxed Code Execution Environments](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/sandboxed-code-execution-environments.md) — Runs untrusted scripts in isolated environments with restricted memory to ensure system safety.
- [WebAssembly JIT Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/jit-compilation-engines/webassembly-jit-compilers.md) — Compiles and executes binary WebAssembly modules within the V8 runtime for high-performance execution. ([source](https://docs.rs/v8/150.0.0/v8/))
- [C++ Callback Bindings](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/interoperability/javascript-to-native-bridges/c-callback-bindings.md) — Maps native Rust functions to JavaScript objects using callbacks for bidirectional communication.
- [Embedded WebAssembly Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/webassembly/embedded-webassembly-runtimes.md) — Embeds a system for compiling and executing binary WebAssembly modules within a native host environment.

### Security & Cryptography

- [Sandbox and Isolation](https://awesome-repositories.com/f/security-cryptography/application-and-system-security/sandbox-and-isolation.md) — Implements strict isolation and memory constraints to safely execute untrusted JavaScript code. ([source](https://cdn.jsdelivr.net/gh/denoland/rusty_v8@main/README.md))
- [Isolated Execution Sandboxes](https://awesome-repositories.com/f/security-cryptography/application-and-system-security/sandbox-and-isolation/isolated-execution-sandboxes.md) — Creates independent heaps and contexts to isolate execution environments and prevent state leakage.

### Web Development

- [Runtime Context Isolation](https://awesome-repositories.com/f/web-development/browser-session-managers/context-isolation-managers/runtime-context-isolation.md) — Manages separate engine states and heaps to isolate untrusted code in sandboxed contexts.
- [Module Execution](https://awesome-repositories.com/f/web-development/dynamic-loading-strategies/binary-module-loaders/webassembly-module-loaders/module-execution.md) — Compiles and executes binary WebAssembly modules within the V8 engine alongside JavaScript.

### Development Tools & Productivity

- [Script Debugging Tools](https://awesome-repositories.com/f/development-tools-productivity/script-debugging-tools.md) — Provides an inspection interface to monitor and debug the execution state of running JavaScript code. ([source](https://docs.rs/v8/150.0.0/v8/))

### Operating Systems & Systems Programming

- [Custom Memory Allocators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/custom-memory-allocators.md) — Implements a thread-safe custom memory allocator to manage heap memory for the JavaScript engine.
- [Managed Memory Allocators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/custom-memory-allocators/managed-memory-allocators.md) — Manages thread-safe memory allocation and heap pressure within the V8 engine.
- [Pluggable Memory Allocators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/custom-memory-allocators/managed-memory-allocators/pluggable-memory-allocators.md) — Provides an interface to replace the internal V8 memory allocation strategy with custom native allocators. ([source](https://docs.rs/v8/150.0.0/v8/))

### Software Engineering & Architecture

- [Property Interception Middleware](https://awesome-repositories.com/f/software-engineering-architecture/property-interception-middleware.md) — Supports custom getters and setters to intercept and control property access on JavaScript objects. ([source](https://docs.rs/v8/150.0.0/v8/))
