88 releases

new 0.8.0-alpha2 Mar 13, 2025
0.7.5 Jan 31, 2025
0.7.2 Dec 21, 2024
0.7.0 Nov 30, 2024
0.0.2 Nov 28, 2022

#1189 in HTTP server

Download history 2595/week @ 2024-11-20 3528/week @ 2024-11-27 3286/week @ 2024-12-04 5139/week @ 2024-12-11 3477/week @ 2024-12-18 1828/week @ 2024-12-25 2748/week @ 2025-01-01 3943/week @ 2025-01-08 4248/week @ 2025-01-15 3475/week @ 2025-01-22 3602/week @ 2025-01-29 4348/week @ 2025-02-05 5814/week @ 2025-02-12 4693/week @ 2025-02-19 4950/week @ 2025-02-26 3938/week @ 2025-03-05

20,167 downloads per month
Used in 21 crates (11 directly)

MIT license

1.5MB
33K 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

~32–45MB
~800K SLoC