Embedding Wren in Hare
3 days ago
- #Hare Language
- #Programming
- #Embedded Scripting
- The author explores Wren as an alternative to Lua for embedding in Hare programs, praising its simplicity and object-oriented features.
- hare-wren is introduced as a Hare interface to Wren, offering an idiomatic Hare API over Wren's C API, including examples of basic usage and calling between Hare and Wren.
- Criticisms of Wren include its scope rules, C API limitations, and the design of its standard library, leading the author to implement an improved standard library in hare-wren.
- hare-wren includes an optional submodule, wren::api, featuring an async runtime, basic file I/O, process argument handling, and a module loader for third-party Wren modules.
- The hwren command-line tool is provided for easy access to hare-wren's runtime and libraries, though it currently lacks a REPL feature.
- The author invites contributions to hare-wren and hints at future projects utilizing it, encouraging feedback and patches from the community.