llvmint

Crates.iollvmint
lib.rsllvmint
version0.0.3
sourcesrc
created_at2015-01-19 07:43:27.805238
updated_at2017-04-03 14:51:55.388003
descriptionBindings to (almost) all LLVM intrinsics, for all platforms.
homepagehttps://github.com/aweinstock314/llvmint
repositoryhttps://github.com/aweinstock314/llvmint
max_upload_size
id821
size3,757,701
Avi Weinstock (aweinstock314)

documentation

https://docs.rs/llvmint

README

LLVMint

Raw Rust bindings to (essentially) all LLVM intrinsics. This library does little to protect you against using intrinsics on platforms they don't support and generally doesn't do any error checking.

The bindings in this lib are autogenerated from the LLVM sources, so LLVM crashes caused by using it are likely to be due to misuses or insufficiently specific target-cpu/target-feature directives rather than the library itself (although it is of course possible for the library to have bugs too).

This is highly experimental and currently just pins to whatever version of LLVM works for me. I'll look into better versioning more seriously if rustc starts sticking to released versions of LLVM, and once I'm more happy with the experimentation.

Regenerating

To (re)create the table of intrinsics allintrinsics.td:

# directory containing a rust-lang/rust checkout
RUST=~/rust
cat ${RUST}/src/llvm/include/llvm/IR/Intrinsics*.td > allintrinsics.td

To recreate the library file:

cd generator
cargo build --release
./target/release/generator < ../allintrinsics.td > ../src/lib.rs

Why not a build script? Partly because I haven't written one, partly because I don't want to require users to have access to the info necessary from LLVM, so just checking the output into VC is easy.

Commit count: 24

cargo fmt