Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 847 Bytes

File metadata and controls

12 lines (9 loc) · 847 Bytes

Runtime Scripting for Rust Applications

This repository provides a demo for embedding JavaScript or TypeScript for the purpose of runtime scripting into a Rust application. It was created as a concise but complete example for my Runtime Scripting for Rust Applications talk at EuroRust 2024 in Vienna. To this end, the Deno runtime is used to provide a batteries-included scripting environment. Deno provides certain security mechanisms to restrict access to the network, file system, and other functionalities. These can be configured as part of the runtime worker.

The demo can be run as cargo run -- <script_file> [<function_name>], where the optional function_name defaults to the script's default export.