Giter Site home page Giter Site logo

Comments (5)

Nutomic avatar Nutomic commented on May 23, 2024 1

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.

MTRNord avatar MTRNord commented on May 23, 2024 1

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.

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.

MTRNord avatar MTRNord commented on May 23, 2024 1

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.

oknozor avatar oknozor commented on May 23, 2024 1

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.

MTRNord avatar MTRNord commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.