Add a new test framework for exercising the Wren C embedding API directly from C code, including a Makefile target, test runner modifications, and the first API test case for boolean return values. The build system now compiles test sources from `test/api/` into a separate test executable, and the CLI's `createVM` and `runFile` functions accept an optional `WrenBindForeignMethodFn` callback to enable foreign method binding in tests. The test runner (`script/test.py`) is refactored to support both script and API test types, passing the test name instead of the full path for API tests. The initial `return_bool` test verifies that `wrenReturnBool` correctly returns `true` and `false` from foreign methods.
The original REPL loop had an if-else structure where the else branch (handling fgets failure) contained a return statement, making the code after the if-else block unreachable. This commit restructures the loop by inverting the condition: when fgets fails, the loop breaks instead of returning, allowing the subsequent wrenFreeVM call to execute. Additionally, enables CLANG_WARN_UNREACHABLE_CODE in both Debug and Release Xcode build configurations to catch similar issues in the future.
Move runFile() and VM configuration logic from main.c into new vm.c module,
exposing createVM() and runFile() functions. This decouples CLI script
execution from the REPL and main entry point, enabling reuse of the same
VM setup and file-running code for API tests.
Extract the static `readFile`, `readModule`, and `setRootDirectory` functions from main.c into a new io module, replacing the fixed-size `rootDirectory` array with a heap-allocated pointer and adding the corresponding header with public declarations.
Separate Wren VM library sources from CLI tool sources by moving them into
src/vm/ and src/cli/ subdirectories respectively. Update the Makefile to use
separate wildcard patterns for each directory, generate distinct object file
paths under build/vm/ and build/cli/, and adjust include paths to src/include.
Also update the Xcode project file to reference the new file locations.