veko doc
Self-Contained API Reference • Gradual Types • Capabilities • Wasm Sandbox

ui/macos_bundle

lib/ui/macos_bundle.vk

lib/ui/macos_bundle.vk Zero-SDK macOS .app bundle generator, RGBA Canvas -> PNG -> Apple .icns encoder, and 64-bit ARM64 Mach-O verifier. Pure Veko using builtins only (bytes/*, os/*, str/*, map/*); zero FFI or net dependencies.

signature
MacBundleConfig = struct { app_name str, bundle_id str = ..., version str = ..., build_num str = ..., min_macos str = ..., category str = ..., high_dpi bool = ..., lsui_element bool = ..., icon_canvas any = ... }

Configuration for generating a macOS .app application bundle.

signature
build-info-plist = fn [cfg MacBundleConfig] str

Builds an XML-escaped Apple Info.plist string from cfg.

signature
encode-rgba-png = fn [width i64, height i64, rgba bytes] any

Encodes an RGBA32 pixel buffer (width * height * 4 bytes) as a valid PNG image using stored DEFLATE blocks.

signature
build-icns-from-png = fn [png_bytes bytes] bytes

Wraps non-empty PNG bytes into an Apple .icns container with an 'ic08' icon chunk.

signature
build-icns-from-canvas = fn [canvas_any any] any

Encodes a ui/canvas Canvas struct or { width, height, pixels } map into an Apple .icns byte buffer.

signature
verify-macho-arm64 = fn [bin_bytes bytes] any

Validates a 64-bit ARM64 MH_EXECUTE Mach-O binary and summarizes its load commands and dylibs.

signature
write-macos-app-bundle = fn [out_app_dir str, bin_bytes bytes, cfg MacBundleConfig] any

Writes a complete macOS .app bundle directory structure (Contents/Info.plist, PkgInfo, MacOS/<app>, optional .icns).

signature
verify-macos-app-bundle = fn [app_dir str, app_name str] any

Verifies an existing macOS .app bundle on disk (Info.plist, PkgInfo, ARM64 Mach-O binary, and optional .icns).

bundle-macos-from-source fn caps: .fs .exec
signature
bundle-macos-from-source = fn [veko_bin str, entry_vk str, out_app_dir str, cfg MacBundleConfig] any

Cross-compiles entry_vk for macos-arm64 via veko_bin and writes a verified .app bundle to out_app_dir.