#llvm #rustup #installed #component #path #llvm-tools-preview

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

#1058 in Development tools

Download history 2302/week @ 2024-03-14 2357/week @ 2024-03-21 2243/week @ 2024-03-28 3286/week @ 2024-04-04 2454/week @ 2024-04-11 2452/week @ 2024-04-18 2168/week @ 2024-04-25 2513/week @ 2024-05-02 2520/week @ 2024-05-09 2743/week @ 2024-05-16 2090/week @ 2024-05-23 2368/week @ 2024-05-30 2411/week @ 2024-06-06 2868/week @ 2024-06-13 2145/week @ 2024-06-20 2135/week @ 2024-06-27

10,011 downloads per month
Used in 10 crates (6 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