After a lot of work, I have the example 1 working with a mix of automatic (using autocxx) and manual (using cxx as you do). I believe this approach scales better as most of the "bare" Rust bindings for C++ methods is done automatically. You can see the code here.
I also took different design decisions. In particular I (ab)used the Deref trait to express sub-class relationship. It seems to work well (Deref is tried transitively by Rust when seeking a method) but that is something worth discussing. Let me know what you think.
After a lot of work, I have the example 1 working with a mix of automatic (using
autocxx) and manual (usingcxxas you do). I believe this approach scales better as most of the "bare" Rust bindings for C++ methods is done automatically. You can see the code here.I also took different design decisions. In particular I (ab)used the
Dereftrait to express sub-class relationship. It seems to work well (Derefis tried transitively by Rust when seeking a method) but that is something worth discussing. Let me know what you think.