JFLib

plat/linux.rs (Linux)#

Source: lib/plat/linux.rs

linux -- Linux platform: raw syscalls, no libc (the build for GPU drivers: linux_glibc.rs)        [src/plat/linux/plat_linux.s, lx_sys.s]

_start reads argc / argv / envp from the initial stack, calls the app's jfgui_main and
exits with its result.  Files and paths: linux_sys.rs; threads, wake-up, system
information: linux_thread.rs; windows: linux_disp.rs (Wayland / X11 backends).
  • fn time_us() -> u64

  • fn unix_time_ns() -> i64 wall-clock time: nanoseconds since 1970-01-01 00:00 UTC (CLOCK_REALTIME)

  • fn args() -> Vec<String>

  • fn env(name: &str) -> Option<String> the value of an environment variable [plat_env / plat_getenv]

  • fn getenv(name: &str) -> Option<String> the same as env (ASMLIB's plat_getenv)

  • fn setenv(name: &str, value: Option<&str>) -> bool set (Some) or remove (None) an environment variable of this process [plat_setenv]

  • fn sleep_ms(ms: u32)

Source: docs/API.md in the JFLib repository.