diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..24bd325 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,39 @@ +# Contributors + +## Create a Feature + +1. (Optional) Describe the problem that the PR is solving in an issue first. +2. Fork the repo and create your feature branch. + - Avoid having multiple features in one branch. See [Separation of Concerns](https://nalexn.github.io/separation-of-concerns/). + - Do not create feature branches in the main repository. +3. Code your feature. + - Commits do NOT need to follow any convention. +4. Create a PR when finished. Use [Conventional Commits format](https://www.conventionalcommits.org/) as the PR title. + - PR title format: `type (module): Summary of the changes`. Possible types are: + - `BREAKING CHANGE` For changes that break the API. + - `feat` For new features. + - `fix` For bug fixes + - `chore` For everything that is not covered in the above types. + - The module is the workspace member name, for example `homeserver`, `client`, or `testnet`. + - Use the [Draft feature](https://github.blog/2019-02-14-introducing-draft-pull-requests/) in case you need an early review. + - Assign a reviewer. Every PR needs to be reviewed at least once. More reviews are possible on request. +5. Always squash the PR when merging. One commit == one feature/fix. + +## Versioning + +1. Merge all PRs in the main branch that you want to include in the next version. +2. Update versions in the workspace [Config.toml](./Cargo.toml). Use [SemVer](https://semver.org/). + - Update the member dependencies too. +4. Create a PR with the title: `chore: vx.x.x`. +5. Let the PR review and squash + merge. +6. Publish each **changed** member with cargo publish + - `cargo publish -p http-relay` + - `cargo publish -p pkarr-republisher` + - `cargo publish -p pubky-common` + - `cargo publish -p pubky-homeserver` + - `cargo publish -p pubky` + - `cargo publish -p pubky-testnet` +7. Create a [new Github release](https://github.com/pubky/pubky-core/releases/new). + - Tag: `vx.x.x` + - Title: `vx.x.x` + - Description: Changelog for the current version. diff --git a/Cargo.lock b/Cargo.lock index 2bd83b9..d1a0957 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "http-relay" -version = "0.3.0-rc.0" +version = "0.5.0-rc.0" dependencies = [ "anyhow", "axum", @@ -2224,7 +2224,7 @@ dependencies = [ [[package]] name = "pkarr-republisher" -version = "0.2.0-rc.0" +version = "0.5.0-rc.0" dependencies = [ "anyhow", "clap", @@ -2327,7 +2327,7 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" [[package]] name = "pubky" -version = "0.4.3-rc.0" +version = "0.5.0-rc.0" dependencies = [ "anyhow", "base64 0.22.1", @@ -2347,7 +2347,6 @@ dependencies = [ "mainline", "pkarr", "pubky-common", - "pubky-testnet", "reqwest", "thiserror 2.0.12", "tokio", @@ -2361,7 +2360,7 @@ dependencies = [ [[package]] name = "pubky-common" -version = "0.4.0-rc.0" +version = "0.5.0-rc.0" dependencies = [ "argon2", "base32", @@ -2380,7 +2379,7 @@ dependencies = [ [[package]] name = "pubky-homeserver" -version = "0.2.0-rc.0" +version = "0.5.0-rc.0" dependencies = [ "anyhow", "axum", @@ -2423,7 +2422,7 @@ dependencies = [ [[package]] name = "pubky-testnet" -version = "0.2.0-rc.1" +version = "0.5.0-rc.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 687e8fa..d48b441 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,21 @@ members = [ "e2e", ] -# See: https://github.com/rust-lang/rust/issues/90148#issuecomment-949194352 resolver = "2" +[workspace.package] +version = "0.5.0-rc.0" +edition = "2021" +authors = [ + "SeverinAlexB ", + "SHAcollision ", + "Nuh " +] +license = "MIT" +homepage = "https://github.com/pubky/pubky-core" +repository = "https://github.com/pubky/pubky-core" + + [profile.release] lto = true opt-level = 'z' @@ -18,4 +30,12 @@ opt-level = 'z' [workspace.dependencies] pkarr = { version = "3.7.1" } mainline = { version = "5.4.0" } -pkarr-relay = { version = "0.9.1" } \ No newline at end of file +pkarr-relay = { version = "0.9.1" } + +# Workspace Members Dependencies +pubky-common = { version = "0.5.0-rc.0", path = "pubky-common" } +http-relay = { version = "0.5.0-rc.0", path = "http-relay" } +pubky = { version = "0.5.0-rc.0", path = "pubky-client" } +pubky-homeserver = { version = "0.5.0-rc.0", path = "pubky-homeserver" } +pubky-testnet = { version = "0.5.0-rc.0", path = "pubky-testnet"} +pkarr-republisher = { version = "0.5.0-rc.0", path = "pkarr-republisher"} \ No newline at end of file diff --git a/README.md b/README.md index d855f37..c961322 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ An open protocol for per-public-key backends for censorship resistant web applications. + + +

