Attribute Macro perseus::engine_main

source ·
#[engine_main]
Expand description

Marks the given function as the engine 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_dflt_engine with perseus::builder::get_op to use the default client logic after you’ve made your modifications. You’ll also want to return an exit code from this function (use std::process:exit(..)).

Note that the dflt-engine and client-helpers features must be enabled on perseus for this to work. (These are enabled by default.)

Note further that you’ll need to have tokio as a dependency to use this.

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