Skip to content

Commit 751e007

Browse files
committed
Add rust wrappers over LLVM plugin API
This commit adds: - the main crate implementing FFI over LLVM C++ API - a minimal C++ static lib interfacing with the above crate - a proc-macro crate providing a user-friendly syntax for using the above crate to implement LLVM plugins
1 parent a617165 commit 751e007

File tree

13 files changed

+1401
-9
lines changed

13 files changed

+1401
-9
lines changed

.gitignore

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# Generated by Cargo
2-
# will have compiled files and executables
3-
/target/
4-
5-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
7-
Cargo.lock
8-
9-
# These are backup files generated by rustfmt
101
**/*.rs.bk
2+
**/target
3+
/.cache
4+
**/Cargo.lock

Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[workspace]
2+
3+
members = [
4+
"llvm-plugin",
5+
"llvm-plugin-macros",
6+
]

llvm-plugin-macros/Cargo.toml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "llvm-plugin-macros"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[lib]
7+
proc-macro = true
8+
9+
[dependencies]
10+
proc-macro2 = { version = "1", default-features = false }
11+
syn = { version = "1", features = ["full"] }
12+
quote = {version = "1", default-features = false }

0 commit comments

Comments
 (0)