mirror of
https://codeberg.org/tyy/aspm
synced 2024-12-22 21:49:28 -07:00
Refactor the binary into a workspace crate, and document all of the crates in README.md
This commit is contained in:
parent
47b1753390
commit
afa8eb79b3
28 changed files with 61 additions and 47 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -226,7 +226,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aspm"
|
name = "aspm-cli"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
|
|
46
Cargo.toml
46
Cargo.toml
|
@ -1,52 +1,10 @@
|
||||||
[package]
|
|
||||||
name = "aspm"
|
|
||||||
authors = ["Ty"]
|
|
||||||
description = "A tool to manage ariadne signature profiles, implementing v0 of the specification"
|
|
||||||
repository = "https://codeberg.org/tyy/aspm"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["crates/*"]
|
members = ["crates/*"]
|
||||||
|
resolver = "2"
|
||||||
[dependencies]
|
|
||||||
anyhow = "1.0.86"
|
|
||||||
app_dirs2 = "2.5.5"
|
|
||||||
clap = { version = "4.5.8", features = ["derive", "unstable-styles", "env"] }
|
|
||||||
thiserror = "1.0.61"
|
|
||||||
asp = { path = "crates/asp" }
|
|
||||||
indoc = "2.0.5"
|
|
||||||
anstyle = "1.0.7"
|
|
||||||
dialoguer = { version = "0.11.0", features = ["password"] }
|
|
||||||
argon2 = { version = "0.5.3", features = ["std"] }
|
|
||||||
data-encoding = "2.6.0"
|
|
||||||
sea-orm = { version = "0.12.15", features = ["sqlx-sqlite", "runtime-tokio-rustls"] }
|
|
||||||
async-trait = "0.1.81"
|
|
||||||
tokio = "1.38.0"
|
|
||||||
clap-stdin = "0.5.0"
|
|
||||||
gpgme = { version = "0.11.0", optional = true }
|
|
||||||
sequoia-openpgp = { version = "1.21.1", optional = true }
|
|
||||||
josekit = { version = "0.8.6" }
|
|
||||||
aes-gcm = "0.10.3"
|
|
||||||
migrations = { path = "crates/migrations" }
|
|
||||||
scrypt = "0.11.0"
|
|
||||||
serde = { version = "1.0.204", features = ["derive"] }
|
|
||||||
serde_json = "1.0.120"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
assert_cmd = "2.0.14"
|
|
||||||
predicates = "3.1.0"
|
|
||||||
tempfile = "3.10.1"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
gpg-compat = ["dep:gpgme", "dep:sequoia-openpgp"]
|
|
||||||
default = ["gpg-compat"]
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
strip = true
|
strip = true
|
||||||
opt-level = "z"
|
opt-level = "z"
|
||||||
lto = true
|
lto = true
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
panic = "abort"
|
panic = "abort"
|
16
README.md
16
README.md
|
@ -1,5 +1,17 @@
|
||||||
# aspm
|
# aspm
|
||||||
|
|
||||||
This is the **A**riadne **S**ignature **P**rofile **M**anager, a command line program and rust library implementing the [Ariadne Signature Profile specification v0](https://ariadne.id/related/ariadne-signature-profile-0/). Currently, it is updated to the latest version of the spec as of [ariadne/ariadne-identity-specification@92f280bf83](https://codeberg.org/ariadne/ariadne-identity-specification/commit/92f280bf83e2d5957e5a53a6f1b6974bc975517d).
|
This is the **A**riadne **S**ignature **P**rofile **M**anager, a command line program and rust library implementing the [Ariadne Signature Profile specification v0](https://ariadne.id/related/ariadne-signature-profile-0/). Currently, it is updated to the latest version of the spec as of [ariadne/ariadne-identity-specification@92f280bf83](https://codeberg.org/ariadne/ariadne-identity-specification/commit/92f280bf83e2d5957e5a53a6f1b6974bc975517d). This is setup as a cargo workspace with multiple crates, which are all explained below
|
||||||
|
|
||||||
The command line program is located in `src/`, and the library it uses to do ASP-related things (like creating and signing profiles, or generating keys) is located in `crates/asp`.
|
# Crates
|
||||||
|
|
||||||
|
## aspm
|
||||||
|
|
||||||
|
The main binary crate, featuring all user-facing CLI code. This crate does not contain any actual ASP logic, but rather utilizes the `asp` crate for operations such as generating keys, signing profiles, etc.
|
||||||
|
|
||||||
|
## asp
|
||||||
|
|
||||||
|
The main libary crate, which provides APIs for interfacing with ASP keys, profiles, and exchange servers. This is mainly used by the `aspm` CLI crate, however it could hypothetically be used by other projects (or even a future GUI!)
|
||||||
|
|
||||||
|
## migrations
|
||||||
|
|
||||||
|
A crate which soley contains database migrations for the `aspm` CLI crate. It contains both a library interface and a binary which can be used to manipulate existing databases.
|
44
crates/aspm/Cargo.toml
Normal file
44
crates/aspm/Cargo.toml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
[package]
|
||||||
|
name = "aspm-cli"
|
||||||
|
authors = ["Ty"]
|
||||||
|
description = "A tool to manage ariadne signature profiles, implementing v0 of the specification"
|
||||||
|
repository = "https://codeberg.org/tyy/aspm"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "aspm"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
anyhow = "1.0.86"
|
||||||
|
app_dirs2 = "2.5.5"
|
||||||
|
clap = { version = "4.5.8", features = ["derive", "unstable-styles", "env"] }
|
||||||
|
thiserror = "1.0.61"
|
||||||
|
asp = { path = "../asp" }
|
||||||
|
indoc = "2.0.5"
|
||||||
|
anstyle = "1.0.7"
|
||||||
|
dialoguer = { version = "0.11.0", features = ["password"] }
|
||||||
|
argon2 = { version = "0.5.3", features = ["std"] }
|
||||||
|
data-encoding = "2.6.0"
|
||||||
|
sea-orm = { version = "0.12.15", features = ["sqlx-sqlite", "runtime-tokio-rustls"] }
|
||||||
|
async-trait = "0.1.81"
|
||||||
|
tokio = "1.38.0"
|
||||||
|
clap-stdin = "0.5.0"
|
||||||
|
gpgme = { version = "0.11.0", optional = true }
|
||||||
|
sequoia-openpgp = { version = "1.21.1", optional = true }
|
||||||
|
josekit = { version = "0.8.6" }
|
||||||
|
aes-gcm = "0.10.3"
|
||||||
|
migrations = { path = "../migrations" }
|
||||||
|
scrypt = "0.11.0"
|
||||||
|
serde = { version = "1.0.204", features = ["derive"] }
|
||||||
|
serde_json = "1.0.120"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
assert_cmd = "2.0.14"
|
||||||
|
predicates = "3.1.0"
|
||||||
|
tempfile = "3.10.1"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
gpg-compat = ["dep:gpgme", "dep:sequoia-openpgp"]
|
||||||
|
default = ["gpg-compat"]
|
Loading…
Reference in a new issue