docs: update readme with actix and axum feature flags

This commit is contained in:
Paul Delafosse 2022-11-27 22:42:57 +01:00
parent 0762876bb2
commit c2ea0647e7
2 changed files with 20 additions and 3 deletions

View file

@ -18,7 +18,25 @@ You can join the Matrix channel [#activitystreams:asonix.dog](https://matrix.to/
## How to use
To get started, have a look at the [API documentation](https://docs.rs/activitypub_federation/0.2.0/activitypub_federation/) and example code. You can also find some [ActivityPub resources in the Lemmy documentation](https://join-lemmy.org/docs/en/contributing/resources.html#activitypub-resources). If anything is unclear, please open an issue for clarification. For a more advanced implementation, take a look at the [Lemmy federation code](https://github.com/LemmyNet/lemmy/tree/main/crates/apub).
To get started, have a look at the [API documentation](https://docs.rs/activitypub_federation/0.2.0/activitypub_federation/)
and [example code](https://github.com/LemmyNet/lemmy/tree/main/example/). You can also find some [ActivityPub resources in the Lemmy documentation](https://join-lemmy.org/docs/en/contributing/resources.html#activitypub-resources).
If anything is unclear, please open an issue for clarification. For a more advanced implementation,
take a look at the [Lemmy federation code](https://github.com/LemmyNet/lemmy/tree/main/crates/apub).
Currently supported frameworks include [actix](https://actix.rs/) and [axum](https://github.com/tokio-rs/axum):
**actix:**
```toml
activitypub_federation = { version = "*", features = ["actix"] }
```
**axum:**
```toml
activitypub_federation = { version = "*", features = ["axum"] }
```
## Roadmap

View file

@ -25,8 +25,7 @@ impl<Json: Serialize> IntoResponse for ApubJson<Json> {
header::CONTENT_TYPE,
APUB_JSON_CONTENT_TYPE
.parse()
.ok()
.expect("'Parsing application/activity+json' should never fail"),
.expect("Parsing 'application/activity+json' should never fail"),
);
response
}