#llvm #tools #rustup

llvm-tools

Provides access to the llvm tools installed through the llvm-tools-preview rustup component

2 releases

0.1.1 Mar 23, 2019
0.1.0 Mar 23, 2019
Download history 1312/week @ 2020-12-24 797/week @ 2020-12-31 808/week @ 2021-01-07 858/week @ 2021-01-14 848/week @ 2021-01-21 946/week @ 2021-01-28 792/week @ 2021-02-04 680/week @ 2021-02-11 729/week @ 2021-02-18 624/week @ 2021-02-25 853/week @ 2021-03-04 613/week @ 2021-03-11 666/week @ 2021-03-18 708/week @ 2021-03-25 718/week @ 2021-04-01 695/week @ 2021-04-08

3,583 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

7KB
58 lines

llvm-tools

Provides access to the llvm tools installed through the llvm-tools-preview rustup component.

Usage

Add the dependency in your Cargo.toml:

[dependencies]
llvm-tools = "0.1"

Get the path to the llvm-objcopy that is shipped with Rust:

let llvm_tools = llvm_tools::LlvmTools::new().expect("failed to find llvm-tools");
let objcopy = llvm_tools.tool(&llvm_tools::exe("llvm-objcopy"))
    .expect("llvm-objcopy not found in llvm-tools");
let mut cmd = Command::new(objcopy);
cmd.arg("");
[]

Note this only works if the user has the llvm-tools-preview rustup component installed. Else Error::NotFound is returned.

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps