The wzzc-dev fork of moonbit-community/window, adding MoUI-oriented Web, Windows, and Linux support while tracking upstream window 0.5.1.
scripts/check_moui_macos_smoke.sh --runscripts/check_moui_windows_smoke.sh
scripts/check_moui_windows_smoke.sh --run
bash scripts/capture_moui_runtime_evidence.sh windows --log artifacts/moui-windows-runtime.logscripts/check_moui_runtime_log.sh windows <captured-log>cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64where.exe cl
moon build .\examples\window_windows\ --target native
moon run .\examples\window_windows\ --target nativewhere.exe gcc
moon build .\examples\window_windows\ --target native
moon run .\examples\window_windows\ --target nativemoon build examples/window_web --target wasm-gcscripts/check_web_assets.shscripts/check_moui_web_smoke.sh
scripts/smoke_runtime.sh webnode examples/window_web/serve.mjshttp://127.0.0.1:8000/examples/window_web/index.html_build/wasm-gc/debug/build/wzzc-dev/window/examples/window_web/window_web.wasmsudo apt install libwayland-dev wayland-protocols wayland-scanner pkg-configmoon build examples/window_linux --target native
moon run examples/window_linux --target nativescripts/check_moui_linux_smoke.sh
scripts/check_moui_linux_smoke.sh --run
WINDOW_MOUI_LINUX_REQUIRE_INPUT=1 scripts/check_moui_linux_smoke.sh --run
bash scripts/capture_moui_runtime_evidence.sh linux --log artifacts/moui-linux-runtime.logscripts/check_moui_runtime_log.sh linux <captured-log>moon add wzzc-dev/windowimport {
"wzzc-dev/window/core",
"wzzc-dev/window/macos",
}
supported_targets = "native"
options("is-main": true)///|
struct App {
mut window : @macos.Window?
}
///|
pub impl @macos.ApplicationHandler for App with can_create_surfaces(
self,
event_loop,
) {
let attrs = @core.WindowAttributes::default().with_title("window demo")
let window : @macos.Window? = Some(event_loop.try_create_window(attrs)) catch {
err => {
println("error creating window: \{err}")
event_loop.exit()
None
}
}
self.window = window
}
///|
pub impl @macos.ApplicationHandler for App with window_event(
self,
event_loop,
_id,
event,
) {
match event {
CloseRequested => event_loop.exit()
SurfaceResized(_) =>
match self.window {
Some(window) => window.request_redraw()
None => ()
}
RedrawRequested => println("redraw requested")
_ => ()
}
}
///|
fn main {
let event_loop = @macos.EventLoop::EventLoop()
event_loop.run_app({ window: None })
}///|
pub impl @macos.ApplicationHandler for App with window_event(
self,
event_loop,
_id,
event,
) {
match event {
PointerMoved(_, position, _, _) =>
println("pointer moved: \{position}")
DragEntered(paths, position) =>
println("drag entered at \{position}: \{paths}")
CloseRequested => event_loop.exit()
_ => ()
}
}moon run examples/window --target native
moon run examples/window_windows --target native
moon run examples/window_linux --target native
moon build examples/window_web --target wasm-gcbash scripts/check_ci.sh
scripts/check_moon_baseline.sh
scripts/check_moui_readiness.sh
scripts/check_moui_evidence.shRUN_EXAMPLE_TRANSCRIPTS=1 bash scripts/check_ci.shInstall
Download zipThe wzzc-dev fork of moonbit-community/window, adding MoUI-oriented Web, Windows, and Linux support while tracking upstream window 0.5.1.