Skip to main content

launch_preview_session

Function launch_preview_session 

Source
pub async fn launch_preview_session(
    project_path: &Path,
    platform: PreviewPlatform,
    sccache_path: Option<PathBuf>,
    progress: Option<BuildProgress>,
) -> Result<PreviewSession>
Expand description

Launch a preview session for the given platform.

This will:

  1. Try to connect to an existing preview app via TCP
  2. If not found, scaffold and launch the preview app
  3. Wait for TCP connection

§Arguments

  • platform - Target platform for preview
  • sccache_path - Optional path to sccache for compilation caching

§Errors

Returns an error if the preview app cannot be launched or connected.