← All news

Expanded Framework Support

v0.7.5 broadens Tidos beyond Rocket, adds the native_element macro for custom HTML elements, and ships working examples for five JavaScript frameworks.

Axum, Actix-web, and Warp

Tidos now ships feature flags for three additional HTTP frameworks. Add the flag for your framework of choice to Cargo.toml:

1# Axum
2tidos = { version = "0.7.5", features = ["axum"] }
3
4# Actix-web
5tidos = { version = "0.7.5", features = ["actix-web"] }
6
7# Warp
8tidos = { version = "0.7.5", features = ["warp"] }
9
10# Rocket (unchanged)
11tidos = { version = "0.7.5", features = ["rocket"] }

Each flag implements the appropriate response trait so a Page can be returned directly from a route handler. See the Getting Started page for full examples.

The #[native_element] macro

Tidos now ships a #[native_element] attribute macro that generates a Component implementation for any struct that wraps a custom HTML element. It injects the required script tag, renders the kebab-case element name, and maps every struct field to an HTML attribute:

1use tidos::native_element;
2
3#[native_element]
4pub struct MyCounter {
5 pub initial: i32,
6 pub step: i32,
7}
8
9// Renders: <my-counter initial="0" step="1"></my-counter>
10// and injects: <script src="/dist/my-counter.js"></script>

This bridges the gap between Tidos SSR and client-side web components: define the component once in Rust and let the browser hydrate it.

JavaScript framework examples

The repository now includes complete working examples showing how to pair Tidos SSR with the most popular JS frameworks for client-side interactivity:

  • Svelte — embed compiled Svelte components via native_element
  • Lit Element — lightweight web components with reactive properties
  • Vue — Vue custom elements with defineCustomElement
  • React — React components mounted inside a custom element shell
  • Angular — Angular elements via createCustomElement

Each example lives under examples/ in the repository and shows a full Cargo.toml, route handler, and client bundle setup.

Upgrading

No breaking changes. Switch the feature flag in your Cargo.toml to the framework you use:

1# Feature flag for your framework of choice
2tidos = { version = "0.7.5", features = ["rocket"] }