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

sgx_tstd bazel target and it's dependencies #156

Closed
wants to merge 274 commits into from
Closed

sgx_tstd bazel target and it's dependencies #156

wants to merge 274 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 5, 2019

More crates have been ported to bazel including the sgx_tstd crate in pursuit of #52 . Also the libbacktrace has been ported to bazel and compiled successfully.

The sgx_unwind has been linked only with gcc_s for now.
The sgx_tstd only default feature stdio has been enabled.

jasl and others added 19 commits July 22, 2019 03:20
webpki 0.18.1 depends on untrusted 0.6.2, but Cargo resolved 0.7.0 on build, that lead to build failure.
Strict untrusted version for ue-ra-client sample
Added minimal bazel workspace with initialized `rules_rust` with the
nightly compiler set to the date mentioned in `rust-toolchain` file in
root of the repository.

Expanded `.gitignore` with bazel artifacts folders and `bazel`
plugin temp folder.

`sgx_types`, `sgx_libc` and `sgx_trts` have been ported to `rust_library`
bazel targets, with default cargo features set on.

Signed-off-by: Urban Avsec <[email protected]>
The build file now loads all rust files in the linux and android
folders.

Signed-off-by: Urban Avsec <[email protected]>
The allocation target for the `sgx_alloc` has been created

Signed-off-by: Urban Avsec <[email protected]>
Created bazel target for sgx_build_helper crate in the repo.

Signed-off-by: Urban Avsec <[email protected]>
the checked in libbacktrace target has been added to the bazel

Signed-off-by: Urban Avsec <[email protected]>
Sgx_unwind bazel target was added for linux without musl support
only. More targets will be added later

Signed-off-by: Urban Avsec <[email protected]>
Bazel target for `sgx_tstd` has been added enableing the default
crates features set `stdio` only.

Signed-off-by: Urban Avsec <[email protected]>
@ghost
Copy link
Author

ghost commented Sep 5, 2019

Please review the changes. I will try to port some samplecode to use bazel as well, to be able to test that rules work using bazel. Will introduce the sgx rules from google repo as well.

@dingelish
Copy link
Contributor

Thanks sooooooo much bro! But recently I'm gonna push v1.0.9, and I removed the libbacktrace, and added libunwind in sgx_unwind. Of course your previous merged works are included. Could I push my commits first? Sorry for the inconvenience!

@ghost
Copy link
Author

ghost commented Sep 5, 2019

Hey @dingelish, will have a look tomorrow. Shouldn't matter much. Will pull and change the commits.

@tomtau
Copy link

tomtau commented Sep 6, 2019

@Sythanis awesome work!

BTW, for sgx_tstd, the default Bazel Rust rules don't use Cargo, right? One thing I'm thinking is whether it'd be possible to build Rust SGX SDK projects using a stable version of rustc using Bazel -- currently, this is only possible using Xargo @dingelish ? https://github.com/japaric/xargo#std

@ghost
Copy link
Author

ghost commented Sep 8, 2019

@dingelish please feel free to merge 1.0.9 to master. Will refactor the application.

@tomtau, currently having a look at this. I might have to write some custom bazel rules for this, need to see what Rules Rust export out.

I will try to get sample applications working and the see.

@ghost
Copy link
Author

ghost commented Sep 8, 2019

I will be creating new longer lasting branch here that will make my commint managment better. What do you say if we create a bazel branch on main repo as well, which will mirror mine bazel branch. Thus I can release to main, but we can say that bazel is still very unstable

@ghost
Copy link
Author

ghost commented Sep 8, 2019

I have created an issue in rules_rust as xargo functionality replacement in rules_rust might be a bit beyond me still. For the reference bazelbuild/rules_rust#250

@dingelish
Copy link
Contributor

mistakenly closed ... please create a PR again. I'm really sorry.

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.