An idiomatic Rust wrapper for libclang.
Supported on the stable, beta, and nightly Rust channels.
Released under the Apache License 2.0.
This crate depends on libclang.so
(Linux), libclang.dylib
(OS X), or libclang.dll
(Windows).
These binaries can be either be installed as a part of Clang or downloaded
here.
The libclang
binary will be searched for first by calling llvm-config --libdir
. If this fails,
the libclang
binary will be searched for in likely places (e.g., /usr/local/lib/
on Linux). If
neither of these approaches is successful, you can specify the directory the libclang
binary can
be found in with the LIBCLANG_PATH
environment variable.
If you want to link to libclang
statically, enable the static
feature. You can specify the
directory the various LLVM and Clang static libraries can be found in with the
LIBCLANG_STATIC_PATH
environment variable.
If you do not select a specific version, a common subset API will be availabile. The documentation for this API is here.