Binary encoding as an option for server functions
I wanted to get this up, so that it can be reviewed. I think it mostly meets the structure defined in #104 but I'm super new to macros. Here are the issues as I see them.
- Encoding adds a lot of imports to leptos_server, not sure we want to do that there or move it into leptos_macro
- cargo run produces an error about running a wasm_bindgen function outside wasm. Not sure why.
Other than that, this looks solid.
Cool! I like this. I've been taking a look tonight and will do some more work in the morning.
So I was running into a little trouble getting a working example going. It sounds like you have an example you're testing on... Would you mind adding it to the repo so I'm working on the same test example as you are?
Sure, let me polish it a bit... and actually write it
So I was running into a little trouble getting a working example going. It sounds like you have an example you're testing on... Would you mind adding it to the repo so I'm working on the same test example as you are?
I added an example, todo-app-cbor, and decided to switch from MessagePack to CBOR. I think the remaining problem is in the output of the run_server_fn var in register() that returns a Pin<Box<dyn Future<Output = Result<String, ServerFnError>>>>
It would appear I need to generalize that Box to contain an Enum instead of a Srtring, but I am unsure if that will have unforeseen consequences
The GitHub CI ran out of disk space but it passed for me locally, so I'm merging. Great work and thanks again!