feat: add buildmanual target, faker demo, subprocess examples, and contributing sidebar to manual

Add Makefile buildmanual target for manual generation and include faker_demo.wren, subprocess_async_demo.wren, subprocess_concurrent_demo.wren, and subprocess_fiber_demo.wren example scripts. Update manual sidebar across api pages to link new web-server tutorial and contributing section with module architecture, pure-wren/c-backed modules, foreign classes, async patterns, testing, and documentation pages.
This commit is contained in:
2026-01-25 18:02:02 +00:00
parent 819bbd5091
commit 5c2269f6a7
92 changed files with 10955 additions and 621 deletions
+25
View File
@@ -0,0 +1,25 @@
// retoor <retoor@molodetz.nl>
import "scheduler" for Scheduler, Future
var items = ["a", "b", "c"]
var futures = []
for (item in items) {
futures.add(async { "processed_" + item })
}
System.print(futures.count) // expect: 3
System.print(futures[0] is Future) // expect: true
System.print(futures[1] is Future) // expect: true
System.print(futures[2] is Future) // expect: true
var results = []
for (f in futures) {
results.add(await f)
}
System.print(results.count) // expect: 3
System.print(results[0]) // expect: processed_a
System.print(results[1]) // expect: processed_b
System.print(results[2]) // expect: processed_c
+24
View File
@@ -0,0 +1,24 @@
// retoor <retoor@molodetz.nl>
import "scheduler" for Scheduler, Future
System.print("Creating futures") // expect: Creating futures
var future1 = async { {"url": "url1", "status": 200} }
var future2 = async { {"url": "url2", "status": 201} }
var future3 = async { {"url": "url3", "status": 202} }
System.print(future1 is Future) // expect: true
System.print(future2 is Future) // expect: true
System.print(future3 is Future) // expect: true
var result1 = await future1
var result2 = await future2
var result3 = await future3
System.print(result1["url"]) // expect: url1
System.print(result1["status"]) // expect: 200
System.print(result2["url"]) // expect: url2
System.print(result2["status"]) // expect: 201
System.print(result3["url"]) // expect: url3
System.print(result3["status"]) // expect: 202
+13
View File
@@ -0,0 +1,13 @@
// retoor <retoor@molodetz.nl>
import "scheduler" for Scheduler, Future
var future = async { 42 }
System.print(future is Future) // expect: true
var result = await future
System.print(result) // expect: 42
System.print(future.isDone) // expect: true
System.print(future.result) // expect: 42
+12
View File
@@ -0,0 +1,12 @@
// retoor <retoor@molodetz.nl>
import "web" for WebSocketResponse
var ws = WebSocketResponse.new()
System.print(ws.isPrepared) // expect: false
System.print(ws.isOpen) // expect: false
var ws2 = WebSocketResponse.new()
System.print(ws2 is WebSocketResponse) // expect: true
System.print(ws2.isPrepared == false) // expect: true
System.print(ws2.isOpen == false) // expect: true