Attribute Macro perseus::browser_main

source ·
#[browser_main]
Expand description

Marks the given function as the browser entrypoint into your app. This is designed for more complex apps that need to manually distinguish between the engine and browser entrypoints.

If you just want to run some simple customizations, you should probably use perseus::run_client to use the default client logic after you’ve made your modifications. perseus::ClientReturn should be your return type no matter what.

Note that any generics on the annotated function will not be preserved. You should put the PerseusApp generator in a separate function.

Note further that you’ll need to have wasm-bindgen as a dependency to use this.