Closed fdb closed 6 years ago
Thanks @fdb! It looks like that section never got updated when cargo
switched to --bin
by default.
I had to make some more changes to make it work with the latest version of the dependencies + the Rust 2018 edition. I'm not sure if you want those as well, since it looks like you're working on a full rewrite.
I like this version since it integrates with Qt, which is exactly my use case as well and is super-useful.
Just let me know and I can send you some more PRs.
What about contributing a small example of using interoperating between C++/Qt and Rust, similar to the chapter on wrapping libmagic
?
The main reason behind a rewrite is to visit the different techniques and concepts associated with FFI instead of focusing on a single language and framework, but I think it's important to also have worked examples where you explain your thought process while trying to solve a real-world problem. That way people have a resource for binding to Qt without having to read through the 10 or so chapters in the current version.
Cargo's default target when creating a new project is a binary target, meaning a project with a
main.rs
. Since we want a library, we have to be explicit and use the--lib
flag when initialising the project.