-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a C++ wrapper around TC FFI #2869
Conversation
(I may need some help getting this to build everywhere... I suspect that none of these builders have Rust!) |
I can definitely figure out how to fix the rust tests, and I'll take a swing at the regular tests too. |
a99408e
to
a5b25af
Compare
Hm, I'll poke at that windows error. It's always windows. |
OK, that's better! I have also renamed |
@tbabej I'll rebase this, but -- any chance you could have a look soon? It is sort of blocking next-steps :) |
Looks like I made the rebasing of this one worse today, I'll take a swing at it. |
This uses CMake to build a simple Rust library (in `src/tc/rust`) that just re-exports everything from the `taskchampion-lib` crate. The C++ wrappers then wrap this into C++ objects with proper lifecycle maintenance, in the `tc` namespace. The C++ wrappers are incomplete, and missing methods are tagged with "TODO". These will be added as needed.
This allows Cargo to handle the linking peculiarities of platforms.
Looks all green, but your review is just a comment -- will you be looking again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good on my end. I was also able to interact the FFI using Python 👍
Awesome, I'm excited to hear it worked from Python too :) |
This uses CMake to build a simple Rust library (in
src/tc/rust
) that just re-exports everything from thetaskchampion-lib
crate. The C++ wrappers then wrap this into C++ objects with proper lifecycle maintenance, in thetc
namespace. More details are in the included docs.The C++ wrappers are incomplete, and missing methods are tagged with "TODO". These will be added as needed.
Refs #2770.