91 releases

new 0.8.0-rc1 Apr 11, 2025
0.8.0-beta Mar 19, 2025
0.7.8 Mar 20, 2025
0.7.2 Dec 21, 2024
0.0.2 Nov 28, 2022

#1550 in HTTP server

Download history 1992/week @ 2024-12-24 2444/week @ 2024-12-31 3958/week @ 2025-01-07 4410/week @ 2025-01-14 3553/week @ 2025-01-21 3295/week @ 2025-01-28 4199/week @ 2025-02-04 5887/week @ 2025-02-11 4804/week @ 2025-02-18 4667/week @ 2025-02-25 4221/week @ 2025-03-04 4619/week @ 2025-03-11 4234/week @ 2025-03-18 4731/week @ 2025-03-25 3230/week @ 2025-04-01 4318/week @ 2025-04-08

17,055 downloads per month
Used in 22 crates (12 directly)

MIT license

1.5MB
37K SLoC

Provides functions to easily integrate Leptos with Axum.

JS Fetch Integration

The leptos_axum integration supports running in JavaScript-hosted WebAssembly runtimes, e.g., running inside Deno, Cloudflare Workers, or other JS environments. To run in this environment, you need to disable the default feature set and enable the wasm feature on leptos_axum in your Cargo.toml.

leptos_axum = { version = "0.6.0", default-features = false, features = ["wasm"] }

Features

  • default: supports running in a typical native Tokio/Axum environment
  • wasm: with default-features = false, supports running in a JS Fetch-based environment

Important Note

Prior to 0.5, using default-features = false on leptos_axum simply did nothing. Now, it actively disables features necessary to support the normal native/Tokio runtime environment we create. This can generate errors like the following, which don’t point to an obvious culprit: spawn_localcalled from outside of atask::LocalSet If you are not using the wasm feature, do not set default-features = false on this package.

More information

For more details on how to use the integrations, see the examples directory in the Leptos repository.

Dependencies

~33–46MB
~812K SLoC