Replace the legacy `readBuiltInModule` function returning a raw char* with the new `loadBuiltInModule` returning a `WrenLoadModuleResult` struct, and update the CLI's `readModule` to `loadModule` accordingly. This change adds a proper `onComplete` callback for freeing module source memory, ensuring compatibility with the Wren 0.4.0 VM's updated module loading interface.
This contains the Wren source code. It is organized like so:
-
cli: the source code for the command line interface. This is a custom executable that embeds the VM in itself. Code here handles reading command-line, running the REPL, loading modules from disc, etc. -
module: the source code for the built-in modules that come with the CLI. These modules are written in a mixture of C and Wren and generally use libuv to implement their underlying functionality.