Block device I/O library - https://libblkio.gitlab.io/libblkio
Find a file
Stefan Hajnoczi abd488c455 Merge branch 'linker-script' into 'main'
Pass linker arguments to hide unwanted symbols

Closes #82

See merge request libblkio/libblkio!249
2026-01-07 09:08:45 -05:00
blkio blkio/drivers/nvme_io_uring: fix clippy warning 2026-01-06 11:47:49 -05:00
docs spelling fix: Supress 2024-05-02 00:58:04 +03:00
examples examples: introduce variables to store build targets 2024-03-21 00:08:20 +05:00
include Update naming to be consistent across all zoned commands 2023-11-29 22:55:33 +02:00
rpm rpm: update license 2024-08-07 17:11:17 -04:00
src Pass linker arguments to hide unwanted symbols 2026-01-07 05:22:35 +01:00
tests tests: add dependency on examples binaries 2024-03-25 10:21:14 -04:00
virtio-driver virtio-driver: fix "hiding a lifetime that's elided elsewhere is confusing" 2025-10-07 10:25:24 +03:00
.editorconfig Add .editorconfig 2022-04-12 12:48:02 +01:00
.gitignore Add script to run test suites in a VM 2023-04-21 15:53:59 +01:00
.gitlab-ci.yml Update to rustix 0.38 2024-05-06 11:27:06 -04:00
.packit.yaml Packit: initial enablement 2024-01-23 16:55:01 +05:30
build.sh Fix containerized build 2023-07-30 15:51:49 +03:00
Cargo.lock libblkio: bump version to 1.5.0 2024-05-08 14:42:16 -04:00
Cargo.toml libblkio: bump version to 1.5.0 2024-05-08 14:42:16 -04:00
Containerfile Update the containerized build to Fedora 43 2026-01-06 11:54:50 -05:00
containerized-build.sh build: rebuild image when Containerfile has changed 2022-08-09 13:48:14 -04:00
kcov-wrapper.sh tests: add -d | --driver generic option 2022-04-05 14:53:44 +02:00
LICENSE-APACHE LICENSE: relicense to MIT OR APACHE-2.0 2022-08-31 11:43:25 -04:00
LICENSE-MIT LICENSE: relicense to MIT OR APACHE-2.0 2022-08-31 11:43:25 -04:00
LICENSE.crosvm Import crosvm license in LICENSE.crosvm 2022-07-07 10:32:33 +02:00
meson.build examples: allow disabling when built as a subproject 2024-03-21 00:08:20 +05:00
meson_options.txt examples: allow disabling when built as a subproject 2024-03-21 00:08:20 +05:00
package-version.py improve error message when cargo is not found 2023-09-07 10:40:30 +02:00
README.rst README: mention run-test-suites-in-vm.sh 2023-06-20 15:46:08 +02:00
run-test-suites-in-vm.sh run-test-suites-in-vm: update to Fedora 40 2024-04-25 09:57:02 -04:00

========
libblkio
========
------------------------
Block device I/O library
------------------------
libblkio is a library for high-performance block device I/O with support for
multi-queue devices. A C API is provided so that applications can use the
library from most programming languages.

Applications are increasingly integrating high-performance I/O interfaces such
as Linux io_uring, userspace device drivers, and vhost-user device support. The
effort required to add each of these low-level interfaces into an application
is relatively high. libblkio provides a single API for efficiently accessing
block devices and eliminates the need to write custom code for each one.

The libblkio C API is stable and the Rust API is unstable. Available drivers
include Linux io_uring, virtio-blk (vdpa-blk, vhost-user-blk, and VFIO PCI),
and Linux NVMe uring_cmd passthrough.

This library is licensed under either the MIT or Apache 2.0 license at your
option. If you distribute libblkio, please check the licenses of the crates it
depends on using `cargo license` as they may use different licenses.

Documentation
-------------
API documentation is `here <docs/blkio.rst>`_.

Examples
--------
Example programs are located in the `examples/ <examples/>`_ directory and
demonstrate how to use the API.

Installation
------------
The following steps install the library on the local system::

  # dnf install -qy meson rust cargo python3-docutils rustfmt # Fedora/CentOS/RHEL
  # apt-get install -qy meson rustc cargo python3-docutils # Debian/Ubuntu
  # meson setup build
  # meson compile -C build
  # meson install -C build

Development
-----------
Configure a debug build (unoptimized and with debug info) using::

  $ meson setup build --buildtype=debug

Or compile and test locally (also with a debug build) using::

  $ ./containerized-build.sh

This script requires `podman <https://podman.io/>`_ and `buildah
<https://buildah.io/>`_. It should be possible to use Docker with minimal
changes, but the script currently does not support it.

The run-test-suites-in-vm.sh script runs the test suites inside a virtual
machine configured with hardware necessary for the various libblkio drivers.
This can be used for testing without real hardware.

Continuous Integration
----------------------
All merge requests must pass the CI system. `GitLab CI
<https://docs.gitlab.com/ee/ci/>`_ is used for continuous integration. See
`.gitlab-ci.yml` for details of the jobs. If you fork the repository on GitLab
then the CI will run on your personal branches too.

Contact
-------
For questions and discussion, join the `Matrix chat room at
#libblkio:matrix.org <https://matrix.to/#/#libblkio:matrix.org>`_.

Please report bugs and request features on the `issue tracker
<https://gitlab.com/libblkio/libblkio/-/issues>`_.