Skip to content

Commit

Permalink
linkd: Add binary
Browse files Browse the repository at this point in the history
A very thin and light wrapper around the `node::run` exposed from the
node lib crate, so `linkd` exists as a deploy target.

Bootstrapping a whole new workspace which is excluded from root, allows
for a checked in `Cargo.lock` without affecting the lib crates.
Historically this used to be the role of radicle-bins.

Signed-off-by: Alexander Simmerl <[email protected]>
  • Loading branch information
xla committed Sep 14, 2021
1 parent 420d2f9 commit ca14218
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ members = [
"std-ext",
"test",
]
exclude = [
"bins"
]

[patch.crates-io.git2]
git = "https://github.com/radicle-dev/git2-rs.git"
Expand Down
8 changes: 8 additions & 0 deletions bins/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[workspace]
members = [
"linkd"
]

[patch.crates-io.thrussh-encoding]
git = "https://github.com/FintanH/thrussh.git"
branch = "generic-agent"
1 change: 1 addition & 0 deletions bins/linkd.key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��:�5-B|��d��kGk���H2�(�ܞ��I
15 changes: 15 additions & 0 deletions bins/linkd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "linkd"
version = "0.1.0"
edition = "2018"
license = "GPL-3.0-or-later"
authors = [
"xla <[email protected]>",
]

[dependencies]
tokio = { version = "1.10", default-features = false, features = [ "macros", "process", "rt-multi-thread" ] }

[dependencies.node-lib]
path = "../../node-lib"
version = "0.1.0"
13 changes: 13 additions & 0 deletions bins/linkd/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright © 2021 The Radicle Link Contributors
//
// This file is part of radicle-link, distributed under the GPLv3 with Radicle
// Linking Exception. For full terms see the included LICENSE file.

use node_lib::node::run;

#[tokio::main]
async fn main() {
if let Err(e) = run().await {
eprintln!("linkd failed: {:?}", e);
}
}

0 comments on commit ca14218

Please sign in to comment.