On Wed, Apr 15, 2020 at 06:43:52PM +0100, Daniel P. Berrangé wrote:
On Wed, Apr 15, 2020 at 06:04:26PM +0100, Richard W.M. Jones wrote:
> On Wed, Apr 15, 2020 at 05:27:07PM +0100, Daniel P. Berrangé wrote:
> > On Fri, Apr 10, 2020 at 02:51:52PM +0100, Richard W.M. Jones wrote:
> > > Similar to C, OCaml and Rust, this is not a plugin per se. Instead
> > > it's more of a method and set of tests around writing plugins in
> > > golang. They are standalone programs that compile into shared objects
> > > that nbdkit can then load (so there is no "go plugin" between
nbdkit
> > > and the user plugin, unlike in scripting languages like Perl).
> >
> > Why did you choose this approach ?
>
> Do you mean the design of constructing the .so file directly using
> --buildmode=c-shared? I wasn't aware there was any other way to do
> it. Should we use some kind of module loading instead?
No, I was mostly meaning the "copylib" approach to plugins, where the
plugin author owns the whole stack.
OK I see. In fact for the OCaml nbdkit bindings we provide a nice
OCaml library which the end user will link to their code to create the
final plugin. Ideally I want the same thing for Go too. (For Rust,
unfortunately, we didn't get this far yet, so basically Rust plugins
are programmed to the C API.)
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v