compile-time-run 0.2.7

run a command at compile time and capture the output
Documentation

Documentation crates.io Build Status

compile-time-run

This crate contains macros to run commands on your system during 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 abitrary commands during your build phase can easily hurt portability.