#shell #u8 #yield #command #execute #static #cmd-execute

macro cmd-proc-macro

Run some shell script when build the project, and yield the stdout as &[u8]

1 unstable release

0.1.4 Nov 6, 2023
0.1.3 Nov 6, 2023
0.1.2 Nov 5, 2023

#978 in Procedural macros

Download history 10/week @ 2024-07-29 14/week @ 2024-09-16 15/week @ 2024-09-23 17/week @ 2024-10-07 28/week @ 2024-10-14 14/week @ 2024-10-21 8/week @ 2024-10-28

67 downloads per month

MIT license

4KB

cmd-proc-macro

This crate contains only 1 proc-macro cmd_execute that can execute shell commands and yield an expression of type &'static [u8; N] which is the output of the commands

Usage

src/main.rs:

let cargo = cmd_execute!("cat Cargo.toml");
let bytes = include_bytes!("../Cargo.toml");
assert_eq!(cargo, bytes);

Dependencies

~250–700KB
~17K SLoC