Compare commits

..
20 Commits
Author SHA1 Message Date
waozi 2784fc7a67 Use the Android hidden-inset fix 2026-11-21 16:14:31 -03:00
waozi c2de148c8e Use the Android status-bar fix in Kryon 2026-11-21 16:01:25 -03:00
waozi c50edfb3ef Pin reproducible Kryon Android codec artifacts 2026-11-21 15:40:38 -03:00
waozi aa5153f99d Use Kryon fixes for immersive Android bounds and tile edges 2026-11-21 15:26:44 -03:00
waozi 38e8fcef40 Align Android consumers with repaired runtime and image loading 2026-11-21 13:55:32 -03:00
waozi c18e70b434 Align Apps with shared Kryon and Mesh client pins 2026-11-20 00:03:05 -03:00
waozi 15c64b44da Align the Kryon and Ziran dependency revisions 2026-11-19 14:34:51 -03:00
waoziandClaude Opus 5.5 b95d19334a Pin Kryon 0.6.0 and Ziran 0.7.0
Kryon v0.6.0 (8d5d2e75) on Ziran 0.7.0 (55b01768) is the released base
every root shares, so this package moves to it with the rest of the set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 15:57:30 -03:00
waoziandClaude Opus 5.5 764f24b48b Pin Kryon 1774e550 with the page event bridge kept to web targets
Kryon 1774e550 guards page_events to web targets on top of 97207e63's
canvas and pixmap picture hooks, so native source checks pass again.
Breeze's whole graph moves to it together, keeping one Kryon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 13:07:27 -03:00
waoziandClaude Opus 5.5 38463ca0da Pin Kryon 97207e63 with its canvas and pixmap picture hooks
Kryon 97207e63 exports canvas_os and pixmap_image_owner, so apps serve their
own pictures in the browser and on Android, and renders Android at native
size. Breeze's whole graph moves to it together, keeping one Kryon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 13:03:49 -03:00
waozi 7b826f4928 Pin Kryon 6816ed78 with its Cairo sliver fix on Ziran 0c4465a4 2026-11-18 10:51:58 -03:00
waoziandClaude Opus 5.5 b96d9afe5c Pin Kryon b5a61b37 with its Android frame pacing
Kryon b5a61b37 paces Android frames from retained paint changes, keeps
smooth indexed scene geometry on GLES and full shadow filtering without
hardware PCF, so Breeze's graph shares one Kryon for its Android host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 01:55:14 -03:00
waoziandClaude Opus 5.5 1ce583db6e Pin Kryon 8e44f3f8 with its indexed-mesh and animation fixes
Kryon 8e44f3f8 keeps indexed scene geometry relative to each mesh and
keeps desktop animations presenting without input. Practices already
builds on it, so Breeze's whole graph can share one Kryon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 01:19:33 -03:00
waozi f096fe7ccd Pin Kryon 3627ea8a with its Ziran 7fbc8152
Kryon 3627ea8a removes raylib, so the lock drops raylib, dr_libs and stb and
moves avif and audio to the pins that Kryon declares. Plot, Game2D, CSS,
Entity and Apps move to this pair together, so apps that combine them
share one Kryon.
2026-11-17 22:04:39 -03:00
waozi 40f598a171 Adopt Mesh release APIs and client package identity 2026-11-17 16:46:46 -03:00
waoziandClaude Opus 5.5 0d726f2a96 Pin Kryon 3f724419 with its Ziran e0367fa9
Kryon 3f724419 builds its vendored codecs with CMake 4 and pins Ziran
e0367fa9, which includes the Wasm record-copy fix (6a066abd) that
hosted bundles need in the browser. CSS, Plot, Game2D, Entity, Apps,
Auth and Workbook move to this pair together, so consumers keep one
Kryon copy.

Local tests: ziran lock and the package's own suite through build-queue,
on HEAD plus this change (other uncommitted work set aside, no local
overrides).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 00:40:41 -03:00
waozi 93cea0fac5 Hash the shared controller on Python 3.10
Stream SHA-256 in bounded chunks instead of using hashlib.file_digest,
which is unavailable on Ubuntu 22.04's Python 3.10. Keep the controller
payload and trusted manifest digest unchanged.

Local test: build-queue -- python3 with hashlib.file_digest removed,
running tests/ui_build_test.py. Both consumer and standalone builds pass.
2026-11-16 23:57:59 -03:00
waoziandClaude Opus 5.5 ea3a850c6b Pin Kryon 9052a642 and its Ziran ebd19223
Kryon 9052a642 applies desktop camera offsets to Cairo painting and
pixel snapping; ebd19223 is the Ziran it pins. CSS, Plot, Game2D, Entity,
Apps and Auth move to this pair together, so consumers keep one Kryon
copy.

Local tests: ziran lock and the package's own suite through build-queue,
on HEAD plus this change (other uncommitted work set aside, no local
overrides).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 21:46:29 -03:00
waoziandClaude Opus 5.5 04bedb0f6f Test hosted audio and art on Kryon's raylib-free paths
The native audio test installs MediaAudioUseDesktop from
kryon/media_audio_desktop: Kryon's desktop mixer pulls through its SDL sink
on SDL's paced dummy driver, linking SDL2 and libopus instead of raylib and
a miniaudio null build. The art test decodes the recovered preview through
kryon/image_pixels (GdkPixbuf on first use) and checks the same 1x1 opaque
RGB pixel, with no raylib rtextures build or stubs. The README documents the
desktop provider and the RAYLIB_A-free test command.

