From 93b616004abcd624dfad6b83b6a5ae2128ebbfc0 Mon Sep 17 00:00:00 2001 From: Gaius Date: Wed, 12 Apr 2023 18:43:20 +0800 Subject: [PATCH] feat: add default paths and rename dfdaemon to client (#8) Signed-off-by: Gaius --- .github/ISSUE_TEMPLATE/bug-report.md | 5 +- .github/ISSUE_TEMPLATE/custom.md | 3 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/workflows/ci.yml | 2 - .github/workflows/lint.yml | 2 - .gitignore | 2 +- CONTRIBUTING.md | 60 ++++++++-------- Cargo.toml | 20 +++++- README.md | 10 +-- src/bin/dfdaemon/main.rs | 17 +++++ src/bin/dfget/main.rs | 43 ++++++++++++ src/bin/dfstore/main.rs | 17 +++++ src/config/dfdaemon.rs | 53 ++++++++++++++ src/config/dfget.rs | 28 ++++++++ src/config/dfstore.rs | 28 ++++++++ src/config/mod.rs | 84 +++++++++++++++++++++++ src/daemon/mod.rs | 15 ++++ src/lib.rs | 18 +++++ src/main.rs | 1 - 19 files changed, 360 insertions(+), 50 deletions(-) create mode 100644 src/bin/dfdaemon/main.rs create mode 100644 src/bin/dfget/main.rs create mode 100644 src/bin/dfstore/main.rs create mode 100644 src/config/dfdaemon.rs create mode 100644 src/config/dfget.rs create mode 100644 src/config/dfstore.rs create mode 100644 src/config/mod.rs create mode 100644 src/daemon/mod.rs create mode 100644 src/lib.rs delete mode 100644 src/main.rs diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 76db5875..e8d114c7 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,8 +1,7 @@ --- name: Bug Report -about: Report a bug for dfdaemon +about: Report a bug for client labels: bug - --- ### Bug report: @@ -19,7 +18,7 @@ labels: bug ### Environment: -- Dfdaemon version: +- Client version: - OS: - Kernel (e.g. `uname -a`): - Others: diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md index db517b8a..4378cd4b 100644 --- a/.github/ISSUE_TEMPLATE/custom.md +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -1,5 +1,4 @@ --- name: Custom issue template -about: Custom issue template for dfdaemon - +about: Custom issue template for client --- diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 5f8f4f1e..ce0bab98 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,6 +1,6 @@ --- name: Feature Request -about: Request a new feature for dfdameon +about: Request a new feature for client labels: enhancement --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efa2e69f..25b5773d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - with: - submodules: recursive - name: Install stable toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2ef25ed9..4b19c422 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,8 +14,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - with: - submodules: recursive - name: Install stable toolchain uses: actions-rs/toolchain@v1 diff --git a/.gitignore b/.gitignore index ef4fcad1..904dcba8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.dll *.so *.dylib -bin/ +/bin/ # Test binary, built with `go test -c` *.test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69848510..7cd8b22a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to Dfdaemon +# Contributing to Dragonfly Client -It is warmly welcomed if you have the interest to hack on dfdaemon. +It is warmly welcomed if you have the interest to hack on client. First, we encourage this kind of willingness very much. And here is a list of contributing guide for you. @@ -15,19 +15,19 @@ And here is a list of contributing guide for you. Security issues are always treated seriously. As our usual principle, we discourage anyone to spread security issues. -If you find a security issue of dfdaemon, please do not discuss it in +If you find a security issue of client, please do not discuss it in public and even do not open a public issue. Instead, we encourage you to send us a private email to [dragonfly-developers@googlegroups.com](mailto:dragonfly-developers@googlegroups.com) to report this. ## Reporting general issues -To be honest, we regard every user of dfdaemon as a very kind contributor. -After experiencing dfdaemon, you may have some feedback for the project. +To be honest, we regard every user of client as a very kind contributor. +After experiencing client, you may have some feedback for the project. Then feel free to open an issue via -[NEW ISSUE](https://github.com/dragonflyoss/dfdaemon/issues/new). +[NEW ISSUE](https://github.com/dragonflyoss/client/issues/new). -Since we collaborate project dfdaemon in a distributed way, +Since we collaborate project client in a distributed way, we appreciate **WELL-WRITTEN**, **DETAILED**, **EXPLICIT** issue reports. To make the communication more efficient, we wish everyone could search if your issue is an existing one in the searching list. @@ -60,8 +60,8 @@ network locations, private business data and so on. ## Code and doc contribution -Every action to make project dfdaemon better is encouraged. -On GitHub, every improvement for dfdaemon could be +Every action to make project client better is encouraged. +On GitHub, every improvement for client could be via a PR (short for pull request). - If you find a typo, try to fix it! @@ -94,27 +94,27 @@ To put forward a PR, we assume you have registered a GitHub ID. Then you could finish the preparation in the following steps: -1. **FORK** dfdaemon to your repository. +1. **FORK** client to your repository. To make this work, you just need to click the button Fork -in right-left of [dragonflyoss/dfdaemon](https://github.com/dragonflyoss/dfdaemon) +in right-left of [dragonflyoss/client](https://github.com/dragonflyoss/client) main page. Then you will end up with your repository in -`https://github.com//dfdaemon`, +`https://github.com//client`, in which `your-username` is your GitHub username. 1. **CLONE** your own repository to develop locally. -Use `git clone https://github.com//dfdaemon.git` +Use `git clone https://github.com//client.git` to clone repository to your local machine. Then you can create new branches to finish the change you wish to make. 1. **Set Remote** upstream to be - `https://github.com/dragonflyoss/dfdaemon.git` + `https://github.com/dragonflyoss/client.git` using the following two commands: ```bash -git remote add upstream https://github.com/dragonflyoss/dfdaemon.git +git remote add upstream https://github.com/dragonflyoss/client.git git remote set-url --push upstream no-pushing ``` @@ -122,9 +122,9 @@ With this remote setting, you can check your git remote configuration like this: ```bash $ git remote -v -origin https://github.com//dfdaemon.git (fetch) -origin https://github.com//dfdaemon.git (push) -upstream https://github.com/dragonflyoss/dfdaemon.git (fetch) +origin https://github.com//client.git (fetch) +origin https://github.com//client.git (push) +upstream https://github.com/dragonflyoss/client.git (fetch) upstream no-pushing (push) ``` @@ -135,7 +135,7 @@ Adding this, we can easily synchronize local branches with upstream branches. Update local working directory: ```bash -cd dfdaemon +cd client git fetch upstream git checkout main git rebase upstream/main @@ -152,13 +152,13 @@ Make any change on the `new-branch` then build and test your codes. ### Branch Definition Right now we assume every contribution via pull -request is for [branch main](https://github.com/dragonflyoss/dfdaemon/tree/main) -in dfdaemon. Before contributing, +request is for [branch main](https://github.com/dragonflyoss/client/tree/main) +in client. Before contributing, be aware of branch definition would help a lot. As a contributor, keep in mind again that every contribution via pull request is for branch main. -While in project dfdaemon, there are several other branches, +While in project client, there are several other branches, we generally call them rc branches, release branches and backport branches. Before officially releasing a version, @@ -176,7 +176,7 @@ MAJOR.MINOR.PATCH of [SemVer](http://semver.org/). ### Commit Rules -Actually in dfdaemon, we take two rules seriously when committing: +Actually in client, we take two rules seriously when committing: - [Commit Message](#commit-message) - [Commit Content](#commit-content) @@ -223,7 +223,7 @@ we do take more emphasis on code review. ### PR Description -PR is the only way to make change to dfdaemon project files. +PR is the only way to make change to client project files. To help reviewers better get your purpose, PR description could not be too detailed. We encourage contributors to follow the @@ -231,8 +231,8 @@ We encourage contributors to follow the ## Engage to help anything -We choose GitHub as the primary place for dfdaemon to -collaborate. So the latest updates of dfdaemon are always here. +We choose GitHub as the primary place for client to +collaborate. So the latest updates of client are always here. Although contributions via PR is an explicit way to help, we still call for any other ways. @@ -240,9 +240,9 @@ we still call for any other ways. - Help solve other users' problems. - Help review others' PR design. - Help review others' codes in PR. -- Discuss about dfdaemon to make things clearer. -- Advocate dfdaemon technology beyond GitHub. -- Write blogs on dfdaemon and so on. +- Discuss about client to make things clearer. +- Advocate client technology beyond GitHub. +- Write blogs on client and so on. In a word, **ANY HELP IS CONTRIBUTION.** @@ -251,5 +251,5 @@ In a word, **ANY HELP IS CONTRIBUTION.** You can do it in either of two ways: - Submit a PR in the - [dragonflyoss/dfdaemon](https://github.com/dragonflyoss/dfdaemon) repo. + [dragonflyoss/client](https://github.com/dragonflyoss/client) repo. - Contact with the community's [maintainers](MAINTAINERS.md) offline. diff --git a/Cargo.toml b/Cargo.toml index 8f53d358..f89d6051 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,27 @@ [package] -name = "dfdaemon" +name = "client" version = "1.0.0" authors = ["The Dragonfly Developers"] homepage = "https://d7y.io/" -repository = "https://github.com/dragonflyoss/dfdaemon.git" +repository = "https://github.com/dragonflyoss/client.git" description = "Dragonfly client written in Rust" -keywords = ["dragonfly", "d7y", "dfdaemon", "dfget","p2p", "container", "docker-image"] +keywords = ["dragonfly", "d7y", "client", "dfdaemon", "dfget", "dfstore", "p2p", "container", "docker-image"] license = "Apache-2.0" readme = "README.md" edition = "2021" +[[bin]] +name = "dfdaemon" +path = "src/bin/dfdaemon/main.rs" + +[[bin]] +name = "dfget" +path = "src/bin/dfget/main.rs" + +[[bin]] +name = "dfstore" +path = "src/bin/dfstore/main.rs" + [dependencies] +clap = { version = "4.1.13", features = [ "derive" ] } +home = "0.5.4" diff --git a/README.md b/README.md index 67b33b61..6d60fa4e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Dfdaemon +# Dragonfly Client -[![GitHub release](https://img.shields.io/github/release/dragonflyoss/dfdaemon.svg)](https://github.com/dragonflyoss/dfdaemon/releases) -[![CI](https://github.com/dragonflyoss/dfdaemon/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/dragonflyoss/dfdaemon/actions/workflows/ci.yml) -[![Coverage](https://codecov.io/gh/dragonflyoss/dfdaemon/branch/main/graph/badge.svg)](https://codecov.io/gh/dragonflyoss/dfdameon) -[![Open Source Helpers](https://www.codetriage.com/dragonflyoss/dfdaemon/badges/users.svg)](https://www.codetriage.com/dragonflyoss/dfdaemon) +[![GitHub release](https://img.shields.io/github/release/dragonflyoss/client.svg)](https://github.com/dragonflyoss/client/releases) +[![CI](https://github.com/dragonflyoss/client/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/dragonflyoss/client/actions/workflows/ci.yml) +[![Coverage](https://codecov.io/gh/dragonflyoss/client/branch/main/graph/badge.svg)](https://codecov.io/gh/dragonflyoss/dfdameon) +[![Open Source Helpers](https://www.codetriage.com/dragonflyoss/client/badges/users.svg)](https://www.codetriage.com/dragonflyoss/client) [![Discussions](https://img.shields.io/badge/discussions-on%20github-blue?style=flat-square)](https://github.com/dragonflyoss/Dragonfly2/discussions) [![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fdragonfly_oss)](https://twitter.com/dragonfly_oss) [![LICENSE](https://img.shields.io/github/license/dragonflyoss/Dragonfly2.svg?style=flat-square)](https://github.com/dragonflyoss/Dragonfly2/blob/main/LICENSE) diff --git a/src/bin/dfdaemon/main.rs b/src/bin/dfdaemon/main.rs new file mode 100644 index 00000000..140f7054 --- /dev/null +++ b/src/bin/dfdaemon/main.rs @@ -0,0 +1,17 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +fn main() {} diff --git a/src/bin/dfget/main.rs b/src/bin/dfget/main.rs new file mode 100644 index 00000000..ba9232f3 --- /dev/null +++ b/src/bin/dfget/main.rs @@ -0,0 +1,43 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +use clap::Parser; +use std::path::PathBuf; + +#[derive(Debug, Parser)] +#[command( + name = "dfget", + author, + version, + about = "Dragonfly client written in Rust", + long_about = "A download client based on P2P technology in Dragonfly that can download resources of different protocols." +)] +struct Args { + #[arg( + short = 'o', + long = "output", + help = "Specify the output path of downloading file." + )] + output: PathBuf, + + #[arg(short = 'c', long = "config", help = "Specify config file to use.")] + config: PathBuf, +} + +fn main() { + let args = Args::parse(); + print!("{:?}", args.output) +} diff --git a/src/bin/dfstore/main.rs b/src/bin/dfstore/main.rs new file mode 100644 index 00000000..140f7054 --- /dev/null +++ b/src/bin/dfstore/main.rs @@ -0,0 +1,17 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +fn main() {} diff --git a/src/config/dfdaemon.rs b/src/config/dfdaemon.rs new file mode 100644 index 00000000..df2e5204 --- /dev/null +++ b/src/config/dfdaemon.rs @@ -0,0 +1,53 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +use crate::config::*; +use std::path::PathBuf; + +// default_dfdaemon_config_path is the default config path for dfdaemon. +pub fn default_dfdaemon_config_path() -> PathBuf { + default_config_dir().join("dfdaemon.yaml") +} + +// default_dfdaemon_log_dir is the default log directory for dfdaemon. +pub fn default_dfdaemon_log_dir() -> PathBuf { + default_log_dir().join("dfdaemon") +} + +// default_dfdaemon_task_dir is the default tasks directory for dfdaemon. +pub fn default_dfdaemon_tasks_dir() -> PathBuf { + default_data_dir().join("dfdaemon").join("tasks") +} + +// default_dfdaemon_plugin_dir is the default plugin directory for dfdaemon. +pub fn default_dfdaemon_plugin_dir() -> PathBuf { + default_plugin_dir().join("dfdaemon") +} + +// default_dfdaemon_cache_dir is the default cache directory for dfdaemon. +pub fn default_dfdaemon_cache_dir() -> PathBuf { + default_cache_dir().join("dfdaemon") +} + +// default_dfdaemon_unix_socket_path is the default unix socket path for dfdaemon GRPC service. +pub fn default_dfdaemon_unix_socket_path() -> PathBuf { + default_root_dir().join("dfdaemon.sock") +} + +// default_dfdaemon_lock_path is the default file lock path for dfdaemon service. +pub fn default_dfdaemon_lock_path() -> PathBuf { + default_lock_dir().join("dfdaemon.lock") +} diff --git a/src/config/dfget.rs b/src/config/dfget.rs new file mode 100644 index 00000000..e676da2e --- /dev/null +++ b/src/config/dfget.rs @@ -0,0 +1,28 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +use crate::config::*; +use std::path::PathBuf; + +// default_dfget_config_path is the default config path for dfget. +pub fn default_dfget_config_path() -> PathBuf { + default_config_dir().join("dfget.yaml") +} + +// default_dfget_log_dir is the default log directory for dfget. +pub fn default_dfget_log_dir() -> PathBuf { + default_log_dir().join("dfget") +} diff --git a/src/config/dfstore.rs b/src/config/dfstore.rs new file mode 100644 index 00000000..b0d0bf5d --- /dev/null +++ b/src/config/dfstore.rs @@ -0,0 +1,28 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +use crate::config::*; +use std::path::PathBuf; + +// default_dfstore_config_path is the default config path for dfstore. +pub fn default_dfstore_config_path() -> PathBuf { + default_config_dir().join("dfstore.yaml") +} + +// default_dfstore_log_dir is the default log directory for dfstore. +pub fn default_dfstore_log_dir() -> PathBuf { + default_log_dir().join("dfstore") +} diff --git a/src/config/mod.rs b/src/config/mod.rs new file mode 100644 index 00000000..8e491411 --- /dev/null +++ b/src/config/mod.rs @@ -0,0 +1,84 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +use std::path::PathBuf; + +pub mod dfdaemon; +pub mod dfget; +pub mod dfstore; + +// default_root_dir is the default root directory for client. +pub fn default_root_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/var/run/dragonfly/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly"); +} + +// default_lock_dir is the default lock directory for client. +pub fn default_lock_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/var/lock/dragonfly/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly"); +} + +// default_config_dir is the default config directory for client. +pub fn default_config_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/etc/dragonfly/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly").join("config"); +} + +// default_log_dir is the default log directory for client. +pub fn default_log_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/var/log/dragonfly/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly").join("logs"); +} + +// default_data_dir is the default data directory for client. +pub fn default_data_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/var/lib/dragonfly/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly").join("data"); +} + +// default_plugin_dir is the default plugin directory for client. +pub fn default_plugin_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/var/lib/dragonfly/plugins/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly").join("plugins"); +} + +// default_cache_dir is the default cache directory for client. +pub fn default_cache_dir() -> PathBuf { + #[cfg(target_os = "linux")] + return PathBuf::from("/var/cache/dragonfly/"); + + #[cfg(target_os = "macos")] + return home::home_dir().unwrap().join(".dragonfly").join("cache"); +} diff --git a/src/daemon/mod.rs b/src/daemon/mod.rs new file mode 100644 index 00000000..c81dd8ba --- /dev/null +++ b/src/daemon/mod.rs @@ -0,0 +1,15 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 00000000..8ec64db3 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,18 @@ +/* + * Copyright 2023 The Dragonfly Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +pub mod config; +pub mod daemon; diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index f328e4d9..00000000 --- a/src/main.rs +++ /dev/null @@ -1 +0,0 @@ -fn main() {}