origin-kit 0.3.1

The `origin` command: create a new Origin application from the embedded project template, without a checkout of Origin.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The product's IPC surface.
//!
//! Commands resolve state, delegate and translate errors. No logic lives here.

use crate::example::ExampleService;
use origin_tauri::{CommandError, OriginState};
use tauri::State;

#[tauri::command]
pub async fn example_greeting(state: State<'_, OriginState>) -> Result<String, CommandError> {
    Ok(state
        .application()
        .require::<ExampleService>()?
        .greeting()
        .await?)
}