rune
rune copied to clipboard
An embeddable dynamic programming language for Rust.
Lets say you have something like this: ```rust if system.is_server() { // I know fully qualified domain name is always set for servers, just unwrap it let fdqn = system.fdqn.unwrap();...
This greatly increases the power of the process module: * Capturing output * Creating pipelines Remains to be done: * [ ] Allow feeding things to piped stdin of a...
In rust you can write this: ```rust match my_var { "a" | "b" | "c" => do_something() // ... } ``` This disjunction syntax doesn't work in Rune though it...
The following are items which are planned to be done for the 0.14 release: #### Change execution model * [x] Structurally shared values #663 * [x] Use a slot-based virtual...
This compiles: ```rust #[rune::function] fn add_from_sysusers( &mut self, package_manager: &PackageManager, //package: &str, config_file: &str, user_ids: Vec, group_ids: Vec, ) -> anyhow::Result { //let sysusers = String::from_utf8(package_manager.file_contents(package, config_file)?)?; todo!() } ```...
The following function: ```rust #[rune::function(vm_result, instance)] fn stdin(&mut self) -> Option { let inner = match &mut self.inner { Some(inner) => inner, None => { rune::vm_panic!("already completed"); } }; let...
I want to add a extension function that takes a mapping. So I thought it should take the `HashMap` from Rune's standard library. Unfortunately that is `pub(crate)` on the Rust...
Consider this rune code using `process` from `rune-modules`: ```rust let cmd = process::Command::new("ls"); cmd.arg("-l"); dbg(cmd); let child = cmd.spawn()?; dbg(child); let output = child.wait_with_output().await?; std::io::dbg!("output:", output.stdout); ``` It will print:...
When you have chained method calls / builder pattern the Rune auto-formatter wants to put it all on one line. It would be better if it formatted this like `rustfmt`...
Given the following example code (full reproducer project attached as tar.gz below): reproduce ```rust use std::sync::Arc; use anyhow::Context; use rune::{ termcolor::{ColorChoice, StandardStream}, ContextError, Diagnostics, Module, Source, Sources, Vm, }; ///...