Skip to main content

Module ProcessCommand

Module ProcessCommand 

Source
Expand description

§ProcessCommand - Wind ProcessPolyfill bridge

Tauri commands invoked directly (not through MountainIPCInvoke) by Wind’s ProcessPolyfill. Each command file holds exactly one #[tauri::command] whose function name IS the wire identifier (Naming-Convention exception); the snake_case names are required to mirror Node’s process.* so renderer code that imports process keeps working unchanged.

Layout (one Tauri command per file):

  • process_get_exec_path::process_get_exec_path - current executable path.
  • process_get_platform::process_get_platform - darwin / win32 / linux.
  • process_get_arch::process_get_arch - CPU architecture.
  • process_get_pid::process_get_pid - running PID.
  • process_get_shell_env::process_get_shell_env - full environment map.
  • process_get_memory_info::process_get_memory_info - per-platform { private, shared, residentSet } triple.

Modules§

process_get_arch
Tauri command - return the CPU architecture string (x86_64 / aarch64 / …) from std::env::consts::ARCH.
process_get_exec_path
Tauri command - return the absolute path of the running Mountain executable. Wire identifier kept snake_case to match Wind’s ProcessPolyfill invoker.
process_get_memory_info
Tauri command - return process memory in { private, shared, residentSet } form (bytes). Per-platform: ps on macOS, tasklist on Windows, /proc/self/statm on Linux. Errors fall back to zero triple so the renderer keeps working in the rare case the platform probe fails.
process_get_pid
Tauri command - return the running process ID via std::process::id().
process_get_platform
Tauri command - return the Wind/Node-style platform identifier (darwin / win32 / linux / fallthrough). Mirrors process.platform so renderer code that branches on it works unchanged.
process_get_shell_env
Tauri command - return the full environment of the Mountain process. The process inherits the user’s shell environment on every supported platform, so this is process.env for renderer code.