Skip to content

Commit

Permalink
riscv: Add basic riscv bindings
Browse files Browse the repository at this point in the history
Updated arm64, x86_64, and added riscv kvm bindings from v6.9

Signed-off-by: Ruoqing He <[email protected]>
  • Loading branch information
TimePrinciple committed May 13, 2024
1 parent 210be87 commit 24332c0
Show file tree
Hide file tree
Showing 7 changed files with 14,239 additions and 12,172 deletions.
4 changes: 4 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
# Related issue: https://github.com/rust-lang/compiler-builtins/issues/201
[target.aarch64-unknown-linux-musl]
rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]

[target.riscv64gc-unknown-linux-gnu]
rustflags = [ "-C", "target-feature=+crt-static"]
linker = "riscv64-unknown-linux-gnu-gcc"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Rust FFI bindings to KVM, generated using
following target architectures:
- x86_64
- arm64
- riscv

The bindings exported by this crate are statically generated using header files
associated with a specific kernel version, and are not automatically synced with
Expand Down
7,264 changes: 1,575 additions & 5,689 deletions src/arm64/bindings.rs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ pub use self::x86_64::*;
mod arm64;
#[cfg(any(target_arch = "aarch", target_arch = "aarch64"))]
pub use self::arm64::*;

#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
mod riscv;
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
pub use self::riscv::*;
Loading

0 comments on commit 24332c0

Please sign in to comment.