Skip to content

Commit

Permalink
vfio-bindings: Initial commit
Browse files Browse the repository at this point in the history
The default bindings are generated from the 5.0.0 Linux userspace API.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Jul 24, 2019
1 parent 4e48309 commit 5372554
Show file tree
Hide file tree
Showing 4 changed files with 2,295 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vfio-bindings/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "vfio-bindings"
version = "0.0.1"
authors = ["The Cloud Hypervisor Authors"]
edition = "2018"

[dependencies]
vmm-sys-util = { git = "https://github.com/rust-vmm/vmm-sys-util" }

[features]
default = ["v5_0_0"]
v5_0_0 = []
16 changes: 16 additions & 0 deletions vfio-bindings/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

// generated with bindgen linux/uapi/linux/vfio.h --constified-enum '*' --with-derive-default
#[cfg(feature = "v5_0_0")]
mod v5_0_0;

pub mod bindings {
#[cfg(feature = "v5_0_0")]
pub use super::v5_0_0::*;
}
6 changes: 6 additions & 0 deletions vfio-bindings/src/v5_0_0/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#![allow(clippy::all)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

pub mod vfio;
Loading

0 comments on commit 5372554

Please sign in to comment.