This repository was archived by the owner on Nov 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2
2
[ ![ Crates.io] ( https://img.shields.io/crates/v/kvm-bindings.svg )] ( https://crates.io/crates/kvm-bindings )
3
3
![ ] ( https://img.shields.io/crates/l/kvm-bindings.svg )
4
4
# kvm-bindings
5
- Rust FFI bindings to KVM generated using
5
+ Rust FFI bindings to KVM, generated using
6
6
[ bindgen] ( https://crates.io/crates/bindgen ) . It currently has support for the
7
7
following target architectures:
8
8
- x86
9
9
- x86_64
10
10
- arm
11
11
- arm64
12
12
13
+ The bindings exported by this crate are statically generated using header files
14
+ associated with a specific kernel version, and are not automatically synced with
15
+ the kernel version running on a particular host. The user must ensure that
16
+ specific structures, members, or constants are supported and valid for the
17
+ kernel version they are using. For example, the ` immediate_exit ` field from the
18
+ ` kvm_run ` structure is only meaningful if the ` KVM_CAP_IMMEDIATE_EXIT `
19
+ capability is available. Using invalid fields or features may lead to undefined
20
+ behaviour.
21
+
13
22
# Usage
14
23
First, add the following to your ` Cargo.toml ` :
15
24
``` toml
Original file line number Diff line number Diff line change 1
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
+ //! Rust FFI bindings to KVM, generated using [bindgen](https://crates.io/crates/bindgen).
5
+
4
6
#![ allow( non_upper_case_globals) ]
5
7
#![ allow( non_camel_case_types) ]
6
8
#![ allow( non_snake_case) ]
You can’t perform that action at this time.
0 commit comments