@@ -14,9 +17,6 @@ Rust Client's Docs | - - Releases - | JS bindings @@ -24,6 +24,11 @@

+[![GitHub Release](https://img.shields.io/github/v/release/pubky/pkdns)](https://github.com/pubky/pubky-core/releases/latest/) +![Crates.io Version](https://img.shields.io/crates/v/pubky) +[![Telegram Chat Group](https://img.shields.io/badge/Chat-Telegram-violet)](https://t.me/pubkycore) +![GitHub License](https://img.shields.io/github/license/pubky/pubky-core) + > The Web, long centralized, must decentralize; Long decentralized, must centralize. ## Overview @@ -77,4 +82,8 @@ podman run -it pubky:core Some more optional arguments could allow to run it in the background but the most important is `--network=host` which allows container to access network and provide admin endpoint accessible from the host machine. Please refer to -Docker/Podman documentation for extended options. \ No newline at end of file +Docker/Podman documentation for extended options. + +## Links + +- [Contributors Guide](./CONTRIBUTORS.md) \ No newline at end of file diff --git a/e2e/Cargo.toml b/e2e/Cargo.toml index ea436f0..421a2d8 100644 --- a/e2e/Cargo.toml +++ b/e2e/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "e2e" +edition.workspace = true version = "0.1.0" -edition = "2021" +publish = false [dependencies] -pubky-testnet = { path = "../pubky-testnet" } -pubky-common = { path = "../pubky-common" } +pubky-testnet = { workspace = true } +pubky-common = { workspace = true } tokio = { version = "1.43.0", features = ["full", "test-util"] } tracing-subscriber = "0.3.19" pkarr = {workspace = true} diff --git a/examples/Cargo.toml b/examples/Cargo.toml index b51570e..56b14b5 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "authn" version = "0.1.0" -edition = "2021" +edition.workspace = true +publish = false [[bin]] name = "signup" @@ -19,8 +20,8 @@ path = "./request/main.rs" anyhow = "1.0.95" base64 = "0.22.1" clap = { version = "4.5.29", features = ["derive"] } -pubky = { path = "../pubky-client" } -pubky-common = { path = "../pubky-common" } +pubky = { workspace = true } +pubky-common = { workspace = true } reqwest = "0.12.12" rpassword = "7.3.1" tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"] } diff --git a/http-relay/Cargo.toml b/http-relay/Cargo.toml index d90c613..827d050 100644 --- a/http-relay/Cargo.toml +++ b/http-relay/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "http-relay" -version = "0.3.0-rc.0" -edition = "2021" -authors = ["Nuh "] description = "A Rust implementation of _some_ of [Http relay spec](https://httprelay.io/)." -license = "MIT" -homepage = "https://github.com/pubky/pubky-core" -repository = "https://github.com/pubky/pubky-core" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true keywords = ["httprelay", "http", "relay"] categories = ["web-programming"] diff --git a/pkarr-republisher/Cargo.toml b/pkarr-republisher/Cargo.toml index dde6222..c00cee0 100644 --- a/pkarr-republisher/Cargo.toml +++ b/pkarr-republisher/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "pkarr-republisher" -version = "0.2.0-rc.0" -edition = "2021" -authors = ["Severin Alex Bühler "] description = "A pkarr packet republisher." -license = "MIT" -homepage = "https://github.com/pubky/pubky-core" -repository = "https://github.com/pubky/pubky-core" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true keywords = ["pkarr", "mainline", "pubky"] categories = ["web-programming"] diff --git a/pubky-client/Cargo.toml b/pubky-client/Cargo.toml index 1cfc604..1880e2c 100644 --- a/pubky-client/Cargo.toml +++ b/pubky-client/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "pubky" -version = "0.4.3-rc.0" -edition = "2021" -description = "Pubky core client" -license = "MIT" -repository = "https://github.com/pubky/pubky" +description = "Pubky-Core Client" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true keywords = ["web", "dht", "dns", "decentralized", "identity"] categories = [ "network-programming", @@ -17,7 +19,7 @@ categories = [ crate-type = ["cdylib", "rlib"] [dependencies] -pubky-common = { version = "0.4.0-rc.0", path = "../pubky-common" } +pubky-common = { workspace = true } thiserror = "2.0.11" wasm-bindgen = "0.2.100" url = "2.5.4" @@ -57,7 +59,6 @@ web-sys = "0.3.77" [dev-dependencies] anyhow = "1.0.95" futures-lite = "2.6.0" -pubky-testnet = { path = "../pubky-testnet" } tokio = "1.43.0" tracing-subscriber = "0.3.19" mainline = { workspace = true } diff --git a/pubky-client/src/lib.rs b/pubky-client/src/lib.rs index eca040e..0c84062 100644 --- a/pubky-client/src/lib.rs +++ b/pubky-client/src/lib.rs @@ -1,4 +1,4 @@ -#![doc = include_str!("../README.md")] +//! #![doc = include_str!("../README.md")] //! // TODO: deny missing docs. diff --git a/pubky-common/Cargo.toml b/pubky-common/Cargo.toml index b2f426a..d531f53 100644 --- a/pubky-common/Cargo.toml +++ b/pubky-common/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "pubky-common" -version = "0.4.0-rc.0" -edition = "2021" -authors = ["Nuh "] description = "Types and struct in common between Pubky client and homeserver" -license = "MIT" -homepage = "https://github.com/pubky/pubky-core" -repository = "https://github.com/pubky/pubky-core" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true keywords = ["pkarr", "pubky", "auth", "pubkey"] categories = ["web-programming", "authentication", "cryptography"] diff --git a/pubky-homeserver/Cargo.toml b/pubky-homeserver/Cargo.toml index 514e7e4..29a537d 100644 --- a/pubky-homeserver/Cargo.toml +++ b/pubky-homeserver/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "pubky-homeserver" -version = "0.2.0-rc.0" -edition = "2021" -authors = ["Nuh "] description = "Pubky core's homeserver." -license = "MIT" -homepage = "https://github.com/pubky/pubky-core" -repository = "https://github.com/pubky/pubky-core" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true keywords = ["pkarr", "sovereign", "web", "pkarr", "datastore"] categories = [ "network-programming", @@ -32,7 +32,7 @@ hex = "0.4.3" httpdate = "1.0.3" postcard = { version = "1.1.1", features = ["alloc"] } pkarr = { workspace = true, features = ["dht", "lmdb-cache", "tls"] } -pubky-common = { version = "0.4.0-rc.0", path = "../pubky-common" } +pubky-common = { workspace = true } serde = { version = "1.0.217", features = ["derive"] } tokio = { version = "1.43.0", features = ["full"] } toml = "0.8.20" @@ -45,7 +45,7 @@ url = { version = "2.5.4", features = ["serde"] } axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] } tower = "0.5.2" page_size = "0.6.0" -pkarr-republisher = { version = "0.2.0-rc.0", path = "../pkarr-republisher" } +pkarr-republisher = { workspace = true } thiserror = "2.0.12" dirs = "6.0.0" hostname-validator = "1.1.1" diff --git a/pubky-testnet/Cargo.toml b/pubky-testnet/Cargo.toml index d8ef14a..6be97d9 100644 --- a/pubky-testnet/Cargo.toml +++ b/pubky-testnet/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "pubky-testnet" -version = "0.2.0-rc.1" -edition = "2021" -authors = ["Nuh "] description = "A local test network for Pubky Core development." -license = "MIT" -homepage = "https://github.com/pubky/pubky-core" -repository = "https://github.com/pubky/pubky-core" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + + keywords = ["pkarr", "pubky", "testnet", "testing"] categories = ["web-programming", "authentication", "cryptography"] @@ -17,10 +19,10 @@ tokio = { version = "1.43.0", features = ["full"] } tracing-subscriber = "0.3.19" url = "2.5.4" -pubky = { version = "0.4.3-rc.0", path = "../pubky-client" } -pubky-common = { version = "0.4.0-rc.0", path = "../pubky-common" } -pubky-homeserver = { version = "0.2.0-rc.0", path = "../pubky-homeserver" } -http-relay = { version = "0.3.0-rc.0", path = "../http-relay" } +pubky = { workspace = true } +pubky-common = { workspace = true } +pubky-homeserver = { workspace = true } +http-relay = { workspace = true } tempfile = "3.19.1" tracing = "0.1.41" pkarr = { workspace = true }