21 lines
546 B
TypeScript
21 lines
546 B
TypeScript
// file: crates/apps/game-snake-poc-tauri/frontend/ts/bridge.ts
|
|
// version: 1
|
|
|
|
import { invoke } from "@tauri-apps/api/core";
|
|
|
|
export interface RuntimeDescriptor {
|
|
deviceClass: string;
|
|
executionModel: string;
|
|
inputProfile: string;
|
|
platformFamily: string;
|
|
runtimeHost: string;
|
|
}
|
|
|
|
export async function getRuntimeDescriptor(): Promise<RuntimeDescriptor> {
|
|
return await invoke<RuntimeDescriptor>("get_runtime_descriptor");
|
|
}
|
|
|
|
export async function reportFrontendReady(): Promise<void> {
|
|
await invoke("frontend_ready");
|
|
}
|