From 0fe5d2a8fc0d41cda017e0930eeb9a23a91889e7 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 12 May 2026 11:39:31 +0900 Subject: [PATCH 1/4] Set up mise and configure mise tasks --- Cargo.toml | 6 ++++++ mise.toml | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 mise.toml diff --git a/Cargo.toml b/Cargo.toml index c102e71..94e1850 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,3 +5,9 @@ edition = "2024" license = "AGPL-3.0-only" [dependencies] + +[lints.rust] +warnings = "deny" + +[lints.clippy] +all = "deny" diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..c6a2af1 --- /dev/null +++ b/mise.toml @@ -0,0 +1,14 @@ +[tools] +rust = "1.95.0" + +[tasks.check] +description = "Run type check and lint" +run = [ + "cargo check", + "cargo clippy", + "cargo fmt --check", +] + +[tasks.fmt] +description = "Format code" +run = "cargo fmt" From 59420368af19ff71d5f76ac94dbec087faf7a9a4 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 12 May 2026 11:42:48 +0900 Subject: [PATCH 2/4] Contributing guide --- CONTRIBUTING.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e823422 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,60 @@ +Contributing to Feder +===================== + +Thank you for your interest in contributing to feder. This document outlines +the development workflow and the tools we use to maintain code quality. + + +Prerequisites +------------- + +We use mise to manage our development environment and tasks. Before you start, +ensure you have the following installed: + + - mise + - Rust (managed via mise) + +Once mise is installed, you can set up the project by running: + +~~~~ bash +mise install +~~~~ + + +Development workflow +-------------------- + +We use mise tasks to automate common development steps. Please ensure your +changes pass the automated checks before submitting a pull request. + +### Code formatting + +We use `rustfmt` to maintain a consistent coding style. You can automatically +format your code by running: + +~~~~ bash +mise run fmt +~~~~ + +### Quality checks + +Before pushing your changes, run the full suite of quality checks. This +includes type checking, linting with Clippy, and verifying that the code is +correctly formatted. + +~~~~ bash +mise run check +~~~~ + +We configure Clippy to treat all warnings as errors in `Cargo.toml`. This +ensures that the codebase remains clean and free of common pitfalls. If +`mise run check` fails, please address the reported issues before proceeding. + +### Git pre-commit hook + +You can automate the quality checks by registering a Git pre-commit hook. This +will run the `check` task every time you commit. + +~~~~ bash +mise generate git-pre-commit --write --task=check +~~~~ From 2b6f1c5b1dab9ef1c6c7c1bb8763b542011fef24 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 12 May 2026 11:46:20 +0900 Subject: [PATCH 3/4] Set up Hongdown, a Markdown formatter https://github.com/dahlia/hongdown --- .hongdown.toml | 3 +++ README.md | 19 +++++++++++++------ mise.toml | 21 +++++++++++++++------ 3 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 .hongdown.toml diff --git a/.hongdown.toml b/.hongdown.toml new file mode 100644 index 0000000..179ae12 --- /dev/null +++ b/.hongdown.toml @@ -0,0 +1,3 @@ +no_inherit = true +include = ["*.md", "**/*.md"] +exclude = ["**/target/**"] diff --git a/README.md b/README.md index 180b6cc..9ea8f04 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ -# Feder +Feder +===== One ActivityPub core, many runtimes. Feder is an early-stage Rust project for building ActivityPub applications from a portable protocol core and platform-specific runtimes. -## Motivation + +Motivation +---------- Feder grew out of work in the Fedify ecosystem and a question about smaller, -cheaper, and more portable Fediverse software. What would it take for a +cheaper, and more portable fediverse software. What would it take for a single-user ActivityPub server to run outside the usual VPS-shaped web application? @@ -16,7 +19,9 @@ One long-term direction is embedded or device-like federation: not moving a full Mastodon-style server onto a microcontroller, but decomposing ActivityPub software so different parts can run on machines with very different resources. -## Approach + +Approach +-------- Feder separates ActivityPub protocol logic from platform execution. The core should contain federation behavior such as inbox/outbox state, delivery @@ -26,7 +31,9 @@ such as networking, storage, clocks, scheduling, and execution. The first target is a Linux proof of concept for a small single-user ActivityPub server. Future runtimes may explore more constrained environments. -## License + +License +------- Feder is licensed under the GNU Affero General Public License v3.0. See -[LICENSE](LICENSE) for details. +[*LICENSE*](./LICENSE) for details. diff --git a/mise.toml b/mise.toml index c6a2af1..f69f32c 100644 --- a/mise.toml +++ b/mise.toml @@ -1,14 +1,23 @@ [tools] rust = "1.95.0" +[tools."github:dahlia/hongdown"] +version = "0.3.11" + +[tools."github:dahlia/hongdown".platforms] +linux-x64 = "hongdown-*-x86_64-unknown-linux-musl.tar.bz2" +linux-arm64 = "hongdown-*-aarch64-unknown-linux-musl.tar.bz2" + [tasks.check] -description = "Run type check and lint" +description = "Run type check, lint, and check Markdown format" run = [ - "cargo check", - "cargo clippy", - "cargo fmt --check", + "cargo check", + "cargo clippy", + "cargo fmt --check", + "hongdown --check", + "mise fmt --check", ] [tasks.fmt] -description = "Format code" -run = "cargo fmt" +description = "Format code and docs" +run = ["cargo fmt", "hongdown --write", "mise fmt"] From 72f847e14c009151af0a9aebbf0bd41c8815df2c Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 12 May 2026 11:51:18 +0900 Subject: [PATCH 4/4] Set up GitHub Actions --- .github/workflows/main.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..e8db0fe --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: main +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: jdx/mise-action@v4 + - run: mise run check