| # Copyright 2023 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/rust/rustc_library.gni") |
| |
| assert(is_host, "protocols is for use with the host toolchain only") |
| |
| rustc_library("lib") { |
| name = "ffx_ssh" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/developer/ffx/config:lib", |
| "//src/developer/ffx/lib/compat_info:lib", |
| "//src/developer/ffx/lib/netext:lib", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:base64", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:ring", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tokio", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ |
| "src/config.rs", |
| "src/lib.rs", |
| "src/parse.rs", |
| "src/ssh.rs", |
| "src/ssh_key.rs", |
| ] |
| |
| inputs = [ |
| "testdata/test1_ed25519", |
| "testdata/test1_authorized_keys", |
| "default_ssh_config", |
| ] |
| } |
| |
| group("target") { |
| testonly = true |
| |
| deps = [ ":lib" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":lib_test" ] |
| } |
| |
| group("ssh") { |
| testonly = true |
| |
| deps = [ |
| ":lib", |
| ":tests", |
| ] |
| } |