diff --git a/bin/tau/taud/Cargo.toml b/bin/tau/taud/Cargo.toml
index e1999b277..f6bcb55e3 100644
--- a/bin/tau/taud/Cargo.toml
+++ b/bin/tau/taud/Cargo.toml
@@ -8,6 +8,14 @@ license = "AGPL-3.0-only"
homepage = "https://dark.fi"
repository = "https://github.com/darkrenaissance/darkfi"
+[lib]
+name = "taud"
+path = "src/lib.rs"
+
+[[bin]]
+name = "taud"
+path = "src/main.rs"
+
[dependencies]
darkfi = { path = "../../../", features = ["event-graph", "rpc", "bs58"]}
darkfi-serial = { path = "../../../src/serial" }
diff --git a/bin/tau/taud/src/jsonrpc.rs b/bin/tau/taud/src/jsonrpc.rs
index c126fcb8b..358254c17 100644
--- a/bin/tau/taud/src/jsonrpc.rs
+++ b/bin/tau/taud/src/jsonrpc.rs
@@ -34,7 +34,7 @@ use darkfi::{
Error,
};
-use crate::{
+use taud::{
error::{to_json_result, TaudError, TaudResult},
month_tasks::MonthTasks,
task_info::{Comment, TaskInfo},
diff --git a/bin/tau/taud/src/lib.rs b/bin/tau/taud/src/lib.rs
new file mode 100644
index 000000000..b6fca3c7a
--- /dev/null
+++ b/bin/tau/taud/src/lib.rs
@@ -0,0 +1,22 @@
+/* This file is part of DarkFi (https://dark.fi)
+ *
+ * Copyright (C) 2020-2023 Dyne.org foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+pub mod error;
+pub mod month_tasks;
+pub mod task_info;
+pub mod util;
diff --git a/bin/tau/taud/src/main.rs b/bin/tau/taud/src/main.rs
index b8070c54f..90c7510b3 100644
--- a/bin/tau/taud/src/main.rs
+++ b/bin/tau/taud/src/main.rs
@@ -56,21 +56,20 @@ use darkfi::{
Error, Result,
};
-mod error;
mod jsonrpc;
-mod month_tasks;
mod settings;
-mod task_info;
-mod util;
-use crate::{
+use taud::{
error::{TaudError, TaudResult},
- jsonrpc::JsonRpcInterface,
- settings::{Args, CONFIG_FILE, CONFIG_FILE_CONTENTS},
task_info::{TaskEvent, TaskInfo},
util::pipe_write,
};
+use crate::{
+ jsonrpc::JsonRpcInterface,
+ settings::{Args, CONFIG_FILE, CONFIG_FILE_CONTENTS},
+};
+
fn get_workspaces(settings: &Args) -> Result> {
let mut workspaces = HashMap::new();
diff --git a/bin/tau/taud/src/task_info.rs b/bin/tau/taud/src/task_info.rs
index eda51f989..16d72952e 100644
--- a/bin/tau/taud/src/task_info.rs
+++ b/bin/tau/taud/src/task_info.rs
@@ -191,21 +191,21 @@ impl Comment {
#[derive(Clone, Debug, SerialEncodable, SerialDecodable, PartialEq)]
pub struct TaskInfo {
- pub(crate) ref_id: String,
- pub(crate) workspace: String,
- pub(crate) id: u32,
- pub(crate) title: String,
- tags: Vec,
- desc: String,
- pub(crate) owner: String,
- assign: Vec,
- project: Vec,
- due: Option,
- rank: Option,
- created_at: Timestamp,
- state: String,
- pub(crate) events: Vec,
- comments: Vec,
+ pub ref_id: String,
+ pub workspace: String,
+ pub id: u32,
+ pub title: String,
+ pub tags: Vec,
+ pub desc: String,
+ pub owner: String,
+ pub assign: Vec,
+ pub project: Vec,
+ pub due: Option,
+ pub rank: Option,
+ pub created_at: Timestamp,
+ pub state: String,
+ pub events: Vec,
+ pub comments: Vec,
}
impl From<&TaskInfo> for JsonValue {