Giouring
Go programming language port of liburing.
Install / Use
/learn @pawelgaczynski/GiouringREADME
<a name="readme-top"></a>
giouring - about the project
giouring is a Go port of the liburing library. It is written entirely in Go. No cgo.
Almost all functions and structures from liburing was implemented.
- giouring versioning is aligned with liburing versioning.
- giouring is currently up to date with liburing commit: e1e758ae8360521334399c2a6eace05fa518e218
The giouring API is very similar to the liburing API, so anyone familiar with liburing will find it easier when writing code. Significant changes include:
- Method and structure names have been aligned with the naming conventions of the Go language.
- The prefix io_uring has been removed from method and structure names. After importing the package, methods and types will be preceded by the library name: giouring.
- SQE and CQE types have been given full names: SubmissionQueueEntry and CompletionQueueEvent.
- Additionally, if a method primarily pertains to a specific structure, for example, all methods prefixed with io_uring_prep that are related to the SubmissionQueueEntry structure (in liburing: io_uring_sqe), the pointer that was passed in C as a method argument has been moved to the method receiver.
Important notice
- giouring was tested on kernel version 6.2.0-27-generic. Keep in mind that when running unit tests on older kernel versions, some tests may fail because the older kernel may not support some functionality. This will be fixed in the future.
- Test coverage is currently low, but it will be systematically expanded.
Documentation
<p align="right">(<a href="#readme-top">back to top</a>)</p>Used by
<p align="right">(<a href="#readme-top">back to top</a>)</p>Prerequisites
Gain requires Go 1.20+
<p align="right">(<a href="#readme-top">back to top</a>)</p>Implemented structs
| liburing name | Golang liburing port name | Notes | Implemented | | -------- | ------- | ------- | ------- | | io_uring_sq | SubmissionQueue | | :heavy_check_mark: | | io_uring_cq | CompletionQueue | | :heavy_check_mark: | | io_uring | Ring | | :heavy_check_mark: | | io_uring_sqe | SubmissionQueueEntry | | :heavy_check_mark: | | io_uring_cqe | CompletionQueueEvent | | :heavy_check_mark: | | io_sqring_offsets | SQRingOffsets | | :heavy_check_mark: | | io_cqring_offsets | CQRingOffsets | | :heavy_check_mark: | | io_uring_params | Params | | :heavy_check_mark: | | io_uring_files_update | FilesUpdate | | :heavy_check_mark: | | io_uring_rsrc_register | RsrcRegister | | :heavy_check_mark: | | io_uring_rsrc_update | RsrcUpdate | | :heavy_check_mark: | | io_uring_rsrc_update2 | RsrcUpdate2 | | :heavy_check_mark: | | io_uring_probe_op | ProbeOp | | :heavy_check_mark: | | io_uring_probe | Probe | | :heavy_check_mark: | | io_uring_restriction | Restriction | | :heavy_check_mark: | | io_uring_buf | BufAndRing | | :heavy_check_mark: | | io_uring_buf_ring | BufAndRing | | :heavy_check_mark: | | io_uring_buf_reg | BufReg | | :heavy_check_mark: | | io_uring_getevents_arg | GetEventsArg | | :heavy_check_mark: | | io_uring_sync_cancel_reg | SyncCancelReg | | :heavy_check_mark: | | io_uring_file_index_range | FileIndexRange | | :heavy_check_mark: | | io_uring_recvmsg_out | RecvmsgOut | | :heavy_check_mark: |
<p align="right">(<a href="#readme-top">back to top</a>)</p>Implemented methods
| liburing name | Receiver type | Golang liburing port name | Notes | Implemented | | -------- | ------- | ------- | ------- | ------- | | IO_URING_CHECK_VERSION | | | | | | IO_URING_VERSION_MAJOR | | | | | | IO_URING_VERSION_MINOR | | | | | | io_uring_buf_ring_add | BufAndRing | BufRingAdd | | :heavy_check_mark: | | io_uring_buf_ring_advance | BufAndRing | BufRingAdvance | | :heavy_check_mark: | | io_uring_buf_ring_cq_advance | Ring | BufRingCQAdvance | | :heavy_check_mark: | | io_uring_buf_ring_init | BufAndRing | BufRingInit | | :heavy_check_mark: | | io_uring_buf_ring_mask | | BufRingMask | | :heavy_check_mark: | | io_uring_check_version | | CheckVersion | | :heavy_check_mark: | | io_uring_close_ring_fd | Ring | CloseRingFd | | :heavy_check_mark: | | io_uring_cq_advance | Ring | CQAdvance | | :heavy_check_mark: | | io_uring_cq_has_overflow | Ring | CQHasOverflow | | :heavy_check_mark: | | io_uring_cq_ready | Ring | CQReady | | :heavy_check_mark: | | io_uring_cqe_get_data | CompletionQueueEvent | GetData | | :heavy_check_mark: | | io_uring_cqe_get_data64 | CompletionQueueEvent| GetData64 | | :heavy_check_mark: | | io_uring_cqe_seen | Ring | CQESeen | | :heavy_check_mark: | | io_uring_enter | Ring | Enter | | :heavy_check_mark: | | io_uring_enter2 | Ring | Enter2 | | :heavy_check_mark: | | io_uring_for_each_cqe | Ring | ForEachCQE | | :heavy_check_mark: | | io_uring_free_buf_ring | Ring | FreeBufRing | | :heavy_check_mark: | | io_uring_free_probe | | | :heavy_exclamation_mark:unnecessary | :heavy_multiplication_x: | | io_uring_get_events | Ring | GetEvents | | :heavy_check_mark: | | io_uring_get_probe | | GetProbe | | :heavy_check_mark: | | io_uring_get_probe_ring | Ring | GetProbeRing | | :heavy_check_mark: | | io_uring_get_sqe | Ring | GetSQE | | :heavy_check_mark: | | io_uring_major_version | | MajorVersion | | :heavy_check_mark: | | io_uring_minor_version | | MinorVersion | | :heavy_check_mark: | | io_uring_opcode_supported | Probe | IsSupported | | :heavy_check_mark: | | io_uring_peek_cqe | Ring | PeekCQE | | :heavy_check_mark: | | io_uring_prep_accept | SubmissionQueueEntry | PrepareAccept | | :heavy_check_mark: | | io_uring_prep_accept_direct | SubmissionQueueEntry | PrepareAcceptDirect | | :heavy_check_mark: | | io_uring_prep_cancel | SubmissionQueueEntry | PrepareCancel | | :heavy_check_mark: | | io_uring_prep_cancel64 | SubmissionQueueEntry | PrepareCancel64 | | :heavy_check_mark: | | io_uring_prep_close | SubmissionQueueEntry | PrepareClose | | :heavy_check_mark: | | io_uring_prep_close_direct | SubmissionQueueEntry | PrepareCloseDirect | | :heavy_check_mark: | | [io_uring_prep_connect](https://manpages.debian.org/unstable/liburing-dev/io_uring_
