rust-qt / ritual

Use C++ libraries from Rust
Apache License 2.0
1.24k stars 49 forks source link

Simple example of how to integrate a basic C++ library? #69

Closed vlovich closed 4 years ago

vlovich commented 6 years ago

I can't seem to find any documentation or example on how to integrate cpp_to_rust for my own C++ library. Would it be possible to provide a simple "hello world" example?

Riateche commented 6 years ago

The full_run test contains code required to process a basic C++ library. We definitely need a detailed example, but I'd rather do it after the current big changes are completed.

vlovich commented 6 years ago

Yeah, full_run has some stuff, but looking at the Qt generator, it looks to be very incomplete, at least as far as doing it for C++ libraries that use Qt themselves (e.g. Qt 3d view needs inheritance to catch the GL events). I kind of got it working, but even still I have very little confidence about whether or not I wrote it correctly.

Riateche commented 4 years ago

An example of integrating a basic library is now available here.