Skip to content
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

Merged
merged 8 commits into from
Jul 30, 2022
Merged

Add a C++ wrapper around TC FFI #2869

merged 8 commits into from
Jul 30, 2022

Conversation

djmitche
Copy link
Collaborator

@djmitche djmitche commented Jul 4, 2022

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. 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.

@djmitche djmitche requested a review from tbabej July 4, 2022 20:52
@djmitche
Copy link
Collaborator Author

djmitche commented Jul 4, 2022

(I may need some help getting this to build everywhere... I suspect that none of these builders have Rust!)

@djmitche djmitche removed the request for review from tbabej July 5, 2022 03:12
@djmitche
Copy link
Collaborator Author

djmitche commented Jul 5, 2022

I can definitely figure out how to fix the rust tests, and I'll take a swing at the regular tests too.

@djmitche djmitche marked this pull request as draft July 5, 2022 03:12
@djmitche djmitche force-pushed the wrap-tc branch 5 times, most recently from a99408e to a5b25af Compare July 7, 2022 01:04
@djmitche djmitche marked this pull request as ready for review July 7, 2022 01:15
@djmitche djmitche requested a review from tbabej July 7, 2022 01:16
@djmitche
Copy link
Collaborator Author

djmitche commented Jul 8, 2022

Hm, I'll poke at that windows error. It's always windows.

@djmitche
Copy link
Collaborator Author

OK, that's better! I have also renamed rust/ to taskchampion/ since that's a better representation of what it contains.

@djmitche
Copy link
Collaborator Author

@tbabej I'll rebase this, but -- any chance you could have a look soon? It is sort of blocking next-steps :)

@tbabej
Copy link
Member

tbabej commented Jul 24, 2022

Looks like I made the rebasing of this one worse today, I'll take a swing at it.

djmitche added 8 commits July 24, 2022 17:02
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.
.gitmodules Show resolved Hide resolved
@djmitche
Copy link
Collaborator Author

Looks all green, but your review is just a comment -- will you be looking again?

Copy link
Member

@tbabej tbabej left a 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 👍

@tbabej tbabej merged commit f5e976a into develop Jul 30, 2022
@djmitche
Copy link
Collaborator Author

Awesome, I'm excited to hear it worked from Python too :)

@felixschurk felixschurk deleted the wrap-tc branch July 7, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants