leptos-rs / leptos

Build fast web applications with Rust.
https://leptos.dev
MIT License
15.97k stars 627 forks source link

Migrate rkyv 0.8.x #3054

Closed sectore closed 2 days ago

sectore commented 3 days ago

Note: #3056 needs to be fixed to run and test rkyv with server_fns_axum example.

Fix #3055

Closes #3006

gbj commented 3 days ago

Thanks for doing this work! I see that the PR moves the implementation of rkyv traits out from the server macro into userland, and away from sending the arguments directly into another wrapper struct. Does this mean that only a single argument can be used here, and that it needs to be a struct on which the user has implemented the rkyv traits? To me these changes in the example are kind of unfortunate, as they cause the abstraction of the server fn encoding to leak out into the user's code.

Could you add some more context for this change? Is the previous form not possible to implement with rkyv 0.8?

sectore commented 2 days ago

I see that the PR moves the implementation of rkyv traits out from the server macro into userland, and away from sending the arguments directly into another wrapper struct. Does this mean that only a single argument can be used here, and that it needs to be a struct on which the user has implemented the rkyv traits?

Thanks for pointing it out. a58e785 reverted changes of examples/server_fns_axum/src/app.rs, so everything looks and works as before.

benwis commented 2 days ago

It's a personal preference thing, but I'd love to leave the uuid feature enabled on rkyv

sectore commented 2 days ago

It's a personal preference thing, but I'd love to leave the uuid feature enabled on rkyv

Done beb1bb9. Now it's enabled by using default features, which includes uuid via std .

benwis commented 2 days ago

Thanks for the Pr!