-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leptos v0.6 (NOT the rewrite) #2158
Conversation
Tested the server fn with serde-lite and got this error. Not sure why the view macro is expecting serde instead of serde-lite.
Edit: this was with the todo_app_sqlite_axum example |
@rakshith-ravi I'm seeing two different categories of error
I think |
I just wanted to test the new 0.6 beta release and I am not able to compile
I checked the example diff's and I guess I am just missing something, maybe you can give me a hint. Error Output
edit: I was using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently implementing leptos_viz
. Need some support from upstream.
@sebadob Are you trying to use reqwest as a browser/WASM client here? Reqwest is supported as a client for desktop use but the default one for browser use should be the browser client. reqwest::Response is Send but the errors show it's in a WASM environment here. Remove the reqwest feature and we should find a way to document the above. |
@gbj I digged a bit deeper and found the problem: I had
...which caused the errors. The solution is dead simple. I just removed Now I can go on adopting my extractors in my server functions. Edit: btw I only added |
Just to give you some feedback on the binary size. v0.5The WASM uncompressed was 2.6MB, with brotli 612kB. v0.6Just with the migration to v0.6 and without using any of the more efficient encodings, the WASM size uncompressed went down to 2.2MB and with brotli to 537kB. This is a really nice improvement. Great work! |
That's really good news and exactly the sort of thing we were hoping to unlock with this change from an enum-based to a trait-based approach. It's the same conceptual shift I'm planning to bring to reactivity and rendering in upcoming versions so it's good to see it works out well with server functions in a real app. Thanks for sharing those results. |
Thanks as always @sebadob. TIL about "weak dependency features" in cargo: rather than |
I didn't know that something like weak dependencies exist |
* chore: update to axum 0.7 Removed http, since it's included in axum, and replaced hyper by http-body-util, which is a smaller. * chore: update samples to work with nre axum Missing sessions_axum_auth, pending PR merge. * chore: all dependencies update to axum 0.7 * chore: cargo fmt * chore: fix doctests * chore: Fix example that in reality doesn't use axum. Fixed anyway. * chore: more examples support for axum 0.7 * Small tweak
I have merged this branch into main for my sanity. Feel free to continue opening issues or PRs to the main branch for any changes that need to happen before release. I'll release an |
In the spirit of releasing incremental wins rather than waiting for one huge release, we've decided to release a 0.6.
This is not the larger rendering rewrite I've mentioned in the roadmap and elsewhere.
It contains two features:
.leptos_routes()
from the integrationsrkyv
feature onleptos
crate #1989)IntoReq
,FromReq
,IntoRes
, and/orFromRes
traits#[middleware]
macro to add per-server-function middleware from the Tower or Actix ecosystems (Add #[middleware] tag to allow the selective targeting of Tower services on Server Fns #1461)TODO
redirect()
, both return the value and redirect when called from server fn client, and redirect when called as plain HTTP endpoint (Proposal: Better Server function redirect handling #2069, Server functions redirect returns html, instead of data. #1358, Return body data when redirect in ServerFn #1513, ActionForm follows redirects from leptos_actix::redirect and tries to deserialize the result causing an error #1600, Don't try to parse as JSON the result from a server function redirect #1604)set_server_url
equivalent for Tauri/desktop settingshttp
crate-based server fn handler logic too?)