Skip to content

Commit

Permalink
aya-obj: migrate bindgen destination
Browse files Browse the repository at this point in the history
Aya::obj depends on bindgen generated files, and we start
by migrating bindgen generated files.

This commit adds the new aya-obj crate to the workplace
and migrates generated files into the crate. We use core
instead of std in an effort to make the final crate no_std.

Bindgen was run against libbpf v1.0.1.

Refs: #473
  • Loading branch information
yesh0 committed Jan 2, 2023
1 parent c6f93b1 commit 81bc307
Show file tree
Hide file tree
Showing 18 changed files with 1,036 additions and 991 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[workspace]
members = [
"aya", "aya-tool", "aya-log", "aya-log-common", "aya-log-parser", "test/integration-test", "test/integration-test-macros", "xtask",
"aya", "aya-obj", "aya-tool", "aya-log", "aya-log-common", "aya-log-parser", "test/integration-test", "test/integration-test-macros", "xtask",
# macros
"aya-bpf-macros", "aya-log-ebpf-macros",
# ebpf crates
"bpf/aya-bpf", "bpf/aya-bpf-bindings", "bpf/aya-log-ebpf", "test/integration-ebpf"
]
default-members = ["aya", "aya-tool", "aya-log", "aya-bpf-macros", "aya-log-ebpf-macros"]
default-members = ["aya", "aya-obj", "aya-tool", "aya-log", "aya-bpf-macros", "aya-log-ebpf-macros"]

[profile.dev]
panic = "abort"
Expand Down
13 changes: 13 additions & 0 deletions aya-obj/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "aya-obj"
version = "0.11.0"
description = "A library for loading and relocating eBPF object files"
keywords = ["ebpf", "bpf", "linux", "kernel"]
license = "MIT OR Apache-2.0"
authors = ["The Aya Contributors"]
repository = "https://github.com/aya-rs/aya"
readme = "README.md"
documentation = "https://docs.rs/aya-obj"
edition = "2021"

[dependencies]
1 change: 1 addition & 0 deletions aya-obj/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# aya-obj
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* automatically generated by rust-bindgen 0.60.1 */
/* automatically generated by rust-bindgen 0.63.0 */

pub type __u8 = ::std::os::raw::c_uchar;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __u32 = ::std::os::raw::c_uint;
pub type __u8 = ::core::ffi::c_uchar;
pub type __u16 = ::core::ffi::c_ushort;
pub type __u32 = ::core::ffi::c_uint;
pub mod bpf_core_relo_kind {
pub type Type = ::std::os::raw::c_uint;
pub type Type = ::core::ffi::c_uint;
pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0;
pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1;
pub const BPF_CORE_FIELD_EXISTS: Type = 2;
Expand Down
Loading

0 comments on commit 81bc307

Please sign in to comment.