feat: add fswatch, sysinfo, udp modules and file copy/move/stat time operations
Add three new native modules (fswatch, sysinfo, udp) to the Wren CLI build system and module registry. Extend the io module with async file copy and move operations using libuv uv_fs_copyfile and uv_fs_rename, plus expose stat mtime/atime/ctime fields and stdin windowSize. Update the io.wren wrapper with File.write, File.copy, File.move static methods and corresponding foreign declarations. Add shebang lines to generator2.wren, merge_all_wren.wren, merge_docs.wren, and phonebook.wren scripts.
2026-01-25 11:42:49 +01:00
|
|
|
#!/usr/local/bin/wren
|
|
|
|
|
|
2026-01-25 06:08:44 +01:00
|
|
|
import "pathlib" for Path
|
|
|
|
|
|
|
|
|
|
var startTime = System.clock
|
|
|
|
|
|
|
|
|
|
var all = []
|
|
|
|
|
|
|
|
|
|
all.add("# Customized version of the wren programming language.")
|
|
|
|
|
all.add("This is the documentation of the highly customized wren programming language.")
|
|
|
|
|
all.add("")
|
|
|
|
|
all.add("## Extensions")
|
|
|
|
|
all.add("The following futures are built on top of the native wren interpreter:")
|
|
|
|
|
all.add(" - wdantic library based on PyDantic")
|
|
|
|
|
all.add(" - dataset library based on Python dataset module (ornm for lazy people)")
|
|
|
|
|
all.add(" - aiohttp library based fromework called `web`")
|
|
|
|
|
all.add(" - pathlib library based on Python pathlib")
|
|
|
|
|
all.add(" - regex validator library")
|
|
|
|
|
all.add(" - json encoder / decoder library")
|
|
|
|
|
all.add(" - networking library")
|
|
|
|
|
all.add(" - html library")
|
|
|
|
|
all.add(" - websocket library")
|
|
|
|
|
all.add("")
|
|
|
|
|
all.add("## Documentation")
|
|
|
|
|
|
|
|
|
|
for (path in Path.new("manual").rglob("*.html")) {
|
|
|
|
|
all.add("### " + path.name)
|
|
|
|
|
all.add("```html```")
|
|
|
|
|
all.add(path.readText())
|
|
|
|
|
all.add("```")
|
|
|
|
|
all.add("---")
|
|
|
|
|
all.add("")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var destination = Path.new("manual.md")
|
|
|
|
|
destination.writeText(all.join("\n"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var duration = System.clock - startTime
|
|
|
|
|
|
|
|
|
|
System.print("Written to: manual.md.")
|
|
|
|
|
System.print("Duration: " + duration.toString + " Ms.")
|
|
|
|
|
System.print("Size: " + destination.stat().size.toString + " bytes.")
|