Skip to content

feat: add support for salvo web framework - #130

Open
darixsamani wants to merge 22 commits into
apalis-dev:mainfrom
darixsamani:salvo
Open

feat: add support for salvo web framework#130
darixsamani wants to merge 22 commits into
apalis-dev:mainfrom
darixsamani:salvo

Conversation

@darixsamani

Copy link
Copy Markdown

Description

In this pull request, I just added salvo as a feature of apalis-board as a web framework. This pull request solves issue #86

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • I have run the existing tests, and they pass
  • I have run cargo fmt and cargo clippy

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

I have run the command cargo check --package apalis-board-api --features salvo to check the features that I am working on, and I have no warnings.

I have also run the command cargo run --package salvo-example to check the features that I am proposing, and everything is working fine, even the dashboard

I have also introduced the new field in ApiBuilder

#[derive(Clone, Debug)]
pub struct ApiBuilder<R> {
    router: R,
    #[allow(unused)]
    /// may not be used in some conditional compilation
    root: bool,
    // ...
    /// Broadcaster used to fan out tracing spans/events to SSE subscribers.
    /// `None` disables the `/events` endpoint.
    #[cfg(feature = "sse")]
    pub broadcaster: Option<Arc<Mutex<crate::sse::TracingBroadcaster>>>,
}

and also a new method with_broadcaster to receive the broadcaster

Video Demonstration

Screencast.from.2026-07-12.17-12-18.webm

@darixsamani darixsamani changed the title Add Salvo as features for web framework of apalis-board Add Salvo features as web framework for apalis-board Jul 12, 2026

@geofmureithi geofmureithi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution

  1. Please pass the broadcaster via state as this allows other routes the possibility of using it
  2. Lots of unnecessary comments can be removed
  3. Remove any commented code.
  4. Add an entry to Changelog.md

Comment thread crates/api/src/framework/axum.rs Outdated
use std::time::Duration;
use tracing::info;
use tracing_subscriber::{EnvFilter, Layer, layer::SubscriberExt, util::SubscriberInitExt};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove those unnecessary AI generated comments

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There still alot of comments in this file that seem unnecessary. The code should be enough

Comment thread crates/api/src/framework/salvo.rs Outdated
Comment thread crates/api/src/framework/salvo.rs Outdated
use std::time::Duration;
use tracing::info;
use tracing_subscriber::{EnvFilter, Layer, layer::SubscriberExt, util::SubscriberInitExt};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There still alot of comments in this file that seem unnecessary. The code should be enough

@geofmureithi geofmureithi changed the title Add Salvo features as web framework for apalis-board feat: add salvo web framework for apalis-board Jul 18, 2026
@geofmureithi geofmureithi changed the title feat: add salvo web framework for apalis-board feat: add support for salvo web framework Jul 18, 2026
@geofmureithi

Copy link
Copy Markdown
Member
  1. Please add a changelog entry
  2. Run cargo update and regenerate cargo vet excemptions

@darixsamani

Copy link
Copy Markdown
Author

I need to run cargo update in all workspace projects, or just the salvo example? let's me know

@darixsamani

darixsamani commented Jul 31, 2026

Copy link
Copy Markdown
Author

Hi @geofmureithi, I already run cargo update and regenerated cargo vet exemptions. Please check my Pull Request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants