blob: feeae2e4394b0d988df94e9262ab4437fba55ad1 [file] [log] [blame]
# Copyright 2018 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/package.gni")
import("//build/rust/rustc_binary.gni")
declare_args() {
# Whether or not prototype account transfer is enabled.
# NOTE: This is not secure and should NOT be enabled for any products! This
# is only for use during local development.
prototype_account_transfer = false
}
rustc_binary("bin") {
name = "account_manager"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.auth:fuchsia.auth-rustc",
"//sdk/fidl/fuchsia.identity.account:fuchsia.identity.account-rustc",
"//sdk/fidl/fuchsia.identity.authentication:fuchsia.identity.authentication-rustc",
"//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc",
"//sdk/fidl/fuchsia.overnet.protocol:fuchsia.overnet.protocol-rustc",
"//sdk/fidl/fuchsia.stash:fuchsia.stash-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/identity/fidl:account-prototype-rustc",
"//src/identity/fidl:account-rustc",
"//src/identity/fidl:account-transfer-rustc",
"//src/identity/lib/account_common",
"//src/identity/lib/token_manager",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:getopts",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/account_event_emitter.rs",
"src/account_handler_connection.rs",
"src/account_handler_context.rs",
"src/account_manager.rs",
"src/account_map.rs",
"src/authenticator_connection.rs",
"src/fake_account_handler_connection.rs",
"src/inspect.rs",
"src/main.rs",
"src/prototype/account_manager_peer.rs",
"src/prototype/account_transfer_control.rs",
"src/prototype/mod.rs",
"src/stored_account_list.rs",
]
}
package("account_manager") {
deps = [ ":bin" ]
binaries = [
{
name = "account_manager"
},
]
meta = [
{
if (prototype_account_transfer) {
path = rebase_path("meta/account_manager_prototype.cmx")
} else {
path = rebase_path("meta/account_manager.cmx")
}
dest = "account_manager.cmx"
},
]
}
group("account_manager_auth_providers") {
public_deps = [ "../google_auth_provider" ]
}