| Crates.io | cmd-proc-macro |
| lib.rs | cmd-proc-macro |
| version | 0.1.4 |
| created_at | 2023-11-05 11:37:26.354805+00 |
| updated_at | 2023-11-06 06:47:09.843046+00 |
| description | Run some shell script when build the project, and yield the stdout as &[u8] |
| homepage | |
| repository | https://github.com/hangj/cmd-proc-macro |
| max_upload_size | |
| id | 1025880 |
| size | 3,721 |
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
src/main.rs:
let cargo = cmd_execute!("cat Cargo.toml");
let bytes = include_bytes!("../Cargo.toml");
assert_eq!(cargo, bytes);