Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4 updates #121

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
aarch64-unknown-linux-musl
powerpc64le-unknown-linux-gnu
armv5te-unknown-linux-gnueabi
loongarch64-unknown-linux-gnu
- run: cargo check --tests -vv
- run: cargo check --tests -vv --target=x86_64-unknown-linux-musl
- run: cargo check --tests -vv --target=x86_64-unknown-linux-gnux32
Expand All @@ -63,6 +64,7 @@ jobs:
- run: cargo check --tests -vv --target=aarch64-unknown-linux-musl
- run: cargo check --tests -vv --target=powerpc64le-unknown-linux-gnu
- run: cargo check --tests -vv --target=armv5te-unknown-linux-gnueabi
- run: cargo check --tests -vv --target=loongarch64-unknown-linux-gnu

gen:
name: Update generated files
Expand All @@ -73,5 +75,5 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main'
sudo apt install libclang-dev
cd gen && cargo run --release
cd gen && LD_LIBRARY_PATH=/usr/lib/llvm-19/lib cargo run --release
git diff --exit-code
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,20 @@ static_assertions = "1.1.0"
libc = "0.2.100"

[package.metadata.docs.rs]
features = ["default", "ioctl", "netlink", "io_uring", "if_ether", "net", "prctl", "elf", "xdp", "mempolicy", "system"]
features = ["default", "bootparam", "ioctl", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "prctl", "elf", "xdp", "mempolicy", "system", "loop_device"]
targets = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]

# The rest of this file is auto-generated!
[features]
bootparam = []
errno = []
general = []
if_arp = []
if_ether = []
if_packet = []
io_uring = []
ioctl = []
loop_device = []
mempolicy = []
net = []
netlink = []
Expand Down
10 changes: 10 additions & 0 deletions gen/ioctl/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ qemu-mips64el -L /usr/mips64el-linux-gnuabi64 ./main.exe >> "$out"
mipsel-linux-gnu-gcc -Iinclude -c list.c $cflags
mipsel-linux-gnu-gcc main.c list.o -o main.exe $cflags
qemu-mipsel -L /usr/mipsel-linux-gnu ./main.exe >> "$out"

# RISCV32 tolchains are not yet packaged by major distributions e.g. debian etc.
# Therefore download it from https://github.com/riscv-collab/riscv-gnu-toolchain/releases
# e.g. riscv32-glibc-ubuntu-22.04-gcc-nightly-2024.02.02-nightly.tar.gz
# install it into /opt and then running below commands will succeed
# /opt/riscv/bin/riscv32-unknown-linux-gnu-gcc --sysroot=/opt/riscv/sysroot/ -Iinclude -c list.c $cflags
# /opt/riscv/bin/riscv32-unknown-linux-gnu-gcc --sysroot=/opt/riscv/sysroot/ main.c list.o -o main.exe $cflags
# /opt/riscv/bin/qemu-riscv32 -L /opt/riscv/sysroot/ ./main.exe >> "$out"
cat riscv32-ioctls.txt >> "$out"

riscv64-linux-gnu-gcc -Iinclude -c list.c $cflags
riscv64-linux-gnu-gcc main.c list.o -o main.exe $cflags
qemu-riscv64 -L /usr/riscv64-linux-gnu ./main.exe >> "$out"
Expand Down
Loading
Loading