forked from rustdesk/rustdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/rustdesk/rustdesk into ma…
…ster
- Loading branch information
Showing
34 changed files
with
952 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
github: [rustdesk] | ||
ko_fi: rustdesk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Contributing to RustDesk | ||
|
||
RustDesk welcomes contribution from everyone. Here are the guidelines if you are | ||
thinking of helping us: | ||
|
||
|
||
## Contributions | ||
|
||
Contributions to RustDesk or its dependencies should be made in the form of GitHub | ||
pull requests. Each pull request will be reviewed by a core contributor | ||
(someone with permission to land patches) and either landed in the main tree or | ||
given feedback for changes that would be required. All contributions should | ||
follow this format, even those from core contributors. | ||
|
||
Should you wish to work on an issue, please claim it first by commenting on | ||
the GitHub issue that you want to work on it. This is to prevent duplicated | ||
efforts from contributors on the same issue. | ||
|
||
## Pull Request Checklist | ||
|
||
- Branch from the master branch and, if needed, rebase to the current master | ||
branch before submitting your pull request. If it doesn't merge cleanly with | ||
master you may be asked to rebase your changes. | ||
|
||
- Commits should be as small as possible, while ensuring that each commit is | ||
correct independently (i.e., each commit should compile and pass tests). | ||
|
||
- Commits should be accompanied by a Developer Certificate of Origin | ||
(http://developercertificate.org) sign-off, which indicates that you (and | ||
your employer if applicable) agree to be bound by the terms of the | ||
[project license](LICENSE.md). In git, this is the `-s` option to `git commit` | ||
|
||
- If your patch is not getting reviewed or you need a specific person to review | ||
it, you can @-reply a reviewer asking for a review in the pull request or a | ||
comment, or you can ask for a review via [email](mailto:[email protected]). | ||
|
||
- Add tests relevant to the fixed bug or new feature. | ||
|
||
For specific git instructions, see [GitHub workflow 101](https://github.com/servo/servo/wiki/Github-workflow). | ||
|
||
## Conduct | ||
|
||
We follow the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). | ||
|
||
|
||
## Communication | ||
|
||
RustDesk contributors frequent the [Discord](https://discord.gg/nDceKgxnkV). | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
/target | ||
**/*.rs.bk | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "confy" | ||
version = "0.4.1" | ||
authors = ["Katharina Fey <[email protected]>"] | ||
description = "Boilerplate-free configuration management" | ||
license = "MIT/X11 OR Apache-2.0" | ||
documentation = "https://docs.rs/confy" | ||
repository = "https://github.com/rust-clique/confy" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
serde = "^1.0" | ||
toml = { version = "^0.5", optional = true } | ||
directories = "^2.0" | ||
serde_yaml = { version = "0.8", optional = true } | ||
|
||
[features] | ||
default = ["toml_conf"] | ||
toml_conf = ["toml"] | ||
yaml_conf = ["serde_yaml"] | ||
|
||
[[example]] | ||
name = "simple" | ||
|
||
[dev-dependencies] | ||
serde_derive = "^1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 rust-clique | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# confy | ||
|
||
Chat with us: [Discord](https://discord.gg/dwq4Zme) | ||
|
||
Zero-boilerplate configuration management. | ||
|
||
Focus on storing the right data, instead of worrying about how or where to store it. | ||
|
||
```rust | ||
use serde_derive::{Serialize, Deserialize}; | ||
|
||
#[derive(Default, Debug, Serialize, Deserialize)] | ||
struct MyConfig { | ||
version: u8, | ||
api_key: String, | ||
} | ||
|
||
fn main() -> Result<(), ::std::io::Error> { | ||
let cfg: MyConfig = confy::load("my-app-name")?; | ||
dbg!(cfg); | ||
Ok(()) | ||
} | ||
``` | ||
|
||
## Using yaml | ||
Enabling the `yaml_conf` feature while disabling the default `toml_conf` | ||
feature causes confy to use a YAML config file instead of TOML. | ||
|
||
``` | ||
[dependencies.confy] | ||
features = ["yaml_conf"] | ||
default-features = false | ||
``` | ||
|
||
## Breakings changes | ||
Starting with version 0.4.0 the configuration file are stored in the expected place for your system. See the [`directories`] crates for more information. | ||
Before version 0.4.0, the configuration file was written in the current directory. | ||
|
||
[`directories`]: https://crates.io/crates/directories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//! The most simplest examples of how to use confy | ||
extern crate confy; | ||
|
||
#[macro_use] | ||
extern crate serde_derive; | ||
|
||
#[derive(Debug, Serialize, Deserialize)] | ||
struct ConfyConfig { | ||
name: String, | ||
comfy: bool, | ||
foo: i64, | ||
} | ||
|
||
impl Default for ConfyConfig { | ||
fn default() -> Self { | ||
ConfyConfig { | ||
name: "Unknown".to_string(), | ||
comfy: true, | ||
foo: 42, | ||
} | ||
} | ||
} | ||
|
||
fn main() -> Result<(), confy::ConfyError> { | ||
let cfg: ConfyConfig = confy::load("confy_simple_app")?; | ||
println!("{:#?}", cfg); | ||
Ok(()) | ||
} |
Oops, something went wrong.