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

Use Bazel rules for Rust code #28

Closed
tiziano88 opened this issue Mar 29, 2019 · 4 comments
Closed

Use Bazel rules for Rust code #28

tiziano88 opened this issue Mar 29, 2019 · 4 comments

Comments

@tiziano88
Copy link
Collaborator

We are currently using Bazel for most of the C++ code, but Rust code is still built using cargo, and Rust protobuf are built manually by installing and running the protoc compiler, which makes achieving reproducible builds hard.

We should instead rely on https://github.com/bazelbuild/rules_rust , possibly by auto-generating BUILD files from the current Cargo.toml files using https://github.com/google/cargo-raze.

@wildarch
Copy link
Contributor

I have some experience with building Rust for no_std targets using rules_rust and cargo-raze, so I might be able to look into this.

It would probably be good if we allowed people to at least build the SDK with cargo as well. We could try to support both Cargo and Bazel as build systems?

@blaxill
Copy link
Contributor

blaxill commented Feb 21, 2020

I think the intention is for the SDK to remain cargo-buildable, the priority of Bazel rules is for getting the rust runtime buildable with the same build chain as the other runtime components (Asylo, cpp runtime) so it's easier to link them together.

There is some outstanding work to be done on the runtime before it's fully no_std compatible #546

@ipetr0v
Copy link
Contributor

ipetr0v commented Jun 29, 2020

Since we currently mostly use cargo (b2512de), should this issue be closed?

@daviddrysdale
Copy link
Contributor

Yep, I think so.

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

5 participants