blob: 3c53ac675a830176740617b78ca7f2bb34763c20 [file] [log] [blame]
# Copyright 2022 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/components.gni")
import("//build/rust/rustc_binary.gni")
import("//src/starnix/kernel/starnix.gni")
group("runner") {
deps = [
":starnix_package",
"//src/starnix/kernel:starnix_kernel_package",
]
}
rustc_binary("starnix_runner_bin") {
name = "starnix_runner"
edition = "2021"
with_unit_tests = true
source_root = "main.rs"
deps = [
":starnix_runner_config",
"//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_rust",
"//sdk/fidl/fuchsia.settings:fuchsia.settings_rust",
"//sdk/fidl/fuchsia.starnix.runner:fuchsia.starnix.runner_rust",
"//sdk/rust/zx",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/trace/rust:trace-provider",
"//src/starnix/lib/kernel_manager",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-channel",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
]
sources = [ "main.rs" ]
configs += [ "//src/starnix/config:starnix_clippy_lints" ]
}
fuchsia_component_manifest("starnix_runner_component_manifest") {
manifest = "meta/starnix_runner.cml"
component_name = "starnix_runner"
}
# Starnix runner is configured by software assembly.
fuchsia_structured_config_rust_lib("starnix_runner_config") {
cm_label = ":starnix_runner_component_manifest"
}
fuchsia_component("starnix_runner_component") {
cm_label = ":starnix_runner_component_manifest"
deps = [ ":starnix_runner_bin" ]
}
fuchsia_package("starnix_package") {
package_name = "starnix"
subpackages = [ "//src/starnix/kernel:starnix_kernel_package" ]
deps = [
":starnix_runner_bin",
":starnix_runner_component",
":starnix_runner_component_manifest",
"//src/starnix/psi-provider",
]
}
fuchsia_unittest_package("starnix_runner_bin-tests") {
deps = [ ":starnix_runner_bin_test" ]
}
group("tests") {
testonly = true
deps = [ ":starnix_runner_bin-tests" ]
}