Initialize

Function Initialize 

Source
pub fn Initialize(
    ApplicationHandle: AppHandle,
    AddressString: String,
) -> Result<(), VineError>
Expand description

Initializes and starts the gRPC server on a background task.

This function retrieves the core ApplicationRunTime from Tauri’s managed state, instantiates the gRPC service implementation (MountainVinegRPCService), and uses tonic to serve it at the specified address.

§Parameters

  • ApplicationHandle: The Tauri application handle.
  • AddressString: The address and port to bind the server to (e.g., "[::1]:50051").

§Returns

A Result indicating if the server setup was successful. The server itself runs on a separate spawned task.