Skip to content

Commit

Permalink
Bazelify crates
Browse files Browse the repository at this point in the history
Bug: 349586829
Change-Id: I19ef06e263316ccbc7d21b9ade22eff03e3246c2
  • Loading branch information
tiziano88 committed Jul 3, 2024
1 parent 0943e2d commit 65602b0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
9 changes: 8 additions & 1 deletion bazel/crates/oak_crates_index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,14 @@ def oak_crates_index(cargo_lockfile, lockfile):
),
"maplit": crate.spec(version = "*"),
"nix": crate.spec(
features = ["user", "process", "signal"],
features = [
"mount",
"process",
"signal",
"term",
"ucontext",
"user",
],
version = "0.27.1",
),
"oci-spec": crate.spec(version = "*"),
Expand Down
4 changes: 3 additions & 1 deletion cargo-bazel-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "29000e1cc506207f10f6725fdfd827400c9e64d2df09af5681b12f77c9a8413b",
"checksum": "61cfe6e7048f2d815e448bc3184a6e6466cfe798edf2d389deb7338fa01f9b4c",
"crates": {
"acpi 5.0.0": {
"name": "acpi",
Expand Down Expand Up @@ -13842,6 +13842,8 @@
"process",
"sched",
"signal",
"term",
"ucontext",
"uio",
"user"
],
Expand Down
33 changes: 33 additions & 0 deletions oak_echo_linux_init/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright 2024 The Project Oak Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

load("@rules_rust//rust:defs.bzl", "rust_binary")

package(
default_visibility = ["//visibility:public"],
licenses = ["notice"],
)

rust_binary(
name = "oak_echo_linux_init",
srcs = glob(["src/*.rs"]),
deps = [
"@oak_crates_index//:anyhow",
"@oak_crates_index//:log",
"@oak_crates_index//:nix",
"@oak_crates_index//:simple_logger",
],
)

0 comments on commit 65602b0

Please sign in to comment.