-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Bazel Workspace with initial targets
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]>
- Loading branch information
Showing
6 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.28.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") | ||
|
||
############################################## | ||
# # | ||
# Rust # | ||
# # | ||
############################################## | ||
http_archive( | ||
name = "io_bazel_rules_rust", | ||
sha256 = "29d9fc1cdbd737c51db5983d1ac8e64cdc684c4683bafbcc624d3d81de92a32f", | ||
strip_prefix = "rules_rust-8417c8954efbd0cefc8dd84517b2afff5e907d5a", | ||
urls = [ | ||
"https://github.com/bazelbuild/rules_rust/archive/8417c8954efbd0cefc8dd84517b2afff5e907d5a.tar.gz", | ||
], | ||
) | ||
|
||
http_archive( | ||
name = "bazel_skylib", | ||
sha256 = "eb5c57e4c12e68c0c20bc774bfbc60a568e800d025557bc4ea022c6479acc867", | ||
strip_prefix = "bazel-skylib-0.6.0", | ||
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.6.0.tar.gz", | ||
) | ||
|
||
load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repository_set") | ||
|
||
rust_repository_set( | ||
name = "rust_linux_x86_64", | ||
exec_triple = "x86_64-unknown-linux-gnu", | ||
extra_target_triples = [], | ||
iso_date = "2019-05-22", | ||
version = "nightly", | ||
) | ||
|
||
load("@io_bazel_rules_rust//:workspace.bzl", "bazel_version") | ||
|
||
bazel_version(name = "bazel_version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library") | ||
|
||
rust_library( | ||
name = "sgx_libc", | ||
srcs = glob(["src/*.rs"]), | ||
crate_features = ["align"], | ||
edition = "2018", | ||
visibility = ["//visibility:public"], | ||
deps = ["//sgx_types"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library") | ||
|
||
rust_library( | ||
name = "sgx_trts", | ||
srcs = glob(["src/*.rs"]), | ||
edition = "2018", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//sgx_libc", | ||
"//sgx_types", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library") | ||
|
||
rust_library( | ||
name = "sgx_types", | ||
visibility = ["//visibility:public"], | ||
edition = "2018", | ||
srcs = glob(["src/*.rs"]), | ||
deps = [], | ||
) |