Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .hongdown.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
no_inherit = true
include = ["*.md", "**/*.md"]
exclude = ["**/target/**"]
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
~~~~
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ edition = "2024"
license = "AGPL-3.0-only"

[dependencies]

[lints.rust]
warnings = "deny"

[lints.clippy]
all = "deny"
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# 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?

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
Expand All @@ -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.
23 changes: 23 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +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, lint, and check Markdown format"
run = [
"cargo check",
"cargo clippy",
"cargo fmt --check",
"hongdown --check",
"mise fmt --check",
]

[tasks.fmt]
description = "Format code and docs"
run = ["cargo fmt", "hongdown --write", "mise fmt"]