Expand description
js_sidecar is s Rust crate that makes it easy to JavaScript instead of embedding a JS library directly into the application, passes JavaScript code to a separate, persistent Node.js process for execution.
Structs§
- Code
Module - A ES Module to be importable by the script
- Connection
- A connection to Node.js. Multiple calls on a connection will reuse the execution context, unless explicitly specified otherwise using the [recreate_context] argument.
- Connection
Manager - deadpool Manager for Sidecar connections
- Error
Response Data - Function
Def - A function to be injected into the context.
- JsSidecar
- JsSidecar starts the Node.js process and allows connecting to its socket.
- LogResponse
Data - RunResponse
Data - RunScript
AndWait Result - The result of running a script
- RunScript
Args - Data associated with the RunScript message
Enums§
Type Aliases§
- Pool
Connection - A connection obtained from the connectiion pool inside the JsSidecar.