76 releases

new 0.7.0-rc1 Nov 4, 2024
0.7.0-preview2 Apr 29, 2024
0.7.0-gamma Sep 30, 2024
0.6.9 Mar 4, 2024
0.0.2 Nov 28, 2022

#1099 in HTTP server

Download history 2023/week @ 2024-07-18 2878/week @ 2024-07-25 2595/week @ 2024-08-01 2477/week @ 2024-08-08 3253/week @ 2024-08-15 2160/week @ 2024-08-22 2583/week @ 2024-08-29 2700/week @ 2024-09-05 2330/week @ 2024-09-12 2569/week @ 2024-09-19 2858/week @ 2024-09-26 2812/week @ 2024-10-03 2992/week @ 2024-10-10 3765/week @ 2024-10-17 3471/week @ 2024-10-24 3122/week @ 2024-10-31

13,885 downloads per month
Used in 11 crates (9 directly)

MIT license

775KB
15K 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
  • experimental-islands: activates Leptos islands mode

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

~30–44MB
~760K SLoC