Commit Graph
11 Commits
Author SHA1 Message Date
Dario Vladović 3e79c0a29d feat: add Platform.homePath foreign method with uv_os_homedir fallback allocation
Implement the `Platform.homePath` static method in the os module, exposing the user's home directory via libuv's `uv_os_homedir`. The implementation handles buffer resizing with dynamic allocation when `UV_ENOBUFS` is returned, aborts the fiber with an error message on failure, and registers the method in the module registry. Includes a test suite verifying the returned value is a non-empty string, resolves to a real path, and corresponds to an existing directory.
2021-05-02 20:00:19 +00:00
Dario Vladović 5118fb6561 feat: add Process.pid and Process.ppid foreign static methods to os module
Implement uv_os_getpid() and uv_os_getppid() bindings in process.c, register them in the CLI module table, expose as foreign statics in os.wren, and add a test suite verifying both return positive integers with pid greater than ppid.
2021-04-28 21:51:23 +00:00
Dario Vladović 5884beb109 feat: add Process.version static method exposing WREN_VERSION_STRING
Implement a new `Process.version` foreign static method that returns the Wren version string. The C implementation uses `wrenSetSlotString` with the `WREN_VERSION_STRING` macro, and the Wren binding registers it alongside existing `Process` methods. A new test file validates the returned value is a non-empty string composed of dot-separated numeric segments.
2020-06-14 04:23:02 +00:00
Dario Vladović f0cc18f5ad feat: implement Process.cwd foreign method using libuv uv_cwd
Add a new `Process.cwd` static method that retrieves the current working directory via libuv's `uv_cwd` function. The implementation includes proper error handling that aborts the fiber with a descriptive message on failure. The foreign method is registered in the module table and exposed in the Wren API with a foreign static declaration. A test suite validates that the returned value is a non-empty string starting with "/", resolves correctly via `File.realPath`, and corresponds to an existing directory.
2020-06-14 04:12:34 +00:00
Dario Vladović 1f27f5055b feat: add Python script to regenerate all premake project files for all platforms
Add a new utility script `util/generate_projects.py` that automates regeneration of
premake project files across all supported platforms and toolchains. The script
locates premake5 via environment variable or PATH, validates its availability, and
generates projects for BSD, Linux, macOS (gmake2 and xcode4), and Windows (vs2017
and vs2019) toolchains.
2020-06-14 04:09:10 +00:00
Dario Vladović 0ce400786c fix: correct markdown link syntax for libuv reference in src/README.md
The diff shows a single-character change in src/README.md, replacing square brackets with parentheses around the libuv URL to fix broken markdown link formatting.
2020-06-14 04:06:00 +00:00
Dario Vladović c02b22cf18 feat: upgrade libuv from 1.34.2 to 1.38.0 with new API and platform fixes
Add uv_library_shutdown() and uv__threadpool_cleanup() functions, introduce
UV_UDP_MMSG_CHUNK and UV_UDP_RECVMMSG flags, document cpu_times fields in
milliseconds, adjust priority constants for IBM i PASE, widen ansi_parser_state
to unsigned short on Windows, refactor async spin loop with sched_yield() and
eventfd support on Linux, add ARM yield in cpu_relax(), implement
uv__process_title_cleanup() on BSD and Darwin, replace CoreFoundation
dependency with darwin-stub.h, and fix accept4 detection for FreeBSD ≥10.
2020-06-06 20:05:48 +00:00
Dario Vladović 5b320526e6 refactor: simplify .travis.sh by removing redundant cd commands and inlining WREN_PY default
Replace repeated cd into WREN_WD and back with make -C, and collapse the conditional WREN_PY_BINARY assignment into a single parameter expansion.
2020-06-06 20:00:11 +00:00
Dario Vladovic 3af8b5b1b0 chore: add .vscode directory to gitignore to exclude IDE project files 2020-06-06 18:42:00 +00:00
Dario Vladovic 717958190c chore: add .DS_Store entries to .gitignore for macOS system files 2020-06-06 03:09:51 +00:00
Dario Vladovic 974d04e5c1 fix: add --version option and format help output in cli/main.c 2020-06-06 02:55:54 +00:00