On Thu, Aug 10, 2023 at 11:24:27AM +0000, Tage Johansson wrote:
> This is the 7th version of the Rust bindings for Libnbd. It is more or
> less identical to the 6th version without the already merged patches.
> 
> Best regards,
> Tage
>

I still hope to do more review of both merged patches and this one (in
part, to learn more about Rust myself).  But my first observation is
that you currently have several build failures on different platforms.
Here's some CI links summarizing the types of failures I'm seeing,
when I try to turn on --enable-rust as part of our CI coverage:

On Debian 12 (similar on Ubuntu):
https://gitlab.com/ebblake/libnbd/-/jobs/4886374776
line 261:
Get:105 http://deb.debian.org/debian bookworm/main amd64 cargo amd64 
0.66.0+ds1-1 [3419 kB]
line 3717..:
 Documenting libnbd v0.1.0 (/builds/ebblake/libnbd/rust)
error[E0432]: unresolved imports `std::os::fd::AsRawFd`, 
`std::os::fd::OwnedFd`, `std::os::fd::RawFd`
  --> src/bindings.rs:30:19
   |
30 | use std::os::fd::{AsRawFd, OwnedFd, RawFd};
   |                   ^^^^^^^  ^^^^^^^  ^^^^^ no `RawFd` in `os::fd`
   |                   |        |
   |                   |        no `OwnedFd` in `os::fd`
   |                   no `AsRawFd` in `os::fd`
error[E0412]: cannot find type `c_uint` in this scope
   --> src/bindings.rs:120:30
    |
120 |   where F: FnMut(&[u8], u64, c_uint, &mut c_int) -> c_int + Send + Sync
    |                              ^^^^^^ not found in this scope
    |
help: consider importing one of these items
    |
24  | use core::ffi::c_uint;
    |
24  | use libc::c_uint;
    |
24  | use std::os::raw::c_uint;
    |
...
Line 5248..:
error[E0603]: module `fd` is private
  --> src/bindings.rs:30:14
   |
30 | use std::os::fd::{AsRawFd, OwnedFd, RawFd};
   |              ^^ private module
   |
note: the module `fd` is defined here
Line 5270..:
   Compiling libnbd v0.1.0 (/builds/ebblake/libnbd/rust)
error[E0432]: unresolved imports `std::os::fd::AsRawFd`, 
`std::os::fd::OwnedFd`, `std::os::fd::RawFd`
  --> src/bindings.rs:30:19
   |
30 | use std::os::fd::{AsRawFd, OwnedFd, RawFd};
   |                   ^^^^^^^  ^^^^^^^  ^^^^^ no `RawFd` in `os::fd`
   |                   |        |
   |                   |        no `OwnedFd` in `os::fd`
   |                   no `AsRawFd` in `os::fd`
Line 7120..:
error[E0599]: no method named `cast_mut` found for raw pointer `*const i8` in 
the current scope
    --> src/bindings.rs:4231:48
     |
4231 |   queries_ffi_c_strs.iter().map(|x| x.as_ptr().cast_mut()).collect();
     |                                                ^^^^^^^^ help: there is 
an associated function with a similar name: `as_mut`
     |
     = note: try using `<*const T>::as_ref()` to get a reference to the type 
behind the pointer: 
https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
     = note: using `<*const T>::as_ref()` on a pointer which is unaligned or 
points to invalid or uninitialized memory is undefined behavior


On to the next one. Centos-stream-8 (and almalinux):
https://gitlab.com/ebblake/libnbd/-/jobs/4886374755
Line 18: cargo                            x86_64  
1.69.0-1.module_el8+430+506bc849          appstream   4.9 M
https://gitlab.com/ebblake/libnbd/-/jobs/4886374755/artifacts/external_file/rust/test-suite.log
   Compiling libnbd v0.1.0 (/builds/ebblake/libnbd/rust)
   Compiling tempfile v3.7.1
error[E0658]: use of unstable library feature 'arc_into_inner'
  --> tests/test_245_opt_list_meta_queries.rs:49:16
   |
49 |     let info = Arc::into_inner(info).unwrap().into_inner().unwrap();
   |                ^^^^^^^^^^^^^^^
   |
   = note: see issue #106894 <https://github.com/rust-lang/rust/issues/106894> 
for more information



-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to