xref: /aosp_15_r20/external/crosvm/io_uring/bindgen.sh (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1#!/usr/bin/env bash
2# Copyright 2022 The ChromiumOS Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# Regenerate io_uring bindgen bindings.
7
8set -euo pipefail
9cd "$(dirname "${BASH_SOURCE[0]}")/.."
10
11source tools/impl/bindgen-common.sh
12
13bindgen_generate \
14    --allowlist-type='io_uring_.*' \
15    --allowlist-var='IO_URING_.*' \
16    --allowlist-var='IORING_.*' \
17    "${BINDGEN_LINUX}/include/uapi/linux/io_uring.h" \
18    | replace_linux_int_types | rustfmt \
19    > io_uring/src/bindings.rs
20