13 releases
0.2.12 | Jul 7, 2021 |
---|---|
0.2.11 | Jul 16, 2020 |
0.2.8 | Oct 17, 2019 |
0.2.6 | Apr 15, 2019 |
0.1.0 | Mar 24, 2019 |
#648 in Build Utils
11,342 downloads per month
Used in 2 crates
11KB
92 lines
compile-time-run
This crate contains macros to run commands on the host system at compile time. It can be used in some situations to take over functionaility that would otherwise have to be done using a build script.
An example:
use compile_time_run::{run_command, run_command_str};
const VALUE_STR : &'static str = run_command_str!("echo", "Hello World!");
const VALUE_BYTES : &'static [u8] = run_command!("echo", "Hello World!");
Keep in mind that running arbitrary commands during your build phase can easily hurt portability.
lib.rs
:
This crate contains macros to run commands on the host system at compile time. It can be used in some situations to take over functionaility that would otherwise have to be done using a build script.
An example:
use compile_time_run::{run_command, run_command_str};
const VALUE_STR : &'static str = run_command_str!("echo", "Hello World!");
const VALUE_BYTES : &'static [u8] = run_command!("echo", "Hello World!");
Keep in mind that running arbitrary commands during your build phase can easily hurt portability.
Dependencies
~1.5MB
~35K SLoC