This is the 6th version of the Rust bindings. It solves a problem with
make clean and includes one more patch which I for some reason thought
was already upstream.
Best regards,
Tage
Tage Johansson (13):
generator: Add an optional `formatter` argument to the [output_to]
function in generator/utils.mli. This defaults to [None] and the
only code formatter supported so far is Rustfmt.
rust: create basic Rust bindings
rust: Add a couple of integration tests
rust: Make it possible to run tests with Valgrind
rust: Add some examples
generator: Add information about asynchronous handle calls
generator: Add information about the lifetime of closures
rust: Use more specific closure traits
rust: async: Create an async friendly handle type
generator: Add `modifies_fd` flag to the [call] structure
rust: async: Use the modifies_fd flag to exclude calls
rust: async: Add a couple of integration tests
rust: async: Add an example
.gitignore | 10 +
.ocamlformat | 4 +
Makefile.am | 2 +
configure.ac | 30 +
generator/API.ml | 84 ++
generator/API.mli | 35 +
generator/Makefile.am | 4 +
generator/Rust.ml | 797 ++++++++++++++++++
generator/Rust.mli | 22 +
generator/RustSys.ml | 167 ++++
generator/RustSys.mli | 19 +
generator/generator.ml | 4 +
generator/utils.ml | 13 +-
generator/utils.mli | 8 +-
rust/Cargo.toml | 59 ++
rust/Makefile.am | 106 +++
rust/cargo_test/Cargo.toml | 23 +
rust/cargo_test/README.md | 3 +
rust/cargo_test/src/lib.rs | 31 +
rust/examples/concurrent-read-write.rs | 135 +++
rust/examples/connect-command.rs | 39 +
rust/examples/fetch-first-sector.rs | 38 +
rust/examples/get-size.rs | 29 +
rust/libnbd-sys/Cargo.toml | 32 +
rust/libnbd-sys/build.rs | 26 +
rust/libnbd-sys/src/lib.rs | 19 +
rust/run-tests.sh.in | 39 +
rust/src/async_handle.rs | 268 ++++++
rust/src/error.rs | 157 ++++
rust/src/handle.rs | 67 ++
rust/src/lib.rs | 36 +
rust/src/types.rs | 20 +
rust/src/utils.rs | 23 +
rust/tests/nbdkit_pattern/mod.rs | 28 +
rust/tests/test_100_handle.rs | 25 +
rust/tests/test_110_defaults.rs | 33 +
rust/tests/test_120_set_non_defaults.rs | 53 ++
rust/tests/test_130_private_data.rs | 28 +
rust/tests/test_140_explicit_close.rs | 31 +
rust/tests/test_200_connect_command.rs | 32 +
rust/tests/test_210_opt_abort.rs | 31 +
rust/tests/test_220_opt_list.rs | 86 ++
rust/tests/test_230_opt_info.rs | 120 +++
rust/tests/test_240_opt_list_meta.rs | 147 ++++
rust/tests/test_245_opt_list_meta_queries.rs | 93 ++
rust/tests/test_250_opt_set_meta.rs | 123 +++
rust/tests/test_255_opt_set_meta_queries.rs | 109 +++
rust/tests/test_300_get_size.rs | 35 +
rust/tests/test_400_pread.rs | 39 +
rust/tests/test_405_pread_structured.rs | 79 ++
rust/tests/test_410_pwrite.rs | 58 ++
rust/tests/test_460_block_status.rs | 92 ++
rust/tests/test_620_stats.rs | 75 ++
rust/tests/test_async_100_handle.rs | 25 +
rust/tests/test_async_200_connect_command.rs | 33 +
rust/tests/test_async_210_opt_abort.rs | 32 +
rust/tests/test_async_220_opt_list.rs | 81 ++
rust/tests/test_async_230_opt_info.rs | 122 +++
rust/tests/test_async_240_opt_list_meta.rs | 147 ++++
.../test_async_245_opt_list_meta_queries.rs | 91 ++
rust/tests/test_async_250_opt_set_meta.rs | 122 +++
.../test_async_255_opt_set_meta_queries.rs | 107 +++
rust/tests/test_async_400_pread.rs | 40 +
rust/tests/test_async_405_pread_structured.rs | 84 ++
rust/tests/test_async_410_pwrite.rs | 59 ++
rust/tests/test_async_460_block_status.rs | 92 ++
rust/tests/test_async_620_stats.rs | 76 ++
rust/tests/test_log/mod.rs | 86 ++
rustfmt.toml | 19 +
scripts/git.orderfile | 12 +
70 files changed, 4891 insertions(+), 3 deletions(-)
create mode 100644 .ocamlformat
create mode 100644 generator/Rust.ml
create mode 100644 generator/Rust.mli
create mode 100644 generator/RustSys.ml
create mode 100644 generator/RustSys.mli
create mode 100644 rust/Cargo.toml
create mode 100644 rust/Makefile.am
create mode 100644 rust/cargo_test/Cargo.toml
create mode 100644 rust/cargo_test/README.md
create mode 100644 rust/cargo_test/src/lib.rs
create mode 100644 rust/examples/concurrent-read-write.rs
create mode 100644 rust/examples/connect-command.rs
create mode 100644 rust/examples/fetch-first-sector.rs
create mode 100644 rust/examples/get-size.rs
create mode 100644 rust/libnbd-sys/Cargo.toml
create mode 100644 rust/libnbd-sys/build.rs
create mode 100644 rust/libnbd-sys/src/lib.rs
create mode 100755 rust/run-tests.sh.in
create mode 100644 rust/src/async_handle.rs
create mode 100644 rust/src/error.rs
create mode 100644 rust/src/handle.rs
create mode 100644 rust/src/lib.rs
create mode 100644 rust/src/types.rs
create mode 100644 rust/src/utils.rs
create mode 100644 rust/tests/nbdkit_pattern/mod.rs
create mode 100644 rust/tests/test_100_handle.rs
create mode 100644 rust/tests/test_110_defaults.rs
create mode 100644 rust/tests/test_120_set_non_defaults.rs
create mode 100644 rust/tests/test_130_private_data.rs
create mode 100644 rust/tests/test_140_explicit_close.rs
create mode 100644 rust/tests/test_200_connect_command.rs
create mode 100644 rust/tests/test_210_opt_abort.rs
create mode 100644 rust/tests/test_220_opt_list.rs
create mode 100644 rust/tests/test_230_opt_info.rs
create mode 100644 rust/tests/test_240_opt_list_meta.rs
create mode 100644 rust/tests/test_245_opt_list_meta_queries.rs
create mode 100644 rust/tests/test_250_opt_set_meta.rs
create mode 100644 rust/tests/test_255_opt_set_meta_queries.rs
create mode 100644 rust/tests/test_300_get_size.rs
create mode 100644 rust/tests/test_400_pread.rs
create mode 100644 rust/tests/test_405_pread_structured.rs
create mode 100644 rust/tests/test_410_pwrite.rs
create mode 100644 rust/tests/test_460_block_status.rs
create mode 100644 rust/tests/test_620_stats.rs
create mode 100644 rust/tests/test_async_100_handle.rs
create mode 100644 rust/tests/test_async_200_connect_command.rs
create mode 100644 rust/tests/test_async_210_opt_abort.rs
create mode 100644 rust/tests/test_async_220_opt_list.rs
create mode 100644 rust/tests/test_async_230_opt_info.rs
create mode 100644 rust/tests/test_async_240_opt_list_meta.rs
create mode 100644 rust/tests/test_async_245_opt_list_meta_queries.rs
create mode 100644 rust/tests/test_async_250_opt_set_meta.rs
create mode 100644 rust/tests/test_async_255_opt_set_meta_queries.rs
create mode 100644 rust/tests/test_async_400_pread.rs
create mode 100644 rust/tests/test_async_405_pread_structured.rs
create mode 100644 rust/tests/test_async_410_pwrite.rs
create mode 100644 rust/tests/test_async_460_block_status.rs
create mode 100644 rust/tests/test_async_620_stats.rs
create mode 100644 rust/tests/test_log/mod.rs
create mode 100644 rustfmt.toml
base-commit: 33a47171653931b7e255e33930697a55eae1493b
prerequisite-patch-id: ff317be8e27608697ee070388502566ecf8546bb
prerequisite-patch-id: 6a68a5da00c78e039972118bfde68cf87d7db6af
prerequisite-patch-id: a6ae1f1d90ca8cb69d17c977428855acadd47608
prerequisite-patch-id: 053dc904d579f2d065228c1c5780109871e9cd66
prerequisite-patch-id: 99eb277dfb04af7930cc827d85fd011fc54bdd4c
prerequisite-patch-id: 0b4159540024f935140d070146d89f95b96576fa
prerequisite-patch-id: f320498a380789b51bf65b603c0627167453352c
prerequisite-patch-id: f9aea5f724ac167744aa72456340c370a43611a2
prerequisite-patch-id: 9ff0b41ad9fd00d5d67de92d574255b46cdf150a
prerequisite-patch-id: 1fd2bcd42012e5d0ab10f63a1849f2ccc706e6d6
prerequisite-patch-id: 7c5b4b59f2765e8c255857a0834805d19cecf65d
prerequisite-patch-id: 4d7bd8e07e4710e3420c1ee71502f0fd0da91ea7
prerequisite-patch-id: 5ed2a56efbc9554261f875cd299dd2b7483c78c8
prerequisite-patch-id: 52d475de3ab033859d6bd87996078ae7b3385695
prerequisite-patch-id: c6a05c89340bed6471de1d74ef95acb5b6ac2c25
prerequisite-patch-id: 097dd7285726e45b02493fc306fd3017748d50e2
prerequisite-patch-id: 359900c28144cf2059e23a2911ea9f9f9ca5db23
prerequisite-patch-id: 4db98f7b211c0de9a4095b300970e1973cf0716c
prerequisite-patch-id: 0bb320af5109c1c21e5b76d44e6ec1e7e685fd9f
prerequisite-patch-id: 205525d8ea09e77ea13f43d0720153ed5904dbcd
prerequisite-patch-id: f76cdc6ceca68268df92341985068388f25291ff
prerequisite-patch-id: 84cb140c8f0dd089ca8e9567cc2117bf38c9e558
prerequisite-patch-id: b2c3285d05fd56a258d3ec47d7d4cdcf06a57014
prerequisite-patch-id: 8938eab7a42f8a7ed82c9372be9bf29c2991787f
prerequisite-patch-id: 7694233787dd758add8c30e69965dfd1ffee7012
prerequisite-patch-id: d6bcb838a1875541f3f125b95f346c21a7d614ea
--
2.41.0