1 unstable release
0.1.0 | May 3, 2021 |
---|
#927 in Procedural macros
8KB
64 lines
sh-builtin-rs
A crate and proc macro for compiling dynamically-loadable Bash builtins.
NOTE: This crate is a work-in-progress.
Usage
use sh_builtin_bash::bash_builtin;
/// Prints its arguments back to the standard output.
#[bash_builtin(function = "echo-rs")]
pub fn echo_rs(words: &Vec<String>) -> Result<(), Box<dyn std::error::Error>> {
println!("{}", words.join(" "));
Ok(())
}
Dependencies
~1.3–3.5MB
~73K SLoC