···11+import { invoke } from '@tauri-apps/api/core';
22+33+export const greet = (name: string): Promise<string> =>
44+ invoke('greet', { name });
+14-2
apps/identity-wallet/vite.config.ts
···3344export default defineConfig({
55 plugins: [sveltekit()],
66+ // clearScreen: false surfaces Rust compiler errors in the terminal instead of clearing them
77+ clearScreen: false,
68 server: {
79 port: 5173,
810 strictPort: true,
99- // host: '0.0.0.0' allows the iOS simulator to reach this dev server over LAN
1010- host: '0.0.0.0',
1111+ // TAURI_DEV_HOST is set by `cargo tauri ios dev` to the machine's LAN IP;
1212+ // the iOS simulator connects to the dev server over LAN, not localhost
1313+ host: process.env.TAURI_DEV_HOST || '0.0.0.0',
1414+ hmr: process.env.TAURI_DEV_HOST
1515+ ? {
1616+ protocol: 'ws',
1717+ host: process.env.TAURI_DEV_HOST,
1818+ port: 5173,
1919+ }
2020+ : undefined,
1121 },
2222+ // Expose VITE_* and TAURI_ENV_* environment variables to the frontend
2323+ envPrefix: ['VITE_', 'TAURI_ENV_'],
1224});