Displaying 5 results from an estimated 5 matches for "libramdisk".
2019 Aug 16
2
Re: [nbdkit PATCH 1/2] rust: Implement can_cache
On 8/16/19 12:08 PM, Eric Blake wrote:
> Implementing extents requires some coordination for the Rust code to
> call back into libnbdkit; I'm not familiar with Rust enough to do
> that. But with placeholders for those slots, implementing
> can_cache/cache is trivial. This improves the situation mentioned in
> commit 031fae85.
>
> Signed-off-by: Eric Blake
2019 Aug 16
1
Re: [nbdkit PATCH 1/2] rust: Implement can_cache
...hen we have several other utility functions
> > like nbdkit_realpath() that could be useful).
>
> Also, we are lacking a tests/*rust* usage; it would be nice if 'make
> check' covered a Rust plugin (more than just running 'nbdkit
> plugins/rust/target/release/examples/libramdisk.so').
We certainly do need tests for the Rust plugin. Actually placing them
in tests/ might be difficult because Rust assumes a build environment
(called cargo) and that requires a bunch of files.
Since we already have cargo files it's probably better to put the
tests for this plugin nex...
2019 Aug 16
0
Re: [nbdkit PATCH 1/2] rust: Implement can_cache
...bdkit_add_extent(), and then we have several other utility functions
> like nbdkit_realpath() that could be useful).
Also, we are lacking a tests/*rust* usage; it would be nice if 'make
check' covered a Rust plugin (more than just running 'nbdkit
plugins/rust/target/release/examples/libramdisk.so').
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
2019 Feb 08
0
[PATCH nbdkit] Add support for writing plugins in Rust.
...TWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+include $(top_srcdir)/common-rules.mk
+
+EXTRA_DIST = \
+ Cargo.toml.in \
+ examples/ramdisk.rs \
+ nbdkit-rust-plugin.pod \
+ src/lib.rs
+
+if HAVE_RUST
+
+noinst_SCRIPTS = \
+ target/release/libnbdkit.rlib \
+ target/release/examples/libramdisk.so
+
+target/release/libnbdkit.rlib: Cargo.toml src/lib.rs
+ cargo build --release
+
+target/release/examples/libramdisk.so: Cargo.toml examples/ramdisk.rs
+ cargo build --release --example ramdisk
+
+if HAVE_POD
+
+man_MANS = nbdkit-rust-plugin.3
+CLEANFILES += $(man_MANS)
+
+nbdkit-rust-plugin.3:...
2019 Feb 08
3
[PATCH nbdkit] Add support for writing plugins in Rust.
This adds very rough support for writing nbdkit plugins in Rust. This
is not very idiomatic -- essentially we're handling the direct C calls
from nbdkit in Rust. We have to use ‘unsafe’ in a few places because
there's no way to tell the Rust code that nbdkit satisfies guarantees
(eg. around thread safety, always returning leaked pointers back to
the close function, always doing bounds