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

Support building and linking C/C++ code to Rust oak_loader #724

Closed
tiziano88 opened this issue Mar 19, 2020 · 3 comments
Closed

Support building and linking C/C++ code to Rust oak_loader #724

tiziano88 opened this issue Mar 19, 2020 · 3 comments

Comments

@tiziano88
Copy link
Collaborator

tiziano88 commented Mar 19, 2020

We will need to keep supporting implementing some of the runtime in C++, and therefore:

  • call from Rust to C++ (e.g. implement some part of a pseudo-node in C++ that can be invoked from Rust)
  • call from C++ to Rust (e.g. the C++ implementation of a pseudo-node may need to read and write to channels)

In order to build the C++ code, we will probably keep relying on Bazel, and invoke the relevant command from a Rust build.rs script.

Ref.:

@tiziano88
Copy link
Collaborator Author

@daviddrysdale assigning to you to figure out what is actually necessary, and how to go about it. Perhaps it would be useful to target a specific piece of functionality that we expect to be keeping in C++, e.g. the roughtime client.

cc @conradgrobler

@tiziano88
Copy link
Collaborator Author

In fact I think roughtime is particularly nice in terms of doing this incrementally, since it may be encapsulated as a stateless C++ function that gets invoked from Rust when necessary to retrieve the time (if we are fine with re-establishing the network connection every time, as opposed to keeping it around as part of a local state).

@daviddrysdale
Copy link
Contributor

No longer relevant after #1016 – we now have a pure Cargo build for the server-side code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants