Comments (5)
I looked at your axum-error
branch but its really hard to figure out whats going on, because there are so many changes (all in one huge commit), and lots of unrelated compile errors. You also seem to have merged the library code and example code which is a bad idea.
If you want to add axum support to this crate, you should instead use feature flags, with one feature actix
and one axum
. Then you can also rename the federation
example to federation-actix
, and add federation-axum
.
I suggest you work on this in a pull request to this repo, and only commit small changes each time. That way it will be much easier to follow along and help out if you get stuck somewhere.
from activitypub-federation-rust.
I looked at your
axum-error
branch but its really hard to figure out whats going on, because there are so many changes (all in one huge commit), and lots of unrelated compile errors. You also seem to have merged the library code and example code which is a bad idea.If you want to add axum support to this crate, you should instead use feature flags, with one feature
actix
and oneaxum
. Then you can also rename thefederation
example tofederation-actix
, and addfederation-axum
.I suggest you work on this in a pull request to this repo, and only commit small changes each time. That way it will be much easier to follow along and help out if you get stuck somewhere.
Ah sorry yeah shouldn't have this written late at night yesterday 😅
I will clear the git up later today or tomorrow and come back but the short version is that I basically took the example and tried to use axum instead of actix. Therefor I had to port the middleware to axum as that also is (logically) actix Web specific.
I can probably work on a pr for axum as well. :) will have a look later today.
from activitypub-federation-rust.
Just wanted to note that I started work on this now :) Its not pushed yet but I will keep you updated/open the PR when its ready
from activitypub-federation-rust.
I think this should be closed, the only remaining issue with axum is that we still need to run on the actix runtime but this should be fixed by making the background-jobs
crate compatible with tokio. Or maybe switch to another crate.
@MTRNord here is my project if you need to take a look at a working example: https://github.com/oknozor/gill
from activitypub-federation-rust.
A possible easy fix is probably to just not force it to be a reference and let the implementer decide if this should be a reference or not. That way this would offer the best of both worlds. (Basically moving the reference to the type definition when implementing instead of forcing it always)
from activitypub-federation-rust.
Related Issues (20)
- live example (actix-web) cant receive activities from mastodon with Error(Incoming activity has invalid signature) HOT 5
- Support secure-mode federation HOT 3
- Remove actix-rt depenency
- do_send should retry failed connections HOT 1
- Compress body of outgoing post requests HOT 1
- Real-world 0.17.4 Lemmy servers are failing with federation - error logs show 'Header is expired' HOT 1
- Switch from OpenSSL to Rustls HOT 6
- [Bug]: Incompatible licenses HOT 5
- Add Url wrapper type
- Change return type of UrlVerifier::verify
- Make sure http signing is not blocking tokio HOT 3
- Webfinger fetching not compliant with webfinger standard HOT 1
- Error when trying to use ObjectId::parse HOT 2
- Signing broken when using axum nested routers HOT 2
- Examples on how to implement Object Trait for persistent storage like Sqlite HOT 1
- Remove `anyhow` dependency HOT 2
- Error: don't drop the original error HOT 5
- Upgrade `hyper` and `http` dependencies to 1.0 HOT 4
- How does this crate (and Lemmy) handle the dynamic nature of JSON-LD? HOT 1
- What is the diesel feature for in the crate? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activitypub-federation-rust.