Overview of rune-tracing
mainrune-tracing provides tracing shims for the Rune language. Rune is an embeddable dynamic programming language designed for Rust. This crate allows for instrumentation and observability within Rune scripts.repository·main·Indexed 25 days ago
https://github.com/rune-rs/runeAn embeddable dynamic programming language designed for Rust, featuring a high-performance stack-based virtual machine, async support, and multithreading. The ecosystem includes the main rune crate for embedding, rune-cli for script execution, rune-languageserver for LSP support, and specialized crates like rune-wasm for WebAssembly and rune-modules for extended functionality.
rune-tracing provides tracing shims for the Rune language. Rune is an embeddable dynamic programming language designed for Rust. This crate allows for instrumentation and observability within Rune scripts.Rune is an embeddable dynamic programming language for Rust. Key features include:
serde support.rune-alloc is a crate within the Rune ecosystem. Rune is an embeddable dynamic programming language designed for Rust. This specific crate is part of the memory allocation infrastructure for the Rune language.rune-wasm crate provides a WebAssembly (WASM) module for the Rune Language. This allows you to run Rune scripts within web browsers or other WASM-compatible runtimes. It is a specialized build of the Rune engine designed for portability in WASM environments.rune-tracing-macros crate provides macros designed to facilitate tracing within the Rune Language, an embeddable dynamic programming language for Rust. These macros allow developers to instrument their code to gain insights into the execution and behavior of Rune scripts.rune-languageserver is a Language Server Protocol (LSP) implementation for the Rune language. It provides IDE and editor support for Rune scripts, which are embeddable dynamic programming scripts used within Rust applications. You can use this language server to enable features like autocompletion, diagnostics, and navigation in editors that support LSP (such as VS Code, Neovim, or Sublime Text).rune-modules crate provides native modules for the Rune dynamic programming language. These modules extend Rune's capabilities by providing access to standard functionality like file system access, HTTP requests, JSON parsing, and more. To use them, you must include the appropriate module in your Rune environment.value.foo(). Because Rune is a dynamic language, the virtual machine performs a runtime lookup to find the function associated with the specific instance. If the function is not found for the given type, the VM will throw a virtual machine error indicating a missing instance function for the specific type hash.Rune supports pattern matching on external enums out of the box. However, pattern matching will only recognize and allow access to fields that are explicitly annotated with #[rune(get)] in the Rust definition.
This applies to:
Example of pattern matching on a tuple variant where only the first field is visible:
enum External {
First(#[rune(get)] u32, u32),
Second(#[rune(get)] u32),
}pub fn main(external) {
match external {
External::First(a) => a,
External::Second(b) => b,
}
}yield keyword in Rune is bidirectional. While it is used to produce a value to the caller, it can also receive a value sent from the calling procedure. This allows you to inject data back into the generator's execution context during a resume call.()). This allows you to pass functions as arguments to other functions to define operations dynamically.