can you write an app in just once file and mark what can run in the client and what must only run on the server?
If you don't need server side rendering you can have one Rust file but you also need a JS file to initialize the WebAssembly module. So just one file isn't reasonably possible.
For a server side rendered app you need to have a cargo workspace with 3 crates (they can be in the same repo so not a huge deal).
One crate is a `cdylib` that you compile to WebAssembly to serve your app to the client. This is a light wrapper around your actual application.
One crate is your actual application.
And one crate is your server, which is also a light wrapper around your actual application.
That server side rendering structure can be found here - https://github.com/chinedufn/percy/tree/master/examples/isom...
But in terms of a super minimal example without server side rendering.. I'll be working on adding one (along with updating the current example)!