pub async fn build(&mut self) -> Result<(), Arc<Error>> {
        self.plugins
            .functional_actions
            .build_actions
            .before_build
            .run((), self.plugins.get_plugin_data())
            .map_err(|err| Arc::new(err.into()))?;
        let res = self.build_internal(false).await;
        if let Err(err) = res {
            let err: Arc<Error> = Arc::new(err.into());
            self.plugins
                .functional_actions
                .build_actions
                .after_failed_build
                .run(err.clone(), self.plugins.get_plugin_data())
                .map_err(|err| Arc::new(err.into()))?;

            Err(err)
        } else {
            self.plugins
                .functional_actions
                .build_actions
                .after_successful_build
                .run((), self.plugins.get_plugin_data())
                .map_err(|err| Arc::new(err.into()))?;

            Ok(())
        }
    }
Builds your whole app for being run on a server. Do not use this
function if you want to export your app.

This returns an `Arc<Error>`, since any errors are passed to plugin
actions for further processing.
packages/perseus/src/turbine/build.rs