Local tests: full Apps suite through build-queue on a clean tree, including
art_host_test.py and audio_host_test.py (dummy and desktop/SDL modes).

Owner-request: Waozi, 2026-11-16 (remove raylib dependencies)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 20:15:26 -03:00
waozi 67213658ed Pin Kryon 0.4.0 release commit 2026-11-16 19:53:59 -03:00
12 changed files with 129 additions and 171 deletions

No files matched your search

+2
View File
@@ -2,6 +2,8 @@
## [Unreleased]
- Use Mesh release APIs and package imports without changing signed release messages or cached catalog formats.
- Offer each host only node releases it can run: the publisher checks each payload's ZX revision against the ledger, the remote catalog names its revision and oldest host interface, and the node's history keeps the newest release of every format, ZX revision and interface. Publish an optional signed WebAssembly variant of a node app for web hosts.
- Validate signed package sizes against checked integer ranges instead of a universal 64 MiB limit, and verify public payloads incrementally without weakening signatures or exact digests.
+4 -4
View File
@@ -151,7 +151,7 @@ position. Legacy Media services retain their existing dispatch and permission
policy.
The native consumer installs its provider once on its owning thread with
`MediaAudioUseRaylib()` from `kryon/media_audio_raylib`. Without a provider,
`MediaAudioUseDesktop()` from `kryon/media_audio_desktop`. Without a provider,
authorized calls return `Unsupported`; device/browser results retain Kryon's
`Unavailable`/`Suspended` semantics. Apps supplies each actual `HostedApp.audio`
owner and `AppHostAudioRead` to `WidgetHostAudioCall`, using the active node's
@@ -280,7 +280,7 @@ verifies public package imports and launcher search/grouping.
copy, one transfer at a time and waiting 1 s, doubling to 60 s, between attempts.
`python3 tests/art_host_test.py /path/to/libziran.a` serves a real HTTP failure,
then decodes the recovered art's pixels without a display.
- `RAYLIB_A=/path/to/libraylib.a python3 tests/audio_host_test.py /path/to/libziran.a`
exercises real hosted guests with dummy/no-provider and private null-device
Raylib hosts. Run `tests/native_fixture.py`, `tests/consumer_test.py` and
- `python3 tests/audio_host_test.py /path/to/libziran.a`
exercises real hosted guests with dummy/no-provider hosts and Kryon's desktop
mixer on SDL's private dummy device. Run `tests/native_fixture.py`, `tests/consumer_test.py` and
`tests/tree_test.sh` with the same resolved compiler/runtime graph too.
+7 -7
View File
@@ -1,6 +1,6 @@
#import "apps/host"
Hash :: #import "crypto/sha256";
Daochi :: #import "daochi_client/crypto";
Mesh :: #import "mesh_client/crypto";
#import "std/c_string"
#import "std/text_buffer"
@@ -11,19 +11,19 @@ Check :: () -> s32 {
input: [3]u8 = .[97, 98, 99]
first: [32]u8; second: [32]u8
first_hex: [65]u8; second_hex: [65]u8
Hash.Sha256(*input[0], 3, *first[0]); Daochi.Sha256(*input[0], 3, *second[0])
Hash.Sha256(*input[0], 3, *first[0]); Mesh.Sha256(*input[0], 3, *second[0])
if Hash.BytesToHex(*first[0], 32, *first_hex[0], 65) != 1 ||
Daochi.BytesToHex(*second[0], 32, *second_hex[0], 65) != 1 ||
Mesh.BytesToHex(*second[0], 32, *second_hex[0], 65) != 1 ||
TextUntilNul(first_hex[:]) != known || TextUntilNul(second_hex[:]) != known { return 2 }
Hash.Sha256Hex(*input[0], 3, *first_hex[0]); Daochi.Sha256Hex(*input[0], 3, *second_hex[0])
Hash.Sha256Hex(*input[0], 3, *first_hex[0]); Mesh.Sha256Hex(*input[0], 3, *second_hex[0])
if TextUntilNul(first_hex[:]) != known || TextUntilNul(second_hex[:]) != known { return 3 }
if Hash.HexToBytes(known, *first[0], 32) != 1 || Daochi.HexToBytes(known, *second[0], 32) != 1 { return 4 }
if Hash.HexToBytes(known, *first[0], 32) != 1 || Mesh.HexToBytes(known, *second[0], 32) != 1 { return 4 }
key: [3]u8 = .[107, 101, 121]
if Hash.HmacSha256(*key[0], 3, *input[0], 3, *first[0]) != 1 ||
Daochi.HmacSha256(*key[0], 3, *input[0], 3, *second[0]) != 1 { return 5 }
Mesh.HmacSha256(*key[0], 3, *input[0], 3, *second[0]) != 1 { return 5 }
for at: cast(s32)0..31 { if first[at] != second[at] { return 6 } }
if Hash.HmacSha256Text(*key[0], 3, "abc", *first[0]) != 1 ||
Daochi.HmacSha256Text(*key[0], 3, "abc", *second[0]) != 1 { return 7 }
Mesh.HmacSha256Text(*key[0], 3, "abc", *second[0]) != 1 { return 7 }
for at: cast(s32)0..31 { if first[at] != second[at] { return 8 } }
return 0
}
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Sign, check and publish the Daochi releases of apps the node offers.
"""Sign, check and publish the Mesh releases of apps the node offers.
The node serves each app as signed release v2 metadata beside its immutable
ZX portable executable. ZX hosts ask the node with format=zx and the ZX
@@ -591,7 +591,7 @@ def publish_node_app(store, name, target, remote_store, app_id=None):
if not re.fullmatch(r"[a-zA-Z0-9_.@-]+", target) or target.startswith("-"):
raise ValueError("invalid SSH target")
if not remote_store.startswith("/") or "\n" in remote_store:
raise ValueError("Daochi package store must be an absolute path")
raise ValueError("Mesh package store must be an absolute path")
with tempfile.TemporaryDirectory(prefix="inbe-upload-") as staging:
archive = Path(staging) / "packages.tar"
directory = store / (app_id or "inbe." + name)
+27 -27
View File
@@ -13,7 +13,7 @@
#import "kryon/http_transfer"
#import "catalog"
#import "protocol"
Release :: #import "daochi_client/release";
Release :: #import "mesh_client/release";
APP_REMOTE_METADATA_LIMIT :: 65536
APP_REMOTE_CATALOG_LIMIT :: 262144
@@ -35,7 +35,7 @@ AppRemoteSource :: struct {
AppRemoteCatalog :: struct {
source: AppRemoteSource
files: *AppFiles
verify: Release.DaochiReleaseVerify
verify: Release.MeshReleaseVerify
allowed: bool
failed: bool
changed: bool
@@ -46,14 +46,14 @@ AppRemoteCatalog :: struct {
response: [APP_REMOTE_METADATA_LIMIT + 1]u8
allocation: *u8
pending_metadata: string
pending_release: Release.DaochiRelease
pending_release: Release.MeshRelease
metadata: string
bytes: string
release: Release.DaochiRelease
release: Release.MeshRelease
// Retained until the consumer stops using its previous root collection.
previous_metadata: string
previous_bytes: string
previous_release: Release.DaochiRelease
previous_release: Release.MeshRelease
}
remote_memory :: #system_library "c";
@@ -81,12 +81,12 @@ AppRemoteOriginValid :: (origin: string) -> bool {
AppRemoteSourceValid :: (source: *AppRemoteSource) -> bool {
return source != null && AppRemoteOriginValid(TextUntilNul(source.origin[:])) &&
Release.DaochiIdentifierValid(TextUntilNul(source.app_id[:])) &&
Release.DaochiIdentifierValid(TextUntilNul(source.key_id[:])) &&
Release.DaochiHashValid(TextUntilNul(source.public_key[:])) &&
source.oldest_host_api > 0 && source.oldest_host_api <= source.host_api &&
source.host_api <= 65535 && source.module_api > 0 && source.module_api <= 65535 &&
source.minimum_sequence >= 0 && source.minimum_sequence <= 2147483647
Release.MeshIdentifierValid(TextUntilNul(source.app_id[:])) &&
Release.MeshIdentifierValid(TextUntilNul(source.key_id[:])) &&
Release.MeshHashValid(TextUntilNul(source.public_key[:])) &&
source.oldest_host_api > 0 && source.oldest_host_api <= source.host_api &&
source.host_api <= 65535 && source.module_api > 0 && source.module_api <= 65535 &&
source.minimum_sequence >= 0 && source.minimum_sequence <= 2147483647
}
AppRemoteSourceRead :: (json: string, at: s32, source: *AppRemoteSource) -> bool {
@@ -100,13 +100,13 @@ AppRemoteSourceRead :: (json: string, at: s32, source: *AppRemoteSource) -> bool
if cast(float64)source.minimum_sequence != number.value { return false }
}
return AppsReadText(json, at, "origin", source.origin[:]) &&
AppsReadText(json, at, "app_id", source.app_id[:]) &&
AppsReadText(json, at, "key_id", source.key_id[:]) &&
AppsReadText(json, at, "public_key", source.public_key[:]) && AppRemoteSourceValid(source)
AppsReadText(json, at, "app_id", source.app_id[:]) &&
AppsReadText(json, at, "key_id", source.key_id[:]) &&
AppsReadText(json, at, "public_key", source.public_key[:]) && AppRemoteSourceValid(source)
}
AppRemoteParse :: (remote: *AppRemoteCatalog, metadata: string) -> Release.DaochiRelease {
signed := Release.DaochiParseRelease(metadata, TextUntilNul(remote.source.public_key[:]),
AppRemoteParse :: (remote: *AppRemoteCatalog, metadata: string) -> Release.MeshRelease {
signed := Release.MeshParseRelease(metadata, TextUntilNul(remote.source.public_key[:]),
67108864, remote.verify)
if !signed.valid || TextUntilNul(signed.app_id[:]) != TextUntilNul(remote.source.app_id[:]) ||
TextUntilNul(signed.key_id[:]) != TextUntilNul(remote.source.key_id[:]) ||
@@ -115,7 +115,7 @@ AppRemoteParse :: (remote: *AppRemoteCatalog, metadata: string) -> Release.Daoch
signed.module_api != remote.source.module_api || signed.data_schema != 0 ||
signed.dependency_count != 0 || signed.sequence < remote.source.minimum_sequence ||
signed.artifacts[0].size > APP_REMOTE_CATALOG_LIMIT {
return Release.DaochiRelease.{}
return Release.MeshRelease.{}
}
return signed
}
@@ -132,16 +132,16 @@ AppRemoteRead :: (files: *AppFiles, name: string, maximum: s64) -> string {
return AppFileRead(files, name)
}
AppRemotePayloadName :: (release: *Release.DaochiRelease) -> string {
AppRemotePayloadName :: (release: *Release.MeshRelease) -> string {
name: Vec(u8)
BuilderPrint(*name, "%.zx", TextUntilNul(release.artifacts[0].sha256[:]))
return BuilderFinish(name)
}
AppRemoteCollectionValid :: (remote: *AppRemoteCatalog, bytes: string,
release: *Release.DaochiRelease) -> bool {
release: *Release.MeshRelease) -> bool {
if !release.valid || bytes.count != release.artifacts[0].size ||
!Release.DaochiSha256Matches(bytes, TextUntilNul(release.artifacts[0].sha256[:])) { return false }
!Release.MeshSha256Matches(bytes, TextUntilNul(release.artifacts[0].sha256[:])) { return false }
opened: HostedApp
if !HostedAppOpen(*opened, bytes) { return false }
defer { HostedAppClose(*opened) }
@@ -154,7 +154,7 @@ AppRemoteCollectionValid :: (remote: *AppRemoteCatalog, bytes: string,
// No network request is made here. Invalid cache bytes remain unexecuted.
// The AppFiles namespace belongs to this one configured collection.
AppRemoteCatalogOpen :: (remote: *AppRemoteCatalog, source: AppRemoteSource,
files: *AppFiles, verify: Release.DaochiReleaseVerify) -> bool {
files: *AppFiles, verify: Release.MeshReleaseVerify) -> bool {
if remote == null || remote.files != null || files == null || verify == null ||
!AppRemoteSourceValid(*source) { return false }
remote.source = source
@@ -184,7 +184,7 @@ AppRemoteCancelTransfer :: (remote: *AppRemoteCatalog) {
if remote.allocation != null { AppRemoteFree(remote.allocation); remote.allocation = null }
AppFileFree(remote.pending_metadata)
remote.pending_metadata = ""
remote.pending_release = Release.DaochiRelease.{}
remote.pending_release = Release.MeshRelease.{}
remote.stage = 0
}
@@ -237,7 +237,7 @@ AppRemoteFail :: (remote: *AppRemoteCatalog) {
remote.failed = true
}
AppRemoteAccept :: (remote: *AppRemoteCatalog, release: Release.DaochiRelease,
AppRemoteAccept :: (remote: *AppRemoteCatalog, release: Release.MeshRelease,
metadata: string, bytes: string) -> bool {
name := AppRemotePayloadName(*release)
defer { AppFileFree(name) }
@@ -271,7 +271,7 @@ AppRemoteCatalogPump :: (remote: *AppRemoteCatalog) {
signed := AppRemoteParse(remote, metadata)
if !signed.valid || (remote.ready && (signed.sequence < remote.release.sequence ||
(signed.sequence == remote.release.sequence &&
TextUntilNul(signed.artifacts[0].sha256[:]) != TextUntilNul(remote.release.artifacts[0].sha256[:])))) {
TextUntilNul(signed.artifacts[0].sha256[:]) != TextUntilNul(remote.release.artifacts[0].sha256[:])))) {
AppFileFree(metadata)
AppRemoteFail(remote)
return
@@ -320,7 +320,7 @@ AppRemoteCatalogCollect :: (remote: *AppRemoteCatalog) {
AppFileFree(remote.previous_bytes)
remote.previous_metadata = ""
remote.previous_bytes = ""
remote.previous_release = Release.DaochiRelease.{}
remote.previous_release = Release.MeshRelease.{}
remote.changed = false
AppRemotePruneCache(remote)
}
@@ -347,7 +347,7 @@ AppRemotePruneCache :: (remote: *AppRemoteCatalog) {
if !entry.valid { break }
name := TextUntilNul(entry.name[:])
if (entry.kind != .Regular && entry.kind != .Unknown) || name.count != 67 ||
name[64:] != ".zx" || !Release.DaochiHashValid(name[:64]) ||
name[64:] != ".zx" || !Release.MeshHashValid(name[:64]) ||
name[:64] == current_hash || (fallback.valid && name[:64] == previous_hash) { continue }
// AppFiles validates every component and refuses symbolic links.
path := AppFilePath(remote.files, name, false)
@@ -366,7 +366,7 @@ AppRemoteCatalogRestore :: (remote: *AppRemoteCatalog) -> bool {
remote.release = remote.previous_release
remote.previous_metadata = ""
remote.previous_bytes = ""
remote.previous_release = Release.DaochiRelease.{}
remote.previous_release = Release.MeshRelease.{}
remote.changed = false
remote.failed = true
return restored
+11 -9
View File
@@ -15,7 +15,9 @@
#import "kryon/hosted_app"
#import "kryon/hosted_values"
#import "kryon/file_download"
#import "art_decode"
#import "kryon/image_pixels"
#import "std/image"
#import "std/vec"
transfer: FileDownload;
requests: s32;
bundle_calls: s32;
@@ -23,8 +25,6 @@ libc :: #system_library "libc";
PreparationTestBegin :: () #foreign libc;
PreparationTestYield :: () #foreign libc;
PreparationTestNow :: () -> float64 #foreign libc;
art_raylib :: #system_library "raylib";
ArtUnloadImage :: (image: RaylibGlyphImage) #foreign art_raylib "UnloadImage";
rejected: s32;
cached: string;
ArtBundle :: (context: *void, parent: *AppNode, entry: *AppEntry) -> HostedAsset {
@@ -93,12 +93,14 @@ ArtCheck :: () -> s32 {
PreparationTestYield()
}
if !preview.found || requests != 4 { return 7 }
// Decode through Kryon's actual native CPU decoder, then inspect pixel data.
image := RaylibDecodePixels(preview.data, ".png")
if image.data == null || image.width != 1 || image.height != 1 || image.format != 4 { return 8 }
pixel := cast(*u8)image.data
correct := pixel[0] == 40 && pixel[1] == 160 && pixel[2] == 100
ArtUnloadImage(image)
// Decode the recovered bytes through Kryon's actual desktop CPU decoder,
// which reads a file, then inspect its straight RGBA pixel data.
decoded := FixtureEnvironment("APPS_ART_PREVIEW")
if !WriteEntireFile(decoded, preview.data) { return 8 }
image := LoadImagePixels(decoded)
if image.width != 1 || image.height != 1 || image.pixels.count != 4 { VecFree(image.pixels); return 8 }
correct := image.pixels[0] == 40 && image.pixels[1] == 160 && image.pixels[2] == 100 && image.pixels[3] == 255
VecFree(image.pixels)
if !correct { return 9 }
FileDownloadRelease(*transfer)
if !SlimStop(*host) { return 10 }
+8 -21
View File
@@ -5,7 +5,6 @@ import json
import os
from pathlib import Path
import shutil
import shlex
import subprocess
import sys
import threading
@@ -48,14 +47,12 @@ def main():
(assets / 'preview.png').unlink()
(assets / 'apps/apps.zx').unlink()
native.bundle('collection', root, assets)
toolchain, kryon, raylib = [Path(subprocess.check_output(
[native.ZIRAN, 'pkg', 'path', name], cwd=ROOT, text=True).strip())
for name in ('ziran', 'kryon', 'raylib')]
toolchain = Path(subprocess.check_output(
[native.ZIRAN, 'pkg', 'path', 'ziran'], cwd=ROOT, text=True).strip())
mapping = WORK / 'module-map.tsv'
lines = (ROOT / 'build/.ziran/module-map.tsv').read_text().splitlines()
lines += ['M\troot\tnative_behavior\t' + str(ROOT / 'tests/native_behavior.zi'),
'M\troot\tart_host_behavior\t' + str(ROOT / 'tests/art_host_behavior.zi'),
'D\troot\tart_decode\t' + kryon.name + '\traylib_image_decode']
'M\troot\tart_host_behavior\t' + str(ROOT / 'tests/art_host_behavior.zi')]
mapping.write_text('\n'.join(lines) + '\n')
os.environ['ZIRAN_PACKAGE_MAP'] = str(mapping)
output = WORK / 'c'
@@ -66,26 +63,15 @@ def main():
'int main(void) { int r=ArtCheck(); if(r) fprintf(stderr,"Apps art test %d failed\\n",r); return r?1:0; }\n')
includes = [arg for p in [output, *sorted(output.rglob('*'))] if p.is_dir() for arg in ('-iquote', str(p))]
cc = os.environ.get('CC', 'cc')
# Only Raylib's CPU image decoder is linked; no window or graphics context exists.
support = WORK / 'raylib_support.c'
support.write_text('#include <stdlib.h>\n'
'void TraceLog(int level, const char *text, ...) { (void)level; (void)text; }\n'
'void *MemAlloc(unsigned int size) { return calloc(size, 1); }\n'
'void *MemRealloc(void *data, unsigned int size) { return realloc(data, size); }\n'
'void MemFree(void *data) { free(data); }\n'
'const char *rlGetPixelFormatName(unsigned int format) { (void)format; return ""; }\n')
decoder = WORK / 'rtextures.o'
run(cc, '-O1', '-ffunction-sections', '-fdata-sections', '-I' + str(raylib / 'src'),
'-c', raylib / 'src/rtextures.c', '-o', decoder)
# Kryon's desktop decoder loads the system GdkPixbuf on first use; no
# window or graphics context exists.
executable = WORK / 'test'
webp_libs = shlex.split(subprocess.check_output(
['pkg-config', '--libs', 'libwebpdemux', 'libwebp'], text=True))
run(cc, '-std=c11', '-O1', '-ffunction-sections', '-fdata-sections',
'-I' + str(toolchain / 'include'), *includes, *sorted(output.rglob('*.c')),
ROOT / 'tests/preparation_host.c', support, sys.argv[1], decoder,
ROOT / 'tests/preparation_host.c', sys.argv[1],
'-Wl,--gc-sections', '-Wl,--wrap=BundleOpenBytes',
'-Wl,--wrap=BundleInstantiate', '-Wl,--wrap=BundleInstanceRun', '-Wl,--wrap=BundleClose',
*webp_libs, '-lm', '-lpthread', '-o', executable)
'-ldl', '-lm', '-lpthread', '-o', executable)
class Handler(http.server.BaseHTTPRequestHandler):
calls = 0
def do_GET(self):
@@ -107,6 +93,7 @@ def main():
thread.start()
env = dict(os.environ, APPS_ART_URL=f'http://127.0.0.1:{server.server_port}/art.zx',
APPS_ART_DESTINATION=str(WORK / 'download.zx'),
APPS_ART_PREVIEW=str(WORK / 'preview.png'),
APPS_FIXTURE_SLIM_ROOT_BUNDLE=str(root), APPS_FIXTURE_SLIM_ROOT_SHA256=native.digest(root),
APPS_FIXTURE_UI_BUNDLE=str(controller), APPS_FIXTURE_HARNESS_SHA256=native.digest(controller))
try:
+2 -2
View File
@@ -27,7 +27,7 @@ Node :: #import "node_types";
#import "kryon/media_audio"
#import "kryon/media_audio_host"
#if #defined(APPS_AUDIO_NATIVE_TEST) {
#import "kryon/media_audio_raylib"
#import "kryon/media_audio_desktop"
}
using HostValueKind;
using FrameStatus;
@@ -85,7 +85,7 @@ AudioDummy :: (voice: *MediaAudioVoice, command: MediaAudioCommand, bytes: strin
}
AudioInstall :: () {
#if #defined(APPS_AUDIO_NATIVE_TEST) {
MediaAudioUseRaylib()
MediaAudioUseDesktop()
} else {
MediaAudioUseProvider(AudioDummy)
}
+4 -10
View File
@@ -64,14 +64,6 @@ def main():
os.environ['APPS_AUDIO_' + kind + '_SHA256'] = native.digest(path)
toolchain = Path(subprocess.check_output([ZIRAN, 'pkg', 'path', 'ziran'], cwd=ROOT, text=True).strip())
kryon = Path(subprocess.check_output([ZIRAN, 'pkg', 'path', 'kryon'], cwd=ROOT, text=True).strip())
raylib = Path(os.environ['RAYLIB_A'])
# Use Raylib's actual decoder/mixer with miniaudio's paced null backend.
# ALSA null consumes without pacing and cannot verify a playback clock.
audio_source = raylib.parent / 'source/raudio.c'
null_audio = WORK / 'null-audio.o'
run(os.environ.get('CC', 'cc'), '-O1', '-ffunction-sections', '-fdata-sections',
'-DMA_ENABLE_ONLY_SPECIFIC_BACKENDS', '-DMA_ENABLE_NULL',
'-I' + str(audio_source.parent), '-c', audio_source, '-o', null_audio)
# Like consumer_test.py, extend the actual resolved package map only for
# test entry modules outside the package's published module roots.
mapping = WORK / 'module-map.tsv'
@@ -92,7 +84,9 @@ def main():
includes = [arg for p in [output, *sorted(output.rglob('*'))] if p.is_dir() for arg in ('-iquote', str(p))]
libs = []
if actual:
libs = [str(null_audio), str(raylib), *subprocess.check_output(['pkg-config', '--libs', 'sdl2', 'libdrm', 'gbm', 'egl', 'glesv2', 'opus'], text=True).split(), '-ldl']
# Kryon's desktop mixer pulls through its SDL sink; SDL's dummy
# driver paces that pull like a device clock and opens no device.
libs = subprocess.check_output(['pkg-config', '--libs', 'sdl2', 'opus'], text=True).split()
executable = WORK / 'test'
run(os.environ.get('CC', 'cc'), '-std=c11', '-O1', '-ffunction-sections', '-fdata-sections',
'-I' + str(toolchain / 'include'), *includes, *sorted(output.rglob('*.c')),
@@ -110,7 +104,7 @@ def main():
if result.returncode:
print((result.stdout + result.stderr)[-6000:])
result.check_returncode()
print('Apps audio: ' + ('actual Raylib/null device' if actual else 'dummy/no provider') + ' passed')
print('Apps audio: ' + ('actual desktop mixer/SDL dummy device' if actual else 'dummy/no provider') + ' passed')
print('Apps audio package: ' + str(kryon))
+9 -9
View File
@@ -1,4 +1,4 @@
"""Link actual Apps and DaochiClient against an explicit canonical Crypto source.
"""Link actual Apps and Mesh Client against an explicit canonical Crypto source.
No package checkout, generated-code patch or consumer lock edit is involved.
The independent fixture uses real package-qualified imports on retained IR55.
@@ -18,7 +18,7 @@ def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("runtime", type=Path)
parser.add_argument("--crypto-source", type=Path, required=True)
parser.add_argument("--daochi-source", type=Path, required=True)
parser.add_argument("--mesh-source", type=Path, required=True)
args = parser.parse_args()
for name in ("DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", "DBUS_SESSION_BUS_ADDRESS"):
os.environ.pop(name, None)
@@ -30,14 +30,14 @@ def main():
package = "p0000000000000001"
crypto_id = next(row.split("\t")[3] for row in mapping_rows if row.startswith("D\troot\tcrypto/sha256\t"))
old_crypto = next(row.split("\t")[2] for row in mapping_rows if row.startswith("P\t" + crypto_id + "\t"))
# Keep the resolved Daochi identity and its dependency edges when testing
# Keep the resolved Mesh identity and its dependency edges when testing
# another source root; the same file cannot be a second package module.
dao_id = next(row.split("\t")[3] for row in mapping_rows
if row.startswith("D\troot\tdaochi_client/crypto\t"))
old_dao = next(row.split("\t")[2] for row in mapping_rows
if row.startswith("P\t" + dao_id + "\t"))
mesh_id = next(row.split("\t")[3] for row in mapping_rows
if row.startswith("D\troot\tmesh_client/crypto\t"))
old_mesh = next(row.split("\t")[2] for row in mapping_rows
if row.startswith("P\t" + mesh_id + "\t"))
sources = [(old_crypto, args.crypto_source.resolve()),
(old_dao, args.daochi_source.resolve())]
(old_mesh, args.mesh_source.resolve())]
for row in mapping_rows:
fields = row.split("\t")
if len(fields) > 1 and fields[1] == "root":
@@ -68,7 +68,7 @@ def main():
"-I" + str(toolchain / "include"), *includes, *map(str, sorted(output.rglob("*.c"))),
str(args.runtime.resolve()), "-Wl,--gc-sections", "-lm", "-lpthread", "-o", str(WORK / "test")], check=True)
subprocess.run([str(WORK / "test")], check=True)
print("IR55 external Apps + DaochiClient + Crypto native link and unchanged SHA256/hex/HMAC APIs passed")
print("IR55 external Apps + Mesh Client + Crypto native link and unchanged SHA256/hex/HMAC APIs passed")
if __name__ == "__main__":
+46 -73
View File
@@ -20,13 +20,22 @@
"url": "https://github.com/libsdl-org/SDL.git"
},
{
"commit": "f26a552247e2cd367fd33def6860d903cac6ab8a",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "p274c2dd6d03a7c0c",
"name": "avif",
"ref": "f26a552247e2cd367fd33def6860d903cac6ab8a",
"url": "https://github.com/ziranlang/avif.git"
"commit": "d99d9e9802061f726773a0f89d15ec4ed3366957",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p26a11bcd81564528",
"name": "mesh_client",
"ref": "d99d9e9802061f726773a0f89d15ec4ed3366957",
"url": "https://git.waozi.xyz/ziranlang/mesh-client.git"
},
{
"commit": "ec6ed304767e10c125ab2820f3b01d6fd773e147",
"dependencies": {"image_codec": "p69c0e968ae5735d9", "libwebp": "p3b3c785a0e17e605"},
"dependency_refs": {"image_codec": "360553150917f352e49e1beb78917370792ccaef", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339"},
"id": "p2af20e0c835b1c63",
"name": "webp",
"ref": "ec6ed304767e10c125ab2820f3b01d6fd773e147",
"url": "https://github.com/ziranlang/webp.git"
},
{
"commit": "1844042d1ca751e62e61df7617dba19c98588339",
@@ -37,6 +46,15 @@
"source": true,
"url": "https://github.com/webmproject/libwebp.git"
},
{
"commit": "f5f186bb13569ef13338f81366ff63fb9b9282f6",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "p3ed49c5d0912e411",
"name": "avif",
"ref": "f5f186bb13569ef13338f81366ff63fb9b9282f6",
"url": "https://github.com/ziranlang/avif.git"
},
{
"commit": "1aadfad932c98c069a1204261b1856f81f3bc199",
"dependencies": {},
@@ -46,6 +64,15 @@
"source": true,
"url": "https://github.com/AOMediaCodec/libavif.git"
},
{
"commit": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2",
"dependencies": {"libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e"},
"dependency_refs": {"libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7"},
"id": "p59deb49c7f103127",
"name": "audio",
"ref": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2",
"url": "https://github.com/ziranlang/audio.git"
},
{
"commit": "bd278217e2bac754d868b3d6502eac4257658d4b",
"dependencies": {"dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa"},
@@ -63,15 +90,6 @@
"ref": "360553150917f352e49e1beb78917370792ccaef",
"url": "https://github.com/ziranlang/image-codec.git"
},
{
"commit": "970d5e44b1702158cb16469892da6ff50f142427",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p6af0b5bd9fd0cd31",
"name": "DaochiClient",
"ref": "970d5e44b1702158cb16469892da6ff50f142427",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
"dependencies": {"liboqs": "p983c695d118b6109"},
@@ -90,15 +108,6 @@
"source": true,
"url": "https://aomedia.googlesource.com/aom"
},
{
"commit": "1b290f19aa1a4069c908a4687f04458c58a2b658",
"dependencies": {"audio": "pb46a53117b2530ce", "avif": "p274c2dd6d03a7c0c", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b", "webp": "pa068bd09450b2a80"},
"dependency_refs": {"audio": "ce5837f80e8ce6cb8d2d9f77915095d764da3485", "avif": "f26a552247e2cd367fd33def6860d903cac6ab8a", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "02145a00a1f0df2a111da04a75f3fef260883897"},
"id": "p8f647d8005d4c2a7",
"name": "kryon",
"ref": "1b290f19aa1a4069c908a4687f04458c58a2b658",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "e77d81dab791c13bf1c4e5d9a7160c403be9bbe0",
"dependencies": {},
@@ -108,15 +117,6 @@
"source": true,
"url": "https://github.com/open-quantum-safe/liboqs.git"
},
{
"commit": "02145a00a1f0df2a111da04a75f3fef260883897",
"dependencies": {"image_codec": "p69c0e968ae5735d9", "libwebp": "p3b3c785a0e17e605"},
"dependency_refs": {"image_codec": "360553150917f352e49e1beb78917370792ccaef", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339"},
"id": "pa068bd09450b2a80",
"name": "webp",
"ref": "02145a00a1f0df2a111da04a75f3fef260883897",
"url": "https://github.com/ziranlang/webp.git"
},
{
"commit": "54706fc6bc0cdecab7e9593974a4039cc038fca7",
"dependencies": {},
@@ -126,24 +126,6 @@
"source": true,
"url": "https://github.com/videolan/dav1d.git"
},
{
"commit": "ce5837f80e8ce6cb8d2d9f77915095d764da3485",
"dependencies": {"dr_libs": "pb7c2dd1c09da0c1c", "libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e", "stb": "pe4a63e2d6e0424e7"},
"dependency_refs": {"dr_libs": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c", "libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7", "stb": "9600522de53973336fa033a289858a4354cbb04c"},
"id": "pb46a53117b2530ce",
"name": "audio",
"ref": "ce5837f80e8ce6cb8d2d9f77915095d764da3485",
"url": "https://github.com/ziranlang/audio.git"
},
{
"commit": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c",
"dependencies": {},
"id": "pb7c2dd1c09da0c1c",
"name": "dr_libs",
"ref": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c",
"source": true,
"url": "https://github.com/mackron/dr_libs.git"
},
{
"commit": "944826f70779a6b6cd53f6b06a75b36f4d8a2558",
"dependencies": {},
@@ -152,15 +134,6 @@
"ref": "master",
"url": "https://github.com/ziranlang/crypto.git"
},
{
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"dependencies": {},
"id": "pcc7aa76725f2fb2f",
"name": "raylib",
"ref": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"source": true,
"url": "https://github.com/raysan5/raylib.git"
},
{
"commit": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6",
"dependencies": {},
@@ -171,23 +144,23 @@
"url": "https://github.com/xiph/opus.git"
},
{
"commit": "9600522de53973336fa033a289858a4354cbb04c",
"dependencies": {},
"id": "pe4a63e2d6e0424e7",
"name": "stb",
"ref": "9600522de53973336fa033a289858a4354cbb04c",
"source": true,
"url": "https://github.com/nothings/stb.git"
"commit": "609be370592f0c6e617ad5fca8774069aef16dc5",
"dependencies": {"audio": "p59deb49c7f103127", "avif": "p3ed49c5d0912e411", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "sdl3": "p16cd0434af3dff7b", "webp": "p2af20e0c835b1c63"},
"dependency_refs": {"audio": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2", "avif": "f5f186bb13569ef13338f81366ff63fb9b9282f6", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "ec6ed304767e10c125ab2820f3b01d6fd773e147"},
"id": "pfd7050febfef3900",
"name": "kryon",
"ref": "609be370592f0c6e617ad5fca8774069aef16dc5",
"url": "https://git.waozi.xyz/kryonlabs/kryon.git"
}
],
"root": {
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "p8f647d8005d4c2a7"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658"},
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "pfd7050febfef3900", "mesh_client": "p26a11bcd81564528"},
"dependency_refs": {"crypto": "master", "kryon": "609be370592f0c6e617ad5fca8774069aef16dc5", "mesh_client": "d99d9e9802061f726773a0f89d15ec4ed3366957"},
"name": "Apps"
},
"toolchain": {
"commit": "d17c7aa1e093066ef03f307a45f6966dd9b29d4b",
"ref": "d17c7aa1e093066ef03f307a45f6966dd9b29d4b",
"url": "https://github.com/ziranlang/ziran.git"
"commit": "3432c0ca263e855cd6d1627d1e42e70749f5aa0b",
"ref": "3432c0ca263e855cd6d1627d1e42e70749f5aa0b",
"url": "https://git.waozi.xyz/ziranlang/ziran.git"
}
}
+7 -7
View File
@@ -3,8 +3,8 @@ name = "Apps"
module_roots = ["src", "ui", "fixtures"]
[toolchain]
git = "https://github.com/ziranlang/ziran.git"
ref = "d17c7aa1e093066ef03f307a45f6966dd9b29d4b"
git = "https://git.waozi.xyz/ziranlang/ziran.git"
ref = "3432c0ca263e855cd6d1627d1e42e70749f5aa0b"
[exports]
game_hud = "src/game_hud.zi"
@@ -24,13 +24,13 @@ node_app = "src/node_app.zi"
node_codec = "src/node_codec.zi"
[dependencies.kryon]
git = "https://github.com/kryonlabs/kryon.git"
ref = "1b290f19aa1a4069c908a4687f04458c58a2b658"
git = "https://git.waozi.xyz/kryonlabs/kryon.git"
ref = "609be370592f0c6e617ad5fca8774069aef16dc5"
[dependencies.crypto]
git = "https://github.com/ziranlang/crypto.git"
ref = "master"
[dependencies.daochi_client]
git = "https://github.com/ziranlang/daochi-client.git"
ref = "970d5e44b1702158cb16469892da6ff50f142427"
[dependencies.mesh_client]
git = "https://git.waozi.xyz/ziranlang/mesh-client.git"
ref = "d99d9e9802061f726773a0f89d15ec4ed3366957"