Rust in Samba example code and slides

Garming Sam garming at catalyst.net.nz
Thu Jun 7 22:41:27 UTC 2018


A few of the guys at Catalyst have been thinking about how to adequately
wrap talloc in Rust. It is probably one the most difficult problems with
integrating it in Samba (alongside probably tevent). The conflicting
memory models (and lifetimes) makes it obviously non-trivial and it's
not clear if it would be better to drop memory in Rust in a talloc way
or to use talloc to drop memory in a Rust-like way. We got as far as
linking and calling a println function from a rust-built library via waf
(with some possible preload hacks), but it was clear that the real
massive hurdle would be to call Samba functions with talloc pointers.

There's all sorts of things you could probably do like, tie Rust objects
to its own talloc object, or avoid the problem of allocation altogether
and leave Rust memory with Rust and talloc memory with Samba with only
opaque pools passed in between. To complicate things, it's almost
certainly the case that different models suit different parts of Samba
better.

Cheers,

Garming


On 07/06/18 20:18, Kai Blin via samba-technical wrote:
> Hi folks,
>
> I've been asked about the example code and slides for the talk I gave
> at SambaXP yesterday. You can find the code at:
>
> https://github.com/kblin/fancy-talk
>
> The slides are linked from the README, and can be found at:
>
> https://kblin.org/talks/sambaxp/2018/rust_in_samba.html#1
>
> Cheers,
> Kai
>




More information about the samba-technical mailing list