[Rpm-maint] [rpm-software-management/rpm] Rust bindings for rpmlib (#429)

Tony Arcieri notifications at github.com
Tue Apr 17 14:45:21 UTC 2018


@n3npq can't say I'm super thrilled with the prospects of replacing access to an in-memory data structure with something based on XML

>As for handling tag data, you probably don't want to expose rpmtd to rust directly but convert to native representation [...]
> Worse, any data addition to a header can make the data retrieved with HEADERGET_MINMEM invalid behind your back. HEADERGET_MINMEM should really be considered a historical leftover and an rpm internal thing at best, it's not something you want to build anything on.

Alright, perhaps I can take a step back from the reference-based stuff and take a look at creating "owned" values... although my preferred way to do that in Rust would be for Rust to make a copy itself, as opposed to having rpm allocate the memory and me having to call rpm again to free it. That way Rust owns the memory and I can leverage Rust's built-in destructors.

This was my original plan when I was using a `StreamingIterator`: make `Header` and `rpmtd` access internal to the library only, and expose a real Rust `Iterator` which makes copies of the data it iterates over when exposing them to the end user of the library.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/429#issuecomment-382019238
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180417/13950a7e/attachment.html>


More information about the Rpm-maint mailing list