#run-command #run #command #build

macro build compile-time-run

run a command at compile time and capture the output

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

#603 in Build Utils

Download history 3293/week @ 2023-12-07 4375/week @ 2023-12-14 1536/week @ 2023-12-21 1931/week @ 2023-12-28 4117/week @ 2024-01-04 3543/week @ 2024-01-11 4199/week @ 2024-01-18 4061/week @ 2024-01-25 4006/week @ 2024-02-01 4511/week @ 2024-02-08 3785/week @ 2024-02-15 4255/week @ 2024-02-22 4820/week @ 2024-02-29 3037/week @ 2024-03-07 2828/week @ 2024-03-14 2514/week @ 2024-03-21

14,023 downloads per month
Used in 2 crates

BSD-2-Clause

11KB
92 lines

Documentation crates.io Build Status

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
~34K SLoC