From f25b4dfd5e5fe2b32ad3ac23a1584b80fcf14fed Mon Sep 17 00:00:00 2001 From: Waozi Date: Sun, 18 Oct 2026 23:20:13 -0300 Subject: [PATCH] Build Apps and Crypto as locked packages and take the node-app ABI from Apps Apps and Crypto are now ordinary Ziran dependencies, pinned in ziran.lock and linked by scripts/packages.sh, instead of local checkouts handed to the build. Every dependency and the toolchain are on their latest revisions. scripts/package-paths.sh is the one list of NAME=DIR package paths; the native, web, Windows and Android builds, the source check, the bundle scripts and the tests all use it, so they resolve packages the same way. The shared Apps controller bundle is built from the locked Apps package, and its reviewed digest matches that build. Node apps, the feature cells and the host import the module ABI and the node-app types and codec from the Apps package. Inner Breeze no longer keeps its own copies, its codec generator, or the unused protocol module. Test hosts include zir_string.h for the string helpers they call. --- Makefile | 12 +- apps/habits/habits.zi | 1 + apps/inbe/inbe.zi | 1 + apps/leaderboard/leaderboard.zi | 1 + apps/lists/lists.zi | 1 + apps/lumi/lumi.zi | 1 + apps/photos/photos.zi | 2 +- apps/photos/photos_view.zi | 2 +- apps/practice/practice.zi | 1 + apps/radio/radio.zi | 2 +- docs/cells.md | 2 +- mk/cells.mk | 13 +- mk/tests-cells.mk | 19 +- mk/tests-suite.mk | 2 +- mk/web.mk | 6 +- mk/windows.mk | 6 +- scripts/build-cells.sh | 20 +- scripts/build-node-apps.sh | 4 +- scripts/check-zi-sources.py | 24 +- scripts/generate-android-sources.py | 10 +- scripts/generate-node-app-codec.py | 32 - scripts/package-paths.sh | 11 + scripts/packages.sh | 2 + scripts/prepare-package-assets.py | 8 +- src/cells/apps_controller.zi | 2 +- src/cells/module_host.zi | 1 + src/cells/module_types.zi | 10 +- src/cells/node_app_codec.zi | 1130 --------------------- src/cells/node_app_tree.zi | 2 +- src/cells/node_app_types.zi | 155 --- src/cells/node_apps.zi | 6 +- src/cells/protocol.zi | 4 - src/screens/node_app_screen.zi | 4 +- tests/account_activity_zi_test.sh | 5 +- tests/achievements_zi_test.sh | 5 +- tests/android_geometry_probe_test.sh | 2 +- tests/android_health_zi_test.sh | 2 +- tests/android_import_zi_test.sh | 2 +- tests/android_lifecycle_link_test.c | 1 + tests/android_lifecycle_zi_test.sh | 4 +- tests/android_push_zi_test.sh | 2 +- tests/android_text_input_zi_test.sh | 4 +- tests/android_wakelock_zi_test.sh | 2 +- tests/app_chrome_link_test.c | 1 + tests/app_chrome_zi_test.sh | 10 +- tests/app_click_block_zi_test.sh | 3 +- tests/app_nav_state_link_test.c | 1 + tests/app_nav_state_zi_test.sh | 8 +- tests/archive_file_linux_zi_test.c | 1 + tests/audio_first_cue_host.c | 1 + tests/audio_first_cue_test.sh | 4 +- tests/audio_runtime_zi_test.sh | 4 +- tests/audio_settings_link_test.c | 1 + tests/audio_settings_zi_test.sh | 2 +- tests/cells_platform_test.sh | 2 + tests/cells_zi_test.sh | 9 +- tests/daochi_native_zi_test.c | 1 + tests/daochi_native_zi_test.py | 3 +- tests/delegate_account_zi_test.sh | 4 +- tests/device_key_zi_test.c | 1 + tests/device_key_zi_test.py | 2 +- tests/device_link_zi_test.py | 2 +- tests/device_policy_zi_test.sh | 8 +- tests/device_preferences_zi_test.sh | 2 +- tests/dew_test.sh | 3 +- tests/diary_spelling_test.sh | 3 +- tests/dpi_state_zi_test.sh | 4 +- tests/elist_screen_link_test.c | 1 + tests/elist_screen_zi_test.sh | 4 +- tests/fonts_zi_test.sh | 2 +- tests/frame_pacing_zi_test.sh | 4 +- tests/friend_requests_host_test.c | 1 + tests/graphics_transition_test.sh | 2 +- tests/habit_calendar_zi_test.sh | 6 +- tests/habit_days_memory_zi_test.sh | 2 +- tests/habit_form_zi_test.sh | 2 +- tests/habit_linked_rules_zi_test.sh | 4 +- tests/habit_model_zi_test.sh | 2 +- tests/habit_sessions_zi_test.sh | 2 +- tests/language_selection_link_test.c | 1 + tests/language_selection_zi_test.sh | 4 +- tests/legacy_session_zi_test.c | 1 + tests/lists_sharing_test.sh | 3 +- tests/locale_zi_test.sh | 8 +- tests/lumi_authorization_zi_test.sh | 3 +- tests/lumi_connection_test.sh | 4 +- tests/lumi_delegate_scope_zi_test.sh | 5 +- tests/lumi_engine_test.sh | 2 +- tests/lumi_feedback_delivery_test.sh | 6 +- tests/lumi_narration_link_test.c | 1 + tests/lumi_narration_test.sh | 2 +- tests/lumi_telegram_input_zi_test.sh | 4 +- tests/lumi_updates_test.sh | 6 +- tests/media_store_zi_test.sh | 2 +- tests/meditation_audio_archive_test.c | 1 + tests/metrics_zi_test.sh | 2 +- tests/music_library_link_test.c | 1 + tests/music_library_zi_test.sh | 6 +- tests/navigation_routes_zi_test.sh | 10 +- tests/package_manager_host.c | 1 + tests/package_release_test.py | 9 +- tests/patterns_session_zi_test.sh | 4 +- tests/photos_app_behavior.zi | 4 +- tests/photos_app_test.sh | 4 +- tests/practice_carousel_zi_test.sh | 2 +- tests/practice_narration_link_test.c | 1 + tests/practice_narration_test.sh | 2 +- tests/radio_app_test.sh | 2 +- tests/raylib_text_input_link_test.c | 1 + tests/raylib_text_input_zi_test.sh | 4 +- tests/route_catalog_zi_test.sh | 2 +- tests/screenshot_arguments_host_test.c | 1 + tests/session_results_zi_test.sh | 2 +- tests/settings_cache_host_test.c | 1 + tests/settings_key_host_test.c | 1 + tests/settings_mutation_zi_test.sh | 2 +- tests/settings_store_link_test.c | 1 + tests/settings_telegram_ui_test.c | 1 + tests/settings_telegram_ui_zi_test.sh | 5 +- tests/settings_ui_link_test.c | 1 + tests/settings_ui_zi_test.sh | 16 +- tests/statistics_date_zi_test.sh | 4 +- tests/storage_delegate_zi_test.sh | 3 +- tests/storage_habits_zi_test.sh | 2 +- tests/storage_import_zi_test.sh | 2 +- tests/storage_more_zi_test.sh | 2 +- tests/storage_paths_scenarios_zi_test.sh | 2 +- tests/storage_paths_zi_test.sh | 2 +- tests/storage_settings_threads_zi_test.sh | 2 +- tests/storage_sync_zi_test.sh | 2 +- tests/style_apply_link_test.c | 1 + tests/style_apply_zi_test.sh | 2 +- tests/sync_account_zi_test.sh | 2 +- tests/sync_recovery_zi_test.sh | 5 +- tests/sync_review_zi_test.sh | 2 +- tests/sync_safety_zi_test.sh | 2 +- tests/sync_server_zi_test.sh | 2 +- tests/sync_url_zi_test.sh | 2 +- tests/telegram_account_flow_zi_test.sh | 5 +- tests/telegram_account_ui_test.c | 1 + tests/telegram_account_ui_zi_test.sh | 4 +- tests/telegram_entry_protocol_zi_test.sh | 3 +- tests/text_buffers_link_test.c | 1 + tests/theme_catalog_zi_test.sh | 2 +- tests/update_flow_zi_test.py | 3 +- ziran.lock | 66 +- ziran.toml | 13 +- 147 files changed, 298 insertions(+), 1616 deletions(-) delete mode 100644 scripts/generate-node-app-codec.py create mode 100644 scripts/package-paths.sh delete mode 100644 src/cells/node_app_codec.zi delete mode 100644 src/cells/node_app_types.zi delete mode 100644 src/cells/protocol.zi diff --git a/Makefile b/Makefile index 79c3cfd68..913bdf968 100644 --- a/Makefile +++ b/Makefile @@ -402,10 +402,8 @@ include mk/tests-lumi.mk EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) assets/app/icon.png KRY_GEN_DIR := $(BUILD_DIR)/kryon/generated -# Packages without a public pin yet come only from an explicit local checkout, -# never from a guessed sibling path; scripts/check-zi-sources.py reads the same. -ZI_HANDOFF_PATHS := $(if $(APPS_SOURCE),--module-path apps=$(abspath $(APPS_SOURCE))/src) \ - $(if $(CRYPTO_SOURCE),--module-path crypto=$(abspath $(CRYPTO_SOURCE))/src) +# Dependencies are imported as PACKAGE/Module through their linked packages. +ZI_PACKAGE_PATHS := $(shell sh scripts/package-paths.sh) ZI_SRCS := $(shell find src -type f -name '*.zi' 2>/dev/null | LC_ALL=C sort) apps/practice/downloads_view.zi $(wildcard apps/practice/astral_projection*.zi) GAME2D_DIR := build/packages/game2d GAME2D_MODULES := $(wildcard $(GAME2D_DIR)/src/*/*.zi) @@ -690,13 +688,11 @@ $(KRY_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES) sh scripts/run-ziran.sh $(ZI2C_BIN) --no-main --prune-stale --root . \ $(foreach define,$(ZI_NATIVE_DEFINES),--define $(define)) \ --module-path src --module-path $(KRYON_DIR)/src/ui \ - --module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \ + --module-path $(KSS_DIR)/src \ --module-path $(KRYON_DIR)/src/backend \ --module-path $(GAME2D_DIR)/src \ - --module-path qrcode=build/packages/qrcode/src \ - --module-path plot=build/packages/plot/src \ --module-path $(ZIRAN_DIR)/std \ - --module-path build/packages/daochi-client --module-path self=build/packages/self/src $(ZI_HANDOFF_PATHS) \ + --module-path build/packages/daochi-client $(ZI_PACKAGE_PATHS) \ -o $(KRY_GEN_DIR) $(ZI_SRCS) touch $@ diff --git a/apps/habits/habits.zi b/apps/habits/habits.zi index 6055c9af1..288d57794 100644 --- a/apps/habits/habits.zi +++ b/apps/habits/habits.zi @@ -5,6 +5,7 @@ #import, file "../../src/habits/habit_types.zi"; #import, file "../../src/core/types.zi"; #import, file "../../src/cells/module_types.zi"; +#import "apps/node_types" host_api :: #system_library "host_api"; ReadHabitsHost :: () -> HabitsMessage #foreign host_api; WriteHabitsHost :: (message: HabitsMessage) #foreign host_api; diff --git a/apps/inbe/inbe.zi b/apps/inbe/inbe.zi index ef9974081..f2082c1a4 100644 --- a/apps/inbe/inbe.zi +++ b/apps/inbe/inbe.zi @@ -4,6 +4,7 @@ #import, file "../../src/cells/inbe_types.zi"; #import, file "inbe_view.zi"; #import, file "../../src/cells/module_types.zi"; +#import "apps/node_types" #import, file "../../src/core/types.zi"; host_api :: #system_library "host_api"; ReadInbeHost :: () -> InbeMessage #foreign host_api; diff --git a/apps/leaderboard/leaderboard.zi b/apps/leaderboard/leaderboard.zi index d893ed770..40a1110c9 100644 --- a/apps/leaderboard/leaderboard.zi +++ b/apps/leaderboard/leaderboard.zi @@ -2,6 +2,7 @@ // host fetches friend results, keeps them for offline use and ranks rows. #import, file "../../src/cells/leaderboard_types.zi"; #import, file "../../src/cells/module_types.zi"; +#import "apps/node_types" #import, file "../../src/core/types.zi"; #import, file "leaderboard_view.zi"; host_api :: #system_library "host_api"; diff --git a/apps/lists/lists.zi b/apps/lists/lists.zi index 9d11ecb76..a48fcd323 100644 --- a/apps/lists/lists.zi +++ b/apps/lists/lists.zi @@ -3,6 +3,7 @@ #import, file "../../src/cells/lists_types.zi"; #import, file "../../src/core/types.zi"; #import, file "../../src/cells/module_types.zi"; +#import "apps/node_types" #import, file "lists_view.zi"; host_api :: #system_library "host_api"; ReadListsHost :: () -> ListsMessage #foreign host_api; diff --git a/apps/lumi/lumi.zi b/apps/lumi/lumi.zi index e7b6209b5..9e2699fa5 100644 --- a/apps/lumi/lumi.zi +++ b/apps/lumi/lumi.zi @@ -3,6 +3,7 @@ #import "vec" #import, file "../../src/cells/lumi_types.zi"; #import, file "../../src/cells/module_types.zi"; +#import "apps/node_types" #import, file "../../src/cells/lumi_ui_types.zi"; #import, file "../../src/core/types.zi"; #import, file "engine.zi"; diff --git a/apps/photos/photos.zi b/apps/photos/photos.zi index 79c788f9a..128a3f149 100644 --- a/apps/photos/photos.zi +++ b/apps/photos/photos.zi @@ -3,7 +3,7 @@ // offers; the host runs it through the generic app interface and grants it // the account's media library. #import, file "../../src/cells/module_types.zi"; -#import, file "../../src/cells/node_app_types.zi"; +#import "apps/node_types" #import, file "photos_view.zi"; host_api :: #system_library "host_api"; ReadAppHost :: () -> AppMessage #foreign host_api; diff --git a/apps/photos/photos_view.zi b/apps/photos/photos_view.zi index bbf9c7012..e19402be1 100644 --- a/apps/photos/photos_view.zi +++ b/apps/photos/photos_view.zi @@ -23,7 +23,7 @@ #import "scroll_widget" #import "semantic" #import "tree" -#import, file "../../src/cells/node_app_types.zi"; +#import "apps/node_types" host_api :: #system_library "host_api"; ReadAppUiHost :: () -> AppUiFrame #foreign host_api; AppLocaleHost :: (key: string) -> string #foreign host_api; diff --git a/apps/practice/practice.zi b/apps/practice/practice.zi index 3d12df697..33dce2c2d 100644 --- a/apps/practice/practice.zi +++ b/apps/practice/practice.zi @@ -5,6 +5,7 @@ #import, file "../../src/practices/meditation/meditation_timing.zi"; #import, file "../../src/practices/patterns/patterns_clock.zi"; #import, file "../../src/cells/module_types.zi"; +#import "apps/node_types" #import, file "../../src/core/types.zi"; #import, file "../../src/practices/sun_salutation/sun_salutation_rules.zi"; host_api :: #system_library "host_api"; diff --git a/apps/radio/radio.zi b/apps/radio/radio.zi index 1d0ad7ed0..f39a183b2 100644 --- a/apps/radio/radio.zi +++ b/apps/radio/radio.zi @@ -12,7 +12,7 @@ #import "scroll_props" #import "scroll_widget" #import "tree" -#import, file "../../src/cells/node_app_types.zi"; +#import "apps/node_types" #import, file "../../src/cells/module_types.zi"; #import, file "stations.zi"; diff --git a/docs/cells.md b/docs/cells.md index 6ce2c7574..780667011 100644 --- a/docs/cells.md +++ b/docs/cells.md @@ -429,7 +429,7 @@ after the bundled seven, setting `node_app_slot_`) and downloads it through the package manager with the same signature, hash, size, interface, trial and cache rules as the bundled apps. Such an app is never part of the root package or its dependencies. It runs in its own VM through one generic -interface (`src/cells/node_app_types.zi`, host interface 12, and 13 for the +interface (`apps/node_types` from the Apps package, host interface 12, and 13 for the media library, which Diary also reads from 14): frame and route messages, hosted Kryon widgets, `AppLocaleHost`, private records, friends and records shared with friends. It may draw only its own diff --git a/mk/cells.mk b/mk/cells.mk index 13fc12415..e2e2172c5 100644 --- a/mk/cells.mk +++ b/mk/cells.mk @@ -6,19 +6,22 @@ APP_CODEC_SCHEMAS := $(KRYON_DIR)/scripts/generate-widget-codecs.py $(KRYON_DIR) src/cells/app_codec.zi: scripts/generate-app-codec.py $(APP_CODEC_SCHEMAS) python3 scripts/generate-app-codec.py -src/cells/node_app_codec.zi: scripts/generate-node-app-codec.py src/cells/node_app_types.zi $(KRYON_DIR)/scripts/generate-widget-codecs.py $(KRYON_DIR)/src/backend/widget_codec.zi - python3 scripts/generate-node-app-codec.py - SELF_DIR := build/packages/self SELF_SOURCES = $(wildcard $(SELF_DIR)/src/*.zi $(SELF_DIR)/assets/self/*) -APPS_BUNDLE ?= $(if $(APPS_SOURCE),$(APPS_SOURCE)/build/ui/apps.zib,) +# The shared Apps controller is built from the locked Apps package with its +# own pinned graph, so its digest identifies the reviewed Apps release. +APPS_DIR := build/packages/apps +APPS_BUNDLE := build/apps-ui/apps.zib +$(BUILD_DIR)/apps-ui/apps.zib: ziran.lock $(wildcard $(APPS_DIR)/ziran.lock $(APPS_DIR)/src/*.zi $(APPS_DIR)/ui/*.zi $(APPS_DIR)/ui/locales/*.json) + env -u DISPLAY -u WAYLAND_DISPLAY PATH="$(abspath $(dir $(ZIRAN_BIN))):$$PATH" \ + python3 $(APPS_DIR)/scripts/build-ui.py --output $(abspath $(dir $@)) .PHONY: cells cells: $(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) $(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE): CHANGELOG.md scripts/release_notes.py $(APPS_BUNDLE) src/cells/apps_controller.zi $(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) &: $(SELF_SOURCES) $(CELL_SOURCES) $(CELL_RESOURCES) ziran.lock apps/versions.json scripts/check-package-versions.py scripts/generate-package-versions.py scripts/prepare-package-assets.py scripts/animation_inventory.py scripts/build-cells.sh src/practices/sun_salutation/sun_salutation_assets.zi src/practices/sun_salutation/sun_salutation_inventory.zi $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES) $(STYLE_FILES) $(LOCALE_FILES) $(ZIRAN_BIN) - APPS_BUNDLE='$(APPS_BUNDLE)' sh scripts/build-cells.sh $(ZIRAN_BIN) + sh scripts/build-cells.sh $(ZIRAN_BIN) # Apps the node offers build on their own, never into the root package. NODE_APP_NAMES := $(shell python3 -c 'import json; print(" ".join(json.load(open("apps/versions.json")).get("node_apps", {})))') diff --git a/mk/tests-cells.mk b/mk/tests-cells.mk index f5759521a..2c6b8eef7 100644 --- a/mk/tests-cells.mk +++ b/mk/tests-cells.mk @@ -25,21 +25,19 @@ portable-apps-ui-test: $(TARGET) cells --player "$(APP_PLAYER)" --werk "$(WERK_BINARY)" \ --diary $(abspath build/cells/diary.zib) --calculator "$(CALCULATOR_BUNDLE)" -.PHONY: node-app-records-test node-app-codec-check +.PHONY: node-app-records-test -# Explicit local Apps handoff checks while Apps has no public dependency pin. -# Callers provide the same retained compiler/runtime/map used by their gate. +# Apps location and node snapshot checks against the locked Apps and Crypto packages. .PHONY: app-locations-test node-app-snapshot-test -app-locations-test: - @test -n "$(APPS_SOURCE)" -a -n "$(APPS_TEST_TOOLCHAIN)" || { echo 'Set APPS_SOURCE and APPS_TEST_TOOLCHAIN'; exit 2; } - python3 tests/app_locations_test.py --ziran '$(APPS_TEST_TOOLCHAIN)/build/bin/ziran' \ - --toolchain '$(APPS_TEST_TOOLCHAIN)' --apps '$(APPS_SOURCE)' \ +app-locations-test: $(ZIRAN_BIN) + python3 tests/app_locations_test.py --ziran '$(abspath $(ZIRAN_BIN))' \ + --toolchain '$(abspath $(ZIRAN_DIR))' --apps '$(abspath build/packages/apps)' \ --daochi-client '$(abspath build/packages/daochi-client)' node-app-snapshot-test: - @test -n "$(APPS_TEST_MAP)" -a -n "$(APPS_TEST_TOOLCHAIN)" -a -n "$(APPS_TEST_RUNTIME)" -a -n "$(CRYPTO_SOURCE)" || { echo 'Set APPS_TEST_MAP, APPS_TEST_TOOLCHAIN, APPS_TEST_RUNTIME and CRYPTO_SOURCE'; exit 2; } + @test -n "$(APPS_TEST_MAP)" -a -n "$(APPS_TEST_TOOLCHAIN)" -a -n "$(APPS_TEST_RUNTIME)" || { echo 'Set APPS_TEST_MAP, APPS_TEST_TOOLCHAIN and APPS_TEST_RUNTIME'; exit 2; } python3 tests/node_app_snapshot_test.py --module-map '$(APPS_TEST_MAP)' \ - --toolchain '$(APPS_TEST_TOOLCHAIN)' --runtime '$(APPS_TEST_RUNTIME)' --crypto-source '$(CRYPTO_SOURCE)' + --toolchain '$(APPS_TEST_TOOLCHAIN)' --runtime '$(APPS_TEST_RUNTIME)' --crypto-source '$(abspath build/packages/crypto)' .PHONY: photos-app-test media-store-test media-metadata-test # Photos and the account's media library it shows. media-metadata-test: $(ZI2C_BIN) @@ -54,9 +52,6 @@ photos-app-test: $(ZIRAN_BIN) $(SQLITE_SRC) $(LIBOQS_A) node-app-records-test: $(ZI2C_BIN) sh tests/node_app_records_zi_test.sh $(ZIRAN_BUILD_DIR)/bin -node-app-codec-check: - python3 scripts/generate-node-app-codec.py --check - .PHONY: package-release-test package-release-test: cells $(ZIRAN_BUILD_DIR)/libziran.a python3 tests/package_release_test.py diff --git a/mk/tests-suite.mk b/mk/tests-suite.mk index 4591229c3..c191713b9 100644 --- a/mk/tests-suite.mk +++ b/mk/tests-suite.mk @@ -123,7 +123,7 @@ test: android-smoke-script-test test: sync-recovery-test test: sync-record-fields-test test: media-metadata-test media-store-test photos-app-test -test: node-app-records-test node-app-codec-check +test: node-app-records-test test: app-click-block-zi-test test: phone-check-gate-test test: release-tooling-test diff --git a/mk/web.mk b/mk/web.mk index 34cd8ea7a..68da29fca 100644 --- a/mk/web.mk +++ b/mk/web.mk @@ -6,13 +6,11 @@ $(WEB_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES) sh scripts/run-ziran.sh $(ZI2C_BIN) --no-main --root . \ --define PLATFORM_WEB --define __EMSCRIPTEN__ \ --module-path src --module-path $(KRYON_DIR)/src/ui \ - --module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \ + --module-path $(KSS_DIR)/src \ --module-path $(KRYON_DIR)/src/backend \ --module-path $(GAME2D_DIR)/src \ - --module-path qrcode=build/packages/qrcode/src \ - --module-path plot=build/packages/plot/src \ --module-path $(ZIRAN_DIR)/std \ - --module-path build/packages/daochi-client --module-path self=build/packages/self/src $(ZI_HANDOFF_PATHS) \ + --module-path build/packages/daochi-client $(ZI_PACKAGE_PATHS) \ -o $(WEB_GEN_DIR) $(ZI_SRCS) $(KRYON_DIR)/src/backend/canvas_raster.zi $(KRYON_DIR)/src/backend/canvas_audio.zi $(KRYON_DIR)/src/backend/page_route.zi touch $@ find $(WEB_GEN_DIR) -type f \( -name '*.c' -o -name '*.h' \) -exec touch -r $@ {} + diff --git a/mk/windows.mk b/mk/windows.mk index eff129992..0534ecceb 100644 --- a/mk/windows.mk +++ b/mk/windows.mk @@ -27,13 +27,11 @@ $(WINDOWS_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODU --define PLATFORM_DESKTOP --define _WIN32 \ --define DESKTOP_TRAY_ENABLED \ --module-path src --module-path $(KRYON_DIR)/src/ui \ - --module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \ + --module-path $(KSS_DIR)/src \ --module-path $(KRYON_DIR)/src/backend \ --module-path $(GAME2D_DIR)/src \ - --module-path qrcode=build/packages/qrcode/src \ - --module-path plot=build/packages/plot/src \ --module-path $(ZIRAN_DIR)/std \ - --module-path build/packages/daochi-client --module-path self=build/packages/self/src $(ZI_HANDOFF_PATHS) \ + --module-path build/packages/daochi-client $(ZI_PACKAGE_PATHS) \ -o $(WINDOWS_GEN_DIR) $(ZI_SRCS) touch $@ find $(WINDOWS_GEN_DIR) -type f \( -name '*.c' -o -name '*.h' \) -exec touch -r $@ {} + diff --git a/scripts/build-cells.sh b/scripts/build-cells.sh index c339168d6..fac7d5761 100755 --- a/scripts/build-cells.sh +++ b/scripts/build-cells.sh @@ -9,6 +9,7 @@ mkdir -p build exec 9>build/cells-build.lock flock 9 ziran=${1:-build/ziran-toolchain/bin/ziran} +packages=$(sh scripts/package-paths.sh) output=${2:-build/cells} python3 scripts/check-package-versions.py python3 tests/font_glyph_coverage_test.py @@ -19,7 +20,7 @@ python3 scripts/generate-package-versions.py python3 scripts/animation_inventory.py --check python3 scripts/prepare-package-assets.py if [ ! -s build/package-assets/inbe/assets/apps/apps.zib ]; then - echo 'Root Apps requires the reviewed APPS_BUNDLE or explicit APPS_SOURCE handoff' >&2 + echo 'Root Apps requires the reviewed Apps controller bundle; run make cells' >&2 exit 1 fi python3 scripts/release_notes.py CHANGELOG.md build/package-assets/inbe/assets/app/release-notes.json @@ -39,10 +40,9 @@ for feature in lists habits practices diary lumi leaderboard; do if [ "$feature" = practices ]; then source=practice; entry=practice; fi locale_args= if [ "$feature" = diary ]; then locale_args="--asset-dir locales=build/package-assets/diary/locales"; fi - "$ziran" bundle --root . --module-path src $locale_args \ - --module-path kryon=build/packages/kryon/src/backend \ + # shellcheck disable=SC2086 + "$ziran" bundle --root . --module-path src $locale_args $packages \ --module-path build/packages/kryon/src/ui \ - --module-path mingcute=build/packages/mingcute/src \ --define KRYON_HOSTED_UI \ --module-path build/packages/ziran/std \ --asset-dir "assets=build/package-assets/$feature/assets" \ @@ -54,9 +54,9 @@ rm -f build/bundled-cells/practice.zib for feature in lists habits practices diary lumi leaderboard; do cp "$output/$feature.zib" build/bundled-cells/ done -"$ziran" bundle --root . --module-path src \ - --module-path build/packages/ziran/std --module-path kryon=build/packages/kryon/src/backend \ - --module-path build/packages/kryon/src/ui \ +# shellcheck disable=SC2086 +"$ziran" bundle --root . --module-path src $packages \ + --module-path build/packages/ziran/std --module-path build/packages/kryon/src/ui \ --define KRYON_HOSTED_UI --entry inbe:Main \ --asset-dir "assets=build/package-assets/inbe/assets" \ --asset-dir "styles=build/package-assets/inbe/styles" \ @@ -65,9 +65,9 @@ done --asset-dir "icons=build/package-assets/inbe/icons" \ --asset-dir "assets/self=$self_dir/assets/self" --asset-dir "assets/self/bundles=build/self" \ --asset-dir "cells=build/bundled-cells" -o build/inbe.zib apps/inbe/inbe.zi -"$ziran" bundle --root . --module-path src \ - --module-path build/packages/ziran/std --module-path kryon=build/packages/kryon/src/backend \ - --module-path build/packages/kryon/src/ui \ +# shellcheck disable=SC2086 +"$ziran" bundle --root . --module-path src $packages \ + --module-path build/packages/ziran/std --module-path build/packages/kryon/src/ui \ --define KRYON_HOSTED_UI --entry inbe:Main \ --asset-dir "assets=build/package-assets/inbe/assets" \ --asset-dir "styles=build/package-assets/inbe/styles" \ diff --git a/scripts/build-node-apps.sh b/scripts/build-node-apps.sh index e33527ae4..201faf38a 100644 --- a/scripts/build-node-apps.sh +++ b/scripts/build-node-apps.sh @@ -10,12 +10,14 @@ output=${2:-build/node-apps} mkdir -p build "$output" exec 9>build/cells-build.lock flock 9 +packages=$(sh scripts/package-paths.sh) python3 scripts/check-package-versions.py python3 scripts/prepare-package-assets.py for name in $(python3 -c 'import json; print(" ".join(sorted(json.load(open("apps/versions.json")).get("node_apps", {}))))'); do assets=build/package-assets/$name/assets mkdir -p "$assets" - "$ziran" bundle --root . --module-path src \ + # shellcheck disable=SC2086 + "$ziran" bundle --root . --module-path src $packages \ --module-path build/packages/kryon/src/ui \ --define KRYON_HOSTED_UI \ --module-path build/packages/ziran/std \ diff --git a/scripts/check-zi-sources.py b/scripts/check-zi-sources.py index 83de6e290..f7b6048d8 100644 --- a/scripts/check-zi-sources.py +++ b/scripts/check-zi-sources.py @@ -30,13 +30,8 @@ if not sources: target_defines = os.environ.get("ZI_CHECK_DEFINES", "PLATFORM_DESKTOP").split() define_args = [part for name in target_defines for part in ("--define", name)] -handoff_args = [] -for package, variable in (("apps", "APPS_SOURCE"), ("crypto", "CRYPTO_SOURCE")): - if os.environ.get(variable): - source = Path(os.environ[variable]).resolve() - if not (source / "ziran.toml").is_file(): - sys.exit(f"{variable} must name the package's canonical source checkout") - handoff_args.extend(("--module-path", f"{package}={source / 'src'}")) +package_args = subprocess.check_output( + ["sh", str(root / "scripts/package-paths.sh"), str(root / "build/packages")], text=True).split() (root / "build").mkdir(exist_ok=True) compiler_lock = (root / "build/ziran-compiler.lock").open("a") fcntl.flock(compiler_lock, fcntl.LOCK_EX) @@ -49,32 +44,19 @@ result = subprocess.run( "--module-path", "src", "--module-path", - f"self={root / 'build/packages/self/src'}", - "--module-path", str(ui), "--module-path", str(kss), "--module-path", - f"oqs={root / 'build/packages/oqs/src'}", - # KSS imports Kryon as kryon/NAME. - "--module-path", - f"kryon={ui}", - "--module-path", str(ui.parent / "backend"), "--module-path", - f"kryon={ui.parent / 'backend'}", - "--module-path", str(game2d), "--module-path", - f"qrcode={root / 'build/packages/qrcode/src'}", - "--module-path", - f"plot={root / 'build/packages/plot/src'}", - "--module-path", str(standard), "--module-path", str(client), *define_args, - *handoff_args, + *package_args, *(str(source.relative_to(root)) for source in sources), ], cwd=root, diff --git a/scripts/generate-android-sources.py b/scripts/generate-android-sources.py index 08e0b449b..4c4c03eb5 100644 --- a/scripts/generate-android-sources.py +++ b/scripts/generate-android-sources.py @@ -31,13 +31,9 @@ for directory in ( root / "build/packages/game2d/src", root / "build/packages/ziran/std", root / "build/packages/daochi-client", ): command.extend(["--module-path", str(directory)]) -# KSS imports Kryon as kryon/NAME, and account code imports oqs/Oqs. -command.extend(["--module-path", f"kryon={kryon / 'src/ui'}"]) -command.extend(["--module-path", f"kryon={kryon / 'src/backend'}"]) -command.extend(["--module-path", f"qrcode={root / 'build/packages/qrcode/src'}"]) -command.extend(["--module-path", f"plot={root / 'build/packages/plot/src'}"]) -command.extend(["--module-path", f"oqs={root / 'build/packages/oqs/src'}"]) -command.extend(["--module-path", f"self={root / 'build/packages/self/src'}"]) +# Dependencies are imported as PACKAGE/Module through their linked packages. +command.extend(subprocess.check_output( + ["sh", str(root / "scripts/package-paths.sh"), str(root / "build/packages")], text=True).split()) command.extend(["-o", str(args.output)]) command.extend(str(path.relative_to(root)) for path in sources) completed = subprocess.run(command, cwd=root) diff --git a/scripts/generate-node-app-codec.py b/scripts/generate-node-app-codec.py deleted file mode 100644 index f4e86c4f4..000000000 --- a/scripts/generate-node-app-codec.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python3 -"""Generate src/cells/node_app_codec.zi with Kryon's widget codec generator. - -These are the records every app the node offers exchanges with the host -through the generic app interface (src/cells/node_app_types.zi). -Pass --check to verify the file is current.""" -from pathlib import Path -import subprocess -import sys - -ROOT = Path(__file__).resolve().parent.parent -KRYON = ROOT / 'build/packages/kryon' -KRYON_MODULES = ['session'] -APP_TYPES = ['node_app_types'] -ROOTS = ['AppMessage', 'AppUiFrame', 'AppPerson', 'AppShared', 'AppSharedItem', - 'AppInvitation', 'AppSharedCommand', 'MediaEntry', 'MediaStatus'] - -command = [sys.executable, str(KRYON / 'scripts/generate-widget-codecs.py'), - '--output', str(ROOT / 'src/cells/node_app_codec.zi'), - '--uses', str(KRYON / 'src/backend/widget_codec.zi'), - '--generated-by', 'scripts/generate-node-app-codec.py'] -for module in KRYON_MODULES: - command += ['--source', str(KRYON / 'src/ui' / (module + '.zi'))] -for name in APP_TYPES: - command += ['--source', str(ROOT / 'src/cells' / (name + '.zi'))] -for root in ROOTS: - command += ['--root', root] -for line in ['"std/bundle_host"', '"std/byte_text_linux"', '"hosted_values"', '"widget_codec"', - *(f', file "{name}.zi";' for name in APP_TYPES), *(f'"{module}"' for module in KRYON_MODULES)]: - command += ['--import', line] -command += sys.argv[1:] -sys.exit(subprocess.run(command).returncode) diff --git a/scripts/package-paths.sh b/scripts/package-paths.sh new file mode 100644 index 000000000..2082e0ed4 --- /dev/null +++ b/scripts/package-paths.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Prints --module-path NAME=DIR for every linked dependency, so Inbe's builds +# import a package's modules as NAME/Module. scripts/packages.sh links each +# package under build/packages. +set -eu +packages=${1:-build/packages} +for path in kryon=kryon/src/ui kryon=kryon/src/backend apps=apps/src \ + crypto=crypto/src self=self/src plot=plot/src qrcode=qrcode/src \ + oqs=oqs/src mingcute=mingcute/src daochi_client=daochi-client; do + printf '%s\n' --module-path "${path%%=*}=$packages/${path#*=}" +done diff --git a/scripts/packages.sh b/scripts/packages.sh index 133b4a1e2..61480be0a 100644 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -90,6 +90,8 @@ link qrcode qrcode link plot plot link mingcute mingcute link self self +link apps apps +link crypto crypto link daochi-client daochi_client link sqlite sqlite link curl curl diff --git a/scripts/prepare-package-assets.py b/scripts/prepare-package-assets.py index bbfdef60e..31af759f9 100644 --- a/scripts/prepare-package-assets.py +++ b/scripts/prepare-package-assets.py @@ -88,11 +88,9 @@ for file in sorted({p for pattern in patterns for p in ROOT.glob(pattern) if p.i # Root launcher cards share the reviewed Apps controller. A node-only build # can omit it; the root bundle build below requires this asset explicitly. -apps_bundle = os.environ.get('APPS_BUNDLE') -if not apps_bundle and os.environ.get('APPS_SOURCE'): - apps_bundle = str(Path(os.environ['APPS_SOURCE']) / 'build/ui/apps.zib') -if apps_bundle: - controller = Path(apps_bundle).read_bytes() +apps_bundle = ROOT / 'build/apps-ui/apps.zib' +if apps_bundle.is_file(): + controller = apps_bundle.read_bytes() source = (ROOT / 'src/cells/apps_controller.zi').read_text() expected = re.search(r'AppsControllerSha256\s*::\s*"([0-9a-f]{64})"', source) if not expected or hashlib.sha256(controller).hexdigest() != expected[1]: diff --git a/src/cells/apps_controller.zi b/src/cells/apps_controller.zi index a8fe79a92..c21aa3215 100644 --- a/src/cells/apps_controller.zi +++ b/src/cells/apps_controller.zi @@ -1,3 +1,3 @@ // Trusted shared Apps UI reviewed for this host. Containers may carry these // bytes, but cannot select or replace the host's controller trust anchor. -AppsControllerSha256 :: "c7823dd3b72e12dc7bd9e533e5cfee83c555303d3b0e669daa8ad4c556447dc3" +AppsControllerSha256 :: "996527bfe8cfe7c3647434e638814de1c1c3a9d5fa884c4fb1c6d91e4981dc21" diff --git a/src/cells/module_host.zi b/src/cells/module_host.zi index 1612131b1..1f66ff2b3 100644 --- a/src/cells/module_host.zi +++ b/src/cells/module_host.zi @@ -4,6 +4,7 @@ #import "byte_text_linux" #import "c_string" #import, file "module_types.zi"; +#import "apps/node_types" #import, file "lists_types.zi"; #import, file "habits_types.zi"; #import, file "practice_types.zi"; diff --git a/src/cells/module_types.zi b/src/cells/module_types.zi index fdf25e3f6..a1d6fe97b 100644 --- a/src/cells/module_types.zi +++ b/src/cells/module_types.zi @@ -1,5 +1,5 @@ -// The unified host supplies values, never application or database pointers. -MODULE_ABI :: 2 +// Inner Breeze's bundled feature modules. The module ABI they speak and its +// identify action come from the Apps package's node types. MODULE_LISTS :: 1 MODULE_HABITS :: 2 MODULE_PRACTICE :: 3 @@ -7,9 +7,3 @@ MODULE_INBE :: 4 MODULE_DIARY :: 5 MODULE_LUMI :: 6 MODULE_LEADERBOARD :: 7 -MODULE_IDENTIFY :: 0 - -ModuleIdentity :: struct { - abi: s32 - kind: s32 -} diff --git a/src/cells/node_app_codec.zi b/src/cells/node_app_codec.zi deleted file mode 100644 index a40409a8b..000000000 --- a/src/cells/node_app_codec.zi +++ /dev/null @@ -1,1130 +0,0 @@ -// Generated by scripts/generate-node-app-codec.py; bounded public widget values. -#import "std/bundle_host" -#import "std/byte_text_linux" -#import "hosted_values" -#import "widget_codec" -#import, file "node_app_types.zi"; -#import "session" -using HostValueKind; - -WidgetAppMessageCodec :: struct { - fields: [14]HostField -} - -WidgetEncodeAppMessage :: (data: AppMessage, codec: *WidgetAppMessageCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppMessage") - value.fields = *codec.fields[0] - value.field_count = 14 - codec.fields[0].name = HostTextData("abi") - codec.fields[0].value = HostScalar("s32", cast(s64)data.abi) - codec.fields[1].name = HostTextData("action") - codec.fields[1].value = HostScalar("s32", cast(s64)data.action) - codec.fields[2].name = HostTextData("screen") - codec.fields[2].value = HostScalar("s32", cast(s64)data.screen) - codec.fields[3].name = HostTextData("name") - codec.fields[3].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.name), .length = cast(usize)data.name.count} - codec.fields[4].name = HostTextData("locale") - codec.fields[4].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.locale), .length = cast(usize)data.locale.count} - codec.fields[5].name = HostTextData("account") - codec.fields[5].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.account), .length = cast(usize)data.account.count} - codec.fields[6].name = HostTextData("signed_in") - codec.fields[6].value = HostScalar("bool", ifx data.signed_in then 1 else 0) - codec.fields[7].name = HostTextData("friend_count") - codec.fields[7].value = HostScalar("s32", cast(s64)data.friend_count) - codec.fields[8].name = HostTextData("shared_count") - codec.fields[8].value = HostScalar("s32", cast(s64)data.shared_count) - codec.fields[9].name = HostTextData("invitation_count") - codec.fields[9].value = HostScalar("s32", cast(s64)data.invitation_count) - codec.fields[10].name = HostTextData("shared_revision") - codec.fields[10].value = HostScalar("s32", cast(s64)data.shared_revision) - codec.fields[11].name = HostTextData("shared_status") - codec.fields[11].value = HostScalar("s32", cast(s64)data.shared_status) - codec.fields[12].name = HostTextData("time") - codec.fields[12].value = HostScalar("s64", cast(s64)data.time) - codec.fields[13].name = HostTextData("succeeded") - codec.fields[13].value = HostScalar("bool", ifx data.succeeded then 1 else 0) - return value -} - -WidgetDecodeAppMessage :: (value: HostValue, codec: *WidgetAppMessageCodec) -> AppMessage { - data: AppMessage - { - field_at := HostFieldAt(value, 0, "abi") - if field_at >= 0 { - data.abi = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 1, "action") - if field_at >= 0 { - data.action = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 2, "screen") - if field_at >= 0 { - data.screen = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 3, "name") - if field_at >= 0 { - data.name = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 4, "locale") - if field_at >= 0 { - data.locale = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 5, "account") - if field_at >= 0 { - data.account = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 6, "signed_in") - if field_at >= 0 { - data.signed_in = value.fields[field_at].value.integer != 0 - } - } - { - field_at := HostFieldAt(value, 7, "friend_count") - if field_at >= 0 { - data.friend_count = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 8, "shared_count") - if field_at >= 0 { - data.shared_count = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 9, "invitation_count") - if field_at >= 0 { - data.invitation_count = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 10, "shared_revision") - if field_at >= 0 { - data.shared_revision = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 11, "shared_status") - if field_at >= 0 { - data.shared_status = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 12, "time") - if field_at >= 0 { - data.time = cast(s64)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 13, "succeeded") - if field_at >= 0 { - data.succeeded = value.fields[field_at].value.integer != 0 - } - } - return data -} - -WidgetValidAppMessage :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppMessage" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "abi") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "action") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "screen") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "name") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "locale") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "account") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 6, "signed_in") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 7, "friend_count") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 8, "shared_count") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 9, "invitation_count") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 10, "shared_revision") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 11, "shared_status") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 12, "time") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s64", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 13, "succeeded") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - return true -} - -WidgetAppUiFrameCodec :: struct { - fields: [9]HostField - session: WidgetSessionCodec -} - -WidgetEncodeAppUiFrame :: (data: AppUiFrame, codec: *WidgetAppUiFrameCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppUiFrame") - value.fields = *codec.fields[0] - value.field_count = 9 - codec.fields[0].name = HostTextData("session") - codec.fields[0].value = WidgetEncodeSession(data.session, *codec.session) - codec.fields[1].name = HostTextData("width") - codec.fields[1].value = HostScalar("s32", cast(s64)data.width) - codec.fields[2].name = HostTextData("height") - codec.fields[2].value = HostScalar("s32", cast(s64)data.height) - codec.fields[3].name = HostTextData("bottom") - codec.fields[3].value = HostScalar("s32", cast(s64)data.bottom) - codec.fields[4].name = HostTextData("top") - codec.fields[4].value = HostScalar("s32", cast(s64)data.top) - codec.fields[5].name = HostTextData("scale") - codec.fields[5].value = HostValue.{.kind = cast(s32)HostReal, .type_name = HostTextData("float32"), .real = cast(float64)data.scale} - codec.fields[6].name = HostTextData("font") - codec.fields[6].value = HostScalar("s32", cast(s64)data.font) - codec.fields[7].name = HostTextData("now") - codec.fields[7].value = HostValue.{.kind = cast(s32)HostReal, .type_name = HostTextData("float64"), .real = cast(float64)data.now} - codec.fields[8].name = HostTextData("dark") - codec.fields[8].value = HostScalar("bool", ifx data.dark then 1 else 0) - return value -} - -WidgetDecodeAppUiFrame :: (value: HostValue, codec: *WidgetAppUiFrameCodec) -> AppUiFrame { - data: AppUiFrame - { - field_at := HostFieldAt(value, 0, "session") - if field_at >= 0 { - data.session = WidgetDecodeSession(value.fields[field_at].value, *codec.session) - } - } - { - field_at := HostFieldAt(value, 1, "width") - if field_at >= 0 { - data.width = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 2, "height") - if field_at >= 0 { - data.height = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 3, "bottom") - if field_at >= 0 { - data.bottom = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 4, "top") - if field_at >= 0 { - data.top = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 5, "scale") - if field_at >= 0 { - data.scale = cast(float32)value.fields[field_at].value.real - } - } - { - field_at := HostFieldAt(value, 6, "font") - if field_at >= 0 { - data.font = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 7, "now") - if field_at >= 0 { - data.now = cast(float64)value.fields[field_at].value.real - } - } - { - field_at := HostFieldAt(value, 8, "dark") - if field_at >= 0 { - data.dark = value.fields[field_at].value.integer != 0 - } - } - return data -} - -WidgetValidAppUiFrame :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppUiFrame" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "session") - if field_at >= 0 { - if !WidgetValidSession(value.fields[field_at].value) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "width") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "height") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "bottom") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "top") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "scale") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "float32", cast(s32)HostReal) { return false } - } - } - { - field_at := HostFieldAt(value, 6, "font") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 7, "now") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "float64", cast(s32)HostReal) { return false } - } - } - { - field_at := HostFieldAt(value, 8, "dark") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - return true -} - -WidgetAppPersonCodec :: struct { - fields: [2]HostField -} - -WidgetEncodeAppPerson :: (data: AppPerson, codec: *WidgetAppPersonCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppPerson") - value.fields = *codec.fields[0] - value.field_count = 2 - codec.fields[0].name = HostTextData("id") - codec.fields[0].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.id), .length = cast(usize)data.id.count} - codec.fields[1].name = HostTextData("name") - codec.fields[1].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.name), .length = cast(usize)data.name.count} - return value -} - -WidgetDecodeAppPerson :: (value: HostValue, codec: *WidgetAppPersonCodec) -> AppPerson { - data: AppPerson - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - data.id = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 1, "name") - if field_at >= 0 { - data.name = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - return data -} - -WidgetValidAppPerson :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppPerson" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "name") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - return true -} - -WidgetAppSharedCodec :: struct { - fields: [6]HostField -} - -WidgetEncodeAppShared :: (data: AppShared, codec: *WidgetAppSharedCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppShared") - value.fields = *codec.fields[0] - value.field_count = 6 - codec.fields[0].name = HostTextData("id") - codec.fields[0].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.id), .length = cast(usize)data.id.count} - codec.fields[1].name = HostTextData("owner") - codec.fields[1].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.owner), .length = cast(usize)data.owner.count} - codec.fields[2].name = HostTextData("owner_name") - codec.fields[2].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.owner_name), .length = cast(usize)data.owner_name.count} - codec.fields[3].name = HostTextData("title") - codec.fields[3].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.title), .length = cast(usize)data.title.count} - codec.fields[4].name = HostTextData("revision") - codec.fields[4].value = HostScalar("s32", cast(s64)data.revision) - codec.fields[5].name = HostTextData("item_count") - codec.fields[5].value = HostScalar("s32", cast(s64)data.item_count) - return value -} - -WidgetDecodeAppShared :: (value: HostValue, codec: *WidgetAppSharedCodec) -> AppShared { - data: AppShared - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - data.id = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 1, "owner") - if field_at >= 0 { - data.owner = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 2, "owner_name") - if field_at >= 0 { - data.owner_name = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 3, "title") - if field_at >= 0 { - data.title = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 4, "revision") - if field_at >= 0 { - data.revision = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 5, "item_count") - if field_at >= 0 { - data.item_count = cast(s32)value.fields[field_at].value.integer - } - } - return data -} - -WidgetValidAppShared :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppShared" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "owner") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "owner_name") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "title") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "revision") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "item_count") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - return true -} - -WidgetAppSharedItemCodec :: struct { - fields: [4]HostField -} - -WidgetEncodeAppSharedItem :: (data: AppSharedItem, codec: *WidgetAppSharedItemCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppSharedItem") - value.fields = *codec.fields[0] - value.field_count = 4 - codec.fields[0].name = HostTextData("id") - codec.fields[0].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.id), .length = cast(usize)data.id.count} - codec.fields[1].name = HostTextData("title") - codec.fields[1].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.title), .length = cast(usize)data.title.count} - codec.fields[2].name = HostTextData("comment") - codec.fields[2].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.comment), .length = cast(usize)data.comment.count} - codec.fields[3].name = HostTextData("done") - codec.fields[3].value = HostScalar("bool", ifx data.done then 1 else 0) - return value -} - -WidgetDecodeAppSharedItem :: (value: HostValue, codec: *WidgetAppSharedItemCodec) -> AppSharedItem { - data: AppSharedItem - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - data.id = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 1, "title") - if field_at >= 0 { - data.title = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 2, "comment") - if field_at >= 0 { - data.comment = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 3, "done") - if field_at >= 0 { - data.done = value.fields[field_at].value.integer != 0 - } - } - return data -} - -WidgetValidAppSharedItem :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppSharedItem" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "title") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "comment") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "done") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - return true -} - -WidgetAppInvitationCodec :: struct { - fields: [8]HostField -} - -WidgetEncodeAppInvitation :: (data: AppInvitation, codec: *WidgetAppInvitationCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppInvitation") - value.fields = *codec.fields[0] - value.field_count = 8 - codec.fields[0].name = HostTextData("id") - codec.fields[0].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.id), .length = cast(usize)data.id.count} - codec.fields[1].name = HostTextData("shared_id") - codec.fields[1].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.shared_id), .length = cast(usize)data.shared_id.count} - codec.fields[2].name = HostTextData("title") - codec.fields[2].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.title), .length = cast(usize)data.title.count} - codec.fields[3].name = HostTextData("owner") - codec.fields[3].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.owner), .length = cast(usize)data.owner.count} - codec.fields[4].name = HostTextData("owner_name") - codec.fields[4].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.owner_name), .length = cast(usize)data.owner_name.count} - codec.fields[5].name = HostTextData("target") - codec.fields[5].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.target), .length = cast(usize)data.target.count} - codec.fields[6].name = HostTextData("target_name") - codec.fields[6].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.target_name), .length = cast(usize)data.target_name.count} - codec.fields[7].name = HostTextData("status") - codec.fields[7].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.status), .length = cast(usize)data.status.count} - return value -} - -WidgetDecodeAppInvitation :: (value: HostValue, codec: *WidgetAppInvitationCodec) -> AppInvitation { - data: AppInvitation - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - data.id = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 1, "shared_id") - if field_at >= 0 { - data.shared_id = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 2, "title") - if field_at >= 0 { - data.title = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 3, "owner") - if field_at >= 0 { - data.owner = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 4, "owner_name") - if field_at >= 0 { - data.owner_name = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 5, "target") - if field_at >= 0 { - data.target = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 6, "target_name") - if field_at >= 0 { - data.target_name = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 7, "status") - if field_at >= 0 { - data.status = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - return data -} - -WidgetValidAppInvitation :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppInvitation" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "id") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "shared_id") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "title") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "owner") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "owner_name") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "target") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 6, "target_name") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 7, "status") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - return true -} - -WidgetAppSharedCommandCodec :: struct { - fields: [6]HostField -} - -WidgetEncodeAppSharedCommand :: (data: AppSharedCommand, codec: *WidgetAppSharedCommandCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("AppSharedCommand") - value.fields = *codec.fields[0] - value.field_count = 6 - codec.fields[0].name = HostTextData("action") - codec.fields[0].value = HostScalar("s32", cast(s64)data.action) - codec.fields[1].name = HostTextData("id") - codec.fields[1].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.id), .length = cast(usize)data.id.count} - codec.fields[2].name = HostTextData("title") - codec.fields[2].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.title), .length = cast(usize)data.title.count} - codec.fields[3].name = HostTextData("revision") - codec.fields[3].value = HostScalar("s32", cast(s64)data.revision) - codec.fields[4].name = HostTextData("target") - codec.fields[4].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.target), .length = cast(usize)data.target.count} - codec.fields[5].name = HostTextData("invitation") - codec.fields[5].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.invitation), .length = cast(usize)data.invitation.count} - return value -} - -WidgetDecodeAppSharedCommand :: (value: HostValue, codec: *WidgetAppSharedCommandCodec) -> AppSharedCommand { - data: AppSharedCommand - { - field_at := HostFieldAt(value, 0, "action") - if field_at >= 0 { - data.action = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 1, "id") - if field_at >= 0 { - data.id = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 2, "title") - if field_at >= 0 { - data.title = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 3, "revision") - if field_at >= 0 { - data.revision = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 4, "target") - if field_at >= 0 { - data.target = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 5, "invitation") - if field_at >= 0 { - data.invitation = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - return data -} - -WidgetValidAppSharedCommand :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "AppSharedCommand" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "action") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "id") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "title") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "revision") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "target") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "invitation") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - return true -} - -WidgetMediaEntryCodec :: struct { - fields: [7]HostField -} - -WidgetEncodeMediaEntry :: (data: MediaEntry, codec: *WidgetMediaEntryCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("MediaEntry") - value.fields = *codec.fields[0] - value.field_count = 7 - codec.fields[0].name = HostTextData("hash") - codec.fields[0].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.hash), .length = cast(usize)data.hash.count} - codec.fields[1].name = HostTextData("name") - codec.fields[1].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.name), .length = cast(usize)data.name.count} - codec.fields[2].name = HostTextData("day") - codec.fields[2].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.day), .length = cast(usize)data.day.count} - codec.fields[3].name = HostTextData("taken") - codec.fields[3].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.taken), .length = cast(usize)data.taken.count} - codec.fields[4].name = HostTextData("format") - codec.fields[4].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.format), .length = cast(usize)data.format.count} - codec.fields[5].name = HostTextData("size") - codec.fields[5].value = HostScalar("s64", cast(s64)data.size) - codec.fields[6].name = HostTextData("trashed") - codec.fields[6].value = HostScalar("bool", ifx data.trashed then 1 else 0) - return value -} - -WidgetDecodeMediaEntry :: (value: HostValue, codec: *WidgetMediaEntryCodec) -> MediaEntry { - data: MediaEntry - { - field_at := HostFieldAt(value, 0, "hash") - if field_at >= 0 { - data.hash = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 1, "name") - if field_at >= 0 { - data.name = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 2, "day") - if field_at >= 0 { - data.day = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 3, "taken") - if field_at >= 0 { - data.taken = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 4, "format") - if field_at >= 0 { - data.format = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 5, "size") - if field_at >= 0 { - data.size = cast(s64)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 6, "trashed") - if field_at >= 0 { - data.trashed = value.fields[field_at].value.integer != 0 - } - } - return data -} - -WidgetValidMediaEntry :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "MediaEntry" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "hash") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "name") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "day") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "taken") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "format") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "size") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s64", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 6, "trashed") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - return true -} - -WidgetMediaStatusCodec :: struct { - fields: [8]HostField -} - -WidgetEncodeMediaStatus :: (data: MediaStatus, codec: *WidgetMediaStatusCodec) -> HostValue { - value: HostValue - value.kind = cast(s32)HostRecord - value.type_name = HostTextData("MediaStatus") - value.fields = *codec.fields[0] - value.field_count = 8 - codec.fields[0].name = HostTextData("picking") - codec.fields[0].value = HostScalar("bool", ifx data.picking then 1 else 0) - codec.fields[1].name = HostTextData("picks") - codec.fields[1].value = HostScalar("s32", cast(s64)data.picks) - codec.fields[2].name = HostTextData("added") - codec.fields[2].value = HostScalar("bool", ifx data.added then 1 else 0) - codec.fields[3].name = HostTextData("existed") - codec.fields[3].value = HostScalar("bool", ifx data.existed then 1 else 0) - codec.fields[4].name = HostTextData("failed") - codec.fields[4].value = HostScalar("bool", ifx data.failed then 1 else 0) - codec.fields[5].name = HostTextData("hash") - codec.fields[5].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.hash), .length = cast(usize)data.hash.count} - codec.fields[6].name = HostTextData("revision") - codec.fields[6].value = HostScalar("s32", cast(s64)data.revision) - codec.fields[7].name = HostTextData("today") - codec.fields[7].value = HostValue.{.kind = cast(s32)HostString, .type_name = HostTextData("string"), .data = HostTextData(data.today), .length = cast(usize)data.today.count} - return value -} - -WidgetDecodeMediaStatus :: (value: HostValue, codec: *WidgetMediaStatusCodec) -> MediaStatus { - data: MediaStatus - { - field_at := HostFieldAt(value, 0, "picking") - if field_at >= 0 { - data.picking = value.fields[field_at].value.integer != 0 - } - } - { - field_at := HostFieldAt(value, 1, "picks") - if field_at >= 0 { - data.picks = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 2, "added") - if field_at >= 0 { - data.added = value.fields[field_at].value.integer != 0 - } - } - { - field_at := HostFieldAt(value, 3, "existed") - if field_at >= 0 { - data.existed = value.fields[field_at].value.integer != 0 - } - } - { - field_at := HostFieldAt(value, 4, "failed") - if field_at >= 0 { - data.failed = value.fields[field_at].value.integer != 0 - } - } - { - field_at := HostFieldAt(value, 5, "hash") - if field_at >= 0 { - data.hash = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - { - field_at := HostFieldAt(value, 6, "revision") - if field_at >= 0 { - data.revision = cast(s32)value.fields[field_at].value.integer - } - } - { - field_at := HostFieldAt(value, 7, "today") - if field_at >= 0 { - data.today = TextFromBytes(BytesFromPointer(value.fields[field_at].value.data, cast(u64)value.fields[field_at].value.length)) - } - } - return data -} - -WidgetValidMediaStatus :: (value: HostValue) -> bool { - if value.kind != cast(s32)HostRecord || TextFromCString(value.type_name) != "MediaStatus" || - value.field_count > cast(usize)HOST_FIELD_LIMIT || - (value.field_count > cast(usize)0 && value.fields == null) { return false } - { - field_at := HostFieldAt(value, 0, "picking") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 1, "picks") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 2, "added") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 3, "existed") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 4, "failed") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "bool", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 5, "hash") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - { - field_at := HostFieldAt(value, 6, "revision") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "s32", cast(s32)HostInteger) { return false } - } - } - { - field_at := HostFieldAt(value, 7, "today") - if field_at >= 0 { - if !HostScalarValid(value.fields[field_at].value, "string", cast(s32)HostString) { return false } - } - } - return true -} diff --git a/src/cells/node_app_tree.zi b/src/cells/node_app_tree.zi index bf38b2c37..c4f2579a2 100644 --- a/src/cells/node_app_tree.zi +++ b/src/cells/node_app_tree.zi @@ -29,7 +29,7 @@ Codec :: #import "apps/node_codec"; #import, file "node_apps.zi"; #import, file "node_app_runner.zi"; #import, file "node_app_snapshot.zi"; -Legacy :: #import, file "node_app_types.zi"; +Legacy :: #import "apps/node_types"; #import, file "package_manager.zi"; #import, file "package_release.zi"; #import, file "package_files.zi"; diff --git a/src/cells/node_app_types.zi b/src/cells/node_app_types.zi deleted file mode 100644 index 7024d367a..000000000 --- a/src/cells/node_app_types.zi +++ /dev/null @@ -1,155 +0,0 @@ -// Apps the node offers run through one generic host interface, so an app -// added to the node needs no host code of its own. The host supplies values -// only: frames, translated text, the account's private records, friends and -// records shared with a friend. No native pointers cross the boundary. -#import, file "module_types.zi"; -#import "session" - -// The answer a node app gives when the host asks who it is. -MODULE_NODE_APP :: 8 - -APP_ROUTE :: 1 -APP_FRAME :: 2 -// An app consumes Back only when it can return to an earlier page. -APP_BACK :: 3 - -// What a shared command is doing. -APP_SHARED_IDLE :: 0 -APP_SHARED_SENDING :: 1 -APP_SHARED_DONE :: 2 -APP_SHARED_FAILED :: 3 -APP_SHARED_CONFLICT :: 4 -APP_SHARED_UNAVAILABLE :: 5 - -// Commands on records shared with friends. -APP_SHARED_SAVE :: 1 -APP_SHARED_INVITE :: 2 -APP_SHARED_ACCEPT :: 3 -APP_SHARED_DECLINE :: 4 -APP_SHARED_DELETE :: 5 - -// Limits the host enforces; an app keeps within them. -APP_RECORD_NAME_MAX :: 64 -APP_RECORD_TEXT_MAX :: 65536 -APP_SHARED_ID_MAX :: 36 -APP_SHARED_TITLE_MAX :: 127 -APP_SHARED_COMMENT_MAX :: 511 -APP_SHARED_ITEMS_MAX :: 32 - -AppMessage :: struct { - abi: s32 - action: s32 - screen: s32 - // The app's own name, such as "chess"; its records and shared ids use it. - name: string - // The language the person chose, such as "en". - locale: string - // The account's public ID, or empty without an account. - account: string - signed_in: bool - friend_count: s32 - shared_count: s32 - invitation_count: s32 - // Changes whenever the shared records or invitations change. - shared_revision: s32 - // The last shared command, APP_SHARED_IDLE to APP_SHARED_UNAVAILABLE. - shared_status: s32 - // Seconds since 1970 by the device clock. - time: s64 - succeeded: bool -} - -// Device observations for one frame of the app's screen. -AppUiFrame :: struct { - session: Session - width: s32 - height: s32 - bottom: s32 - // Optional reserved space above the game. Older hosts omit it (zero). - top: s32 - scale: float32 - font: s32 - // The app clock in seconds, for animation and press timing. - now: float64 - dark: bool -} - -AppPerson :: struct { - id: string - name: string -} - -// A record shared with friends. Its id starts with the app's name and a dash. -AppShared :: struct { - id: string - owner: string - owner_name: string - title: string - revision: s32 - item_count: s32 -} - -AppSharedItem :: struct { - id: string - title: string - comment: string - done: bool -} - -// An invitation to a shared record, sent or received. -AppInvitation :: struct { - id: string - shared_id: string - title: string - owner: string - owner_name: string - target: string - target_name: string - // "pending", "accepted" or "declined". - status: string -} - -AppSharedCommand :: struct { - action: s32 - id: string - title: string - // The revision the change was made from; a newer one on the node - // answers APP_SHARED_CONFLICT. - revision: s32 - // The friend invited, by account ID. - target: string - invitation: string -} - -// The account's media library, for an app the host grants it (Photos). Its -// photos are kept once by the SHA-256 of their bytes, encrypted on the -// account's nodes, and drawn through MediaAssetHost's asset paths. -MediaEntry :: struct { - hash: string - name: string - // The capture day, YYYY-MM-DD, and time, with its offset when known. - day: string - taken: string - // "jpg", "png", "gif" or "webp". - format: string - size: s64 - trashed: bool -} - -// The platform picker MediaPickHost opens, and what its last pick did. -MediaStatus :: struct { - picking: bool - // Counts the finished picks; the fields below describe the last one. - picks: s32 - added: bool - // The photo was in the library already, maybe in Trash; it is back. - existed: bool - // Nothing could be added: not a photo, too large or unreadable. - failed: bool - hash: string - // Changes whenever the items MediaQueryHost lists change, on this - // device or from another. - revision: s32 - // This device's date, YYYY-MM-DD, for day headings. - today: string -} diff --git a/src/cells/node_apps.zi b/src/cells/node_apps.zi index b81c4d170..f07d61bd0 100644 --- a/src/cells/node_apps.zi +++ b/src/cells/node_apps.zi @@ -2,7 +2,7 @@ // lists every app the node's registry names "inbe." that has a release // this build can run. Installing one downloads it through the package // manager into one of a few device-local slots; it then runs in its own VM -// through the generic app interface (node_app_types.zi), so a new app needs +// through the generic app interface (apps/node_types), so a new app needs // no host code. Whether an app is installed syncs with the account. #import "bundle_host" #import, file "../app/background_audio.zi"; @@ -25,8 +25,8 @@ Time :: #import "date_time_linux"; #import "file_linux" #import, file "catalog.zi"; #import, file "module_types.zi"; -#import, file "node_app_types.zi"; -#import, file "node_app_codec.zi"; +#import "apps/node_types" +#import "apps/node_codec" #import, file "node_app_tree.zi"; #import, file "node_app_snapshot.zi"; #import, file "achievement_media.zi"; diff --git a/src/cells/protocol.zi b/src/cells/protocol.zi deleted file mode 100644 index 423850368..000000000 --- a/src/cells/protocol.zi +++ /dev/null @@ -1,4 +0,0 @@ -#import, file "module_types.zi"; -#import, file "lists_types.zi"; -#import, file "habits_types.zi"; -#import, file "practice_types.zi"; diff --git a/src/screens/node_app_screen.zi b/src/screens/node_app_screen.zi index 12ce339e4..30ef291d4 100644 --- a/src/screens/node_app_screen.zi +++ b/src/screens/node_app_screen.zi @@ -20,8 +20,8 @@ #import, file "../cells/node_apps.zi"; #import, file "../cells/node_app_runner.zi"; #import, file "../cells/node_app_tree.zi"; -#import, file "../cells/node_app_types.zi"; -#import, file "../cells/node_app_codec.zi"; +#import "apps/node_types" +#import "apps/node_codec" #import, file "../cells/lists_network.zi"; #import, file "../cells/hosted_assets.zi"; #import, file "../cells/package_manager.zi"; diff --git a/tests/account_activity_zi_test.sh b/tests/account_activity_zi_test.sh index 5a1e60503..2331ea3ea 100644 --- a/tests/account_activity_zi_test.sh +++ b/tests/account_activity_zi_test.sh @@ -12,9 +12,8 @@ mkdir -p "$work/generated" "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/game2d/src" --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" --entry account_activity_behavior:Check \ -o "$work/generated" "$root/tests/account_activity_behavior.zi" "$root/tests/sync_test_host.zi" diff --git a/tests/achievements_zi_test.sh b/tests/achievements_zi_test.sh index 4ff259ed9..15e077967 100644 --- a/tests/achievements_zi_test.sh +++ b/tests/achievements_zi_test.sh @@ -22,14 +22,11 @@ for fixture in valid invalid empty; do done "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ - --module-path "self=$root/build/packages/self/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/game2d/src" \ - --module-path "oqs=$root/build/packages/oqs/src" \ --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" \ --entry achievements_behavior:Check -o "$work/generated" \ diff --git a/tests/android_geometry_probe_test.sh b/tests/android_geometry_probe_test.sh index dbd2fd2f9..f7d2702e6 100644 --- a/tests/android_geometry_probe_test.sh +++ b/tests/android_geometry_probe_test.sh @@ -8,7 +8,7 @@ ziran=${ZIRAN_BIN:-"$root/build/ziran-toolchain/bin/ziran"} --root "$root/tests" --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/tests/android_geometry_probe_behavior.zi" "${CC:-cc}" -std=c11 -O1 -ffunction-sections -fdata-sections \ -Wl,--gc-sections -I"$work/c" "$work/c"/*.c -ldl -lpthread -lm -o "$work/test" diff --git a/tests/android_health_zi_test.sh b/tests/android_health_zi_test.sh index 2511900f2..6619b03f6 100644 --- a/tests/android_health_zi_test.sh +++ b/tests/android_health_zi_test.sh @@ -6,6 +6,6 @@ bin=${1:-"$root/build/ziran-toolchain/bin"} --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ "$root/src/platform/android/android_health.zi" exec python3 "$root/tests/android_jni_zi_test.py" "$bin" diff --git a/tests/android_import_zi_test.sh b/tests/android_import_zi_test.sh index a6c2bdcca..6973fff8f 100644 --- a/tests/android_import_zi_test.sh +++ b/tests/android_import_zi_test.sh @@ -4,6 +4,6 @@ root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) bin=${1:-"$root/build/ziran-toolchain/bin"} "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/platform/android/android_import.zi" exec python3 "$root/tests/android_jni_zi_test.py" "$bin" diff --git a/tests/android_lifecycle_link_test.c b/tests/android_lifecycle_link_test.c index f2968efaf..3f9d3bd0b 100644 --- a/tests/android_lifecycle_link_test.c +++ b/tests/android_lifecycle_link_test.c @@ -1,4 +1,5 @@ #include "platform/android/android_lifecycle.h" +#include "zir_string.h" #include "current_app.h" #include diff --git a/tests/android_lifecycle_zi_test.sh b/tests/android_lifecycle_zi_test.sh index d78389b5c..1162da626 100644 --- a/tests/android_lifecycle_zi_test.sh +++ b/tests/android_lifecycle_zi_test.sh @@ -11,13 +11,13 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ "$root/src/platform/android/android_lifecycle.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/gen" "$root/src/platform/android/android_lifecycle.zi" \ "$root/src/app/current_app.zi" "$root/src/app/exercise_types.zi" \ "$root/src/app/practice_lifecycle.zi" diff --git a/tests/android_push_zi_test.sh b/tests/android_push_zi_test.sh index 2c177832c..721461409 100644 --- a/tests/android_push_zi_test.sh +++ b/tests/android_push_zi_test.sh @@ -4,6 +4,6 @@ root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) bin=${1:-"$root/build/ziran-toolchain/bin"} "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/platform/android/android_push.zi" exec python3 "$root/tests/android_jni_zi_test.py" "$bin" diff --git a/tests/android_text_input_zi_test.sh b/tests/android_text_input_zi_test.sh index 82922e430..b1f2c7bf5 100644 --- a/tests/android_text_input_zi_test.sh +++ b/tests/android_text_input_zi_test.sh @@ -10,11 +10,11 @@ mkdir -p "$work/c" "$bin/zi2zir" --check-only --define ANDROID_BUILD --define KRYON_ANDROID_HOST --root "$root/tests" \ --module-path "$root/src" --module-path "$ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" "$source" + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") "$source" "$bin/zi2c" --define ANDROID_BUILD --define KRYON_ANDROID_HOST --root "$root/tests" \ --module-path "$root/src" --module-path "$ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" -o "$work/c" "$source" + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") -o "$work/c" "$source" "${CC:-cc}" -std=c11 -D_DEFAULT_SOURCE -O2 -pthread \ -ffunction-sections -fdata-sections -I"$root/build/packages/ziran/include" \ -iquote "$work/c" "$work/c"/*.c -Wl,--gc-sections -o "$work/test" diff --git a/tests/android_wakelock_zi_test.sh b/tests/android_wakelock_zi_test.sh index 637f01536..0c3e1b159 100644 --- a/tests/android_wakelock_zi_test.sh +++ b/tests/android_wakelock_zi_test.sh @@ -4,6 +4,6 @@ root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) bin=${1:-"$root/build/ziran-toolchain/bin"} "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/platform/android/android_wakelock.zi" exec python3 "$root/tests/android_jni_zi_test.py" "$bin" diff --git a/tests/app_chrome_link_test.c b/tests/app_chrome_link_test.c index 01afe5fc7..85446d6fc 100644 --- a/tests/app_chrome_link_test.c +++ b/tests/app_chrome_link_test.c @@ -1,4 +1,5 @@ #include "app/app_chrome.h" +#include "zir_string.h" #include "app/practice_title_bar.h" #include "paint_queue.h" #include "image_raster.h" diff --git a/tests/app_chrome_zi_test.sh b/tests/app_chrome_zi_test.sh index ced33aa5a..5ce64d27d 100644 --- a/tests/app_chrome_zi_test.sh +++ b/tests/app_chrome_zi_test.sh @@ -10,31 +10,31 @@ mkdir -p "$work/c" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ "$root/src/app/app_chrome.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/src/app/app_chrome.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/src/app/practice_title_bar.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/src/app/assets.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/src/app/image_dimensions.zi" python3 "$root/scripts/embed-app-assets.py" "$work/assets.c" \ "$root/build/packages/kryon/icons/ui.png" diff --git a/tests/app_click_block_zi_test.sh b/tests/app_click_block_zi_test.sh index d7fb7eae7..5bbc9f711 100644 --- a/tests/app_click_block_zi_test.sh +++ b/tests/app_click_block_zi_test.sh @@ -7,8 +7,7 @@ mkdir -p "$work/generated" "$bin/zi2c" --no-main --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/generated" "$root/tests/app_click_block_behavior.zi" cat > "$work/generated/main.c" <<'C' #include "app_click_block_behavior.h" diff --git a/tests/app_nav_state_link_test.c b/tests/app_nav_state_link_test.c index cbe82b818..adea3c2ef 100644 --- a/tests/app_nav_state_link_test.c +++ b/tests/app_nav_state_link_test.c @@ -1,4 +1,5 @@ #include "app/app_nav_state.h" +#include "zir_string.h" #include #include diff --git a/tests/app_nav_state_zi_test.sh b/tests/app_nav_state_zi_test.sh index b1a690386..e4a161146 100644 --- a/tests/app_nav_state_zi_test.sh +++ b/tests/app_nav_state_zi_test.sh @@ -9,25 +9,21 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/backend" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ - --module-path "oqs=$root/build/packages/oqs/src" \ "$root/src/app/app_nav_state.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/backend" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ - --module-path "oqs=$root/build/packages/oqs/src" \ -o "$work/gen" "$root/src/app/app_nav_state.zi" "${CC:-cc}" -std=c11 -Wall -Wextra -Werror \ -Wno-unused-function -Wno-unused-variable \ diff --git a/tests/archive_file_linux_zi_test.c b/tests/archive_file_linux_zi_test.c index 0d1372337..ad83302b1 100644 --- a/tests/archive_file_linux_zi_test.c +++ b/tests/archive_file_linux_zi_test.c @@ -1,5 +1,6 @@ #define _GNU_SOURCE #include "storage/archive_file_linux.h" +#include "zir_string.h" #include "../src/core/version.h" #include diff --git a/tests/audio_first_cue_host.c b/tests/audio_first_cue_host.c index f845477ff..393be38a3 100644 --- a/tests/audio_first_cue_host.c +++ b/tests/audio_first_cue_host.c @@ -1,4 +1,5 @@ #include "audio_runtime.h" +#include "zir_string.h" #include #include #include diff --git a/tests/audio_first_cue_test.sh b/tests/audio_first_cue_test.sh index 953555d86..f8f574540 100644 --- a/tests/audio_first_cue_test.sh +++ b/tests/audio_first_cue_test.sh @@ -9,8 +9,8 @@ mkdir -p "$generated" --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" --module-path "$root/build/packages/kss/src" \ - --module-path "$root/build/packages/game2d/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" -o "$generated" "$root/tests/audio_first_cue_test.zi" + --module-path "$root/build/packages/game2d/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + -o "$generated" "$root/tests/audio_first_cue_test.zi" python3 "$root/scripts/embed-app-assets.py" "$work/assets.c" \ "$root/assets/sounds/bell.ogg" "$root/assets/sounds/breath-in.ogg" "$root/assets/sounds/breath-out.ogg" "${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \ diff --git a/tests/audio_runtime_zi_test.sh b/tests/audio_runtime_zi_test.sh index 3f3729017..d487e2f7f 100644 --- a/tests/audio_runtime_zi_test.sh +++ b/tests/audio_runtime_zi_test.sh @@ -8,11 +8,11 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/platform/audio_runtime.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$root/src/platform/audio_runtime.zi" "${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \ -I"$root/build/packages/ziran/include" -I"$work/c" \ diff --git a/tests/audio_settings_link_test.c b/tests/audio_settings_link_test.c index 67722038d..8c40be635 100644 --- a/tests/audio_settings_link_test.c +++ b/tests/audio_settings_link_test.c @@ -1,4 +1,5 @@ #include "app/audio_settings.h" +#include "zir_string.h" #include "settings_cache.h" #include diff --git a/tests/audio_settings_zi_test.sh b/tests/audio_settings_zi_test.sh index 32b074780..a7134534a 100644 --- a/tests/audio_settings_zi_test.sh +++ b/tests/audio_settings_zi_test.sh @@ -9,7 +9,7 @@ generated=$work/generated mkdir -p "$generated/app" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$generated" "$root/src/app/audio_settings.zi" cp "$generated/settings_key.h" "$generated/app/settings_key.h" "${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK \ diff --git a/tests/cells_platform_test.sh b/tests/cells_platform_test.sh index e8279ea83..7c6dd387f 100644 --- a/tests/cells_platform_test.sh +++ b/tests/cells_platform_test.sh @@ -15,6 +15,8 @@ if [ "$target" = android ]; then fi "$ziran" build --target=c --no-main "$@" --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + --module-path "$root/build/packages/daochi-client" \ --module-path "$source/std" -o "$generated" \ "$root/tests/cells_platform_probe.zi" if [ "$target" = android ]; then diff --git a/tests/cells_zi_test.sh b/tests/cells_zi_test.sh index ec954cb96..7330d0869 100755 --- a/tests/cells_zi_test.sh +++ b/tests/cells_zi_test.sh @@ -38,23 +38,22 @@ Main :: () -> s32 { return PersistListsHost($argument) } ZIRAN - "$ziran" bundle --root "$work/$shape" --module-path "$root/build/packages/kryon/src/ui" \ + "$ziran" bundle --root "$work/$shape" --module-path "$root/build/packages/kryon/src/ui" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --define KRYON_HOSTED_UI --entry lists:Main -o "$work/$shape.zib" "$work/$shape/lists.zi" done -"$ziran" bundle --root "$root" --module-path "$root/build/packages/kryon/src/ui" \ +"$ziran" bundle --root "$root" --module-path "$root/build/packages/kryon/src/ui" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --define KRYON_HOSTED_UI --entry inbe:Main -o "$work/missing-assets.zib" \ "$root/apps/inbe/inbe.zi" mkdir -p "$work/invalid-nested" printf 'ZIB' > "$work/invalid-nested/lists.zib" cp "$root/build/cells/habits.zib" "$root/build/cells/practices.zib" "$work/invalid-nested/" -"$ziran" bundle --root "$root" --module-path "$root/build/packages/kryon/src/ui" \ +"$ziran" bundle --root "$root" --module-path "$root/build/packages/kryon/src/ui" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --define KRYON_HOSTED_UI --entry inbe:Main \ --asset-dir "cells=$work/invalid-nested" -o "$work/invalid-nested.zib" \ "$root/apps/inbe/inbe.zi" "$ziran" build --target=c --no-main --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \ -o "$work/generated" "$root/tests/cells_behavior.zi" "$root/tests/sync_test_host.zi" diff --git a/tests/daochi_native_zi_test.c b/tests/daochi_native_zi_test.c index 396508ccf..d3e8ed467 100644 --- a/tests/daochi_native_zi_test.c +++ b/tests/daochi_native_zi_test.c @@ -1,4 +1,5 @@ #include "storage/daochi_native.h" +#include "zir_string.h" #include #include diff --git a/tests/daochi_native_zi_test.py b/tests/daochi_native_zi_test.py index b36812e98..028d7e034 100644 --- a/tests/daochi_native_zi_test.py +++ b/tests/daochi_native_zi_test.py @@ -115,9 +115,8 @@ with tempfile.TemporaryDirectory(prefix="inbe-daochi-native-") as temporary: str(COMPILER), "--no-main", "--root", str(ROOT / "src"), "--module-path", str(ROOT / "build/packages/ziran/std"), "--module-path", str(ROOT / "build/packages/daochi-client"), - "--module-path", f"oqs={ROOT / 'build/packages/oqs/src'}", "--module-path", str(ROOT / "build/packages/kryon/src/ui"), - "--module-path", f"kryon={ROOT / 'build/packages/kryon/src/ui'}", + *subprocess.check_output(["sh", str(ROOT / "scripts/package-paths.sh"), str(ROOT / "build/packages")], text=True).split(), "--module-path", str(ROOT / "build/packages/kryon/src/backend"), "--module-path", str(ROOT / "build/packages/kss/src"), "--module-path", str(ROOT / "build/packages/game2d/src"), diff --git a/tests/delegate_account_zi_test.sh b/tests/delegate_account_zi_test.sh index ef8ccb7eb..8e9b746d1 100644 --- a/tests/delegate_account_zi_test.sh +++ b/tests/delegate_account_zi_test.sh @@ -12,8 +12,8 @@ unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS export YUE_DESKTOP_RECOVERY=0 "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" --entry delegate_account_behavior:Check \ -o "$work/generated" "$root/tests/delegate_account_behavior.zi" "$root/tests/sync_test_host.zi" "$root/tests/delegate_account_host.zi" diff --git a/tests/device_key_zi_test.c b/tests/device_key_zi_test.c index f4a2b7204..bb9506460 100644 --- a/tests/device_key_zi_test.c +++ b/tests/device_key_zi_test.c @@ -1,4 +1,5 @@ #include "storage/device_key_store.h" +#include "zir_string.h" #include #include diff --git a/tests/device_key_zi_test.py b/tests/device_key_zi_test.py index 3eb48b0a2..6c2ff24b6 100644 --- a/tests/device_key_zi_test.py +++ b/tests/device_key_zi_test.py @@ -21,7 +21,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-device-key-") as temporary: str(args.compiler), "--no-main", "--root", str(ROOT / "src"), *(["--define", "PLATFORM_WEB", "--define", "__EMSCRIPTEN__"] if args.wasm else []), "--module-path", str(ROOT / "build/packages/ziran/std"), - "--module-path", f"oqs={ROOT / 'build/packages/oqs/src'}", + *subprocess.check_output(["sh", str(ROOT / "scripts/package-paths.sh"), str(ROOT / "build/packages")], text=True).split(), "--module-path", str(ROOT / "build/packages/daochi-client"), "--module-path", str(ROOT / "build/packages/kryon/src/ui"), "-o", str(generated), str(ROOT / "src/storage/device_key_store.zi"), diff --git a/tests/device_link_zi_test.py b/tests/device_link_zi_test.py index be92f57ec..d2d3445a8 100644 --- a/tests/device_link_zi_test.py +++ b/tests/device_link_zi_test.py @@ -18,7 +18,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-device-link-") as temporary: "--module-path", str(ROOT / "src"), "--module-path", str(ROOT / "build/packages/ziran/std"), "--module-path", str(ROOT / "build/packages/daochi-client"), - "--module-path", f"oqs={ROOT / 'build/packages/oqs/src'}", + *subprocess.check_output(["sh", str(ROOT / "scripts/package-paths.sh"), str(ROOT / "build/packages")], text=True).split(), "--entry", "device_link_behavior:Check", "-o", str(generated), str(ROOT / "tests/device_link_behavior.zi"), ], check=True) diff --git a/tests/device_policy_zi_test.sh b/tests/device_policy_zi_test.sh index c105b18e9..eda7359e7 100644 --- a/tests/device_policy_zi_test.sh +++ b/tests/device_policy_zi_test.sh @@ -9,17 +9,17 @@ source=$root/tests/device_policy_behavior.zi mkdir -p "$work/ir" "$work/c" "$bin/zi2zir" --root "$root/tests" --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/ir" "$source" "$bin/zi2zib" bundle --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ --entry device_policy_behavior:Answer \ -o "$work/source.zib" "$source" "$bin/zi2zib" bundle --root "$work/ir" --module-path "$work/ir" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ --entry device_policy_behavior:Answer \ -o "$work/saved.zib" "$work/ir/device_policy_behavior.zir" [ "$(env -u DISPLAY -u WAYLAND_DISPLAY "$bin/zi2zib" run "$work/source.zib")" = 42 ] @@ -28,7 +28,7 @@ cmp "$work/source.zib" "$work/saved.zib" "$bin/zi2c" --no-main --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$source" cat > "$work/c/main.c" <<'C' #include "device_policy_behavior.h" diff --git a/tests/device_preferences_zi_test.sh b/tests/device_preferences_zi_test.sh index 5a55722a4..35e3ba423 100644 --- a/tests/device_preferences_zi_test.sh +++ b/tests/device_preferences_zi_test.sh @@ -10,7 +10,7 @@ mkdir -p "$work/c" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/tests/device_preferences_link_behavior.zi" mv "$work/c/device_host.c" "$work/c/device_host.c.skip" mkdir -p "$work/c/app" diff --git a/tests/dew_test.sh b/tests/dew_test.sh index 188eebd7f..125fc74cf 100644 --- a/tests/dew_test.sh +++ b/tests/dew_test.sh @@ -12,8 +12,7 @@ rm -rf "$work/generated" mkdir -p "$work/generated" "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/diary_spelling_test.sh b/tests/diary_spelling_test.sh index f15bff825..06399e4bb 100644 --- a/tests/diary_spelling_test.sh +++ b/tests/diary_spelling_test.sh @@ -12,8 +12,7 @@ rm -rf "$work/generated" mkdir -p "$work/generated" "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/dpi_state_zi_test.sh b/tests/dpi_state_zi_test.sh index e47e9b36b..d9fce9d18 100644 --- a/tests/dpi_state_zi_test.sh +++ b/tests/dpi_state_zi_test.sh @@ -8,11 +8,11 @@ mkdir -p "$work/c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/app/dpi_state.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$root/src/app/dpi_state.zi" \ "$root/src/platform/dpi_density.zi" diff --git a/tests/elist_screen_link_test.c b/tests/elist_screen_link_test.c index c6c800663..a2909b0d1 100644 --- a/tests/elist_screen_link_test.c +++ b/tests/elist_screen_link_test.c @@ -1,4 +1,5 @@ #include "screens/elist_screen.h" +#include "zir_string.h" #include "module_host.h" #include "lists_visibility.h" #include "diary_types.h" diff --git a/tests/elist_screen_zi_test.sh b/tests/elist_screen_zi_test.sh index 2a0b0eb38..43b270da2 100644 --- a/tests/elist_screen_zi_test.sh +++ b/tests/elist_screen_zi_test.sh @@ -8,13 +8,13 @@ mkdir -p "$work/c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" \ "$root/src/screens/elist_screen.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" \ -o "$work/c" "$root/src/screens/elist_screen.zi" diff --git a/tests/fonts_zi_test.sh b/tests/fonts_zi_test.sh index a76c3c0aa..aa1f69ffd 100644 --- a/tests/fonts_zi_test.sh +++ b/tests/fonts_zi_test.sh @@ -7,7 +7,7 @@ work=$root/build/fonts-zi-test mkdir -p "$work/c" "$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/kryon/src/ui" \ -o "$work/c" "$root/tests/fonts_link_behavior.zi" mkdir -p "$work/c/app" diff --git a/tests/frame_pacing_zi_test.sh b/tests/frame_pacing_zi_test.sh index e8513e6e5..a07d6fa67 100644 --- a/tests/frame_pacing_zi_test.sh +++ b/tests/frame_pacing_zi_test.sh @@ -8,11 +8,11 @@ mkdir -p "$work/c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/app/app_frame_pacing.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$root/src/app/app_frame_pacing.zi" "${CC:-cc}" -std=c11 -Wall -Wextra -Werror \ -Wno-unused-function -Wno-unused-variable \ diff --git a/tests/friend_requests_host_test.c b/tests/friend_requests_host_test.c index 35ef002cb..c2bd5eb68 100644 --- a/tests/friend_requests_host_test.c +++ b/tests/friend_requests_host_test.c @@ -1,4 +1,5 @@ #include "friend_requests_behavior.h" +#include "zir_string.h" #include "friend_requests.h" #include diff --git a/tests/graphics_transition_test.sh b/tests/graphics_transition_test.sh index f97a13d7c..406b100a1 100644 --- a/tests/graphics_transition_test.sh +++ b/tests/graphics_transition_test.sh @@ -8,7 +8,7 @@ unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS for target in c cpp; do "$bin/ziran" build --target="$target" --root "$root" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/$target" "$root/tests/graphics_transition_behavior.zi" if test "$target" = c; then compiler=${CC:-cc} diff --git a/tests/habit_calendar_zi_test.sh b/tests/habit_calendar_zi_test.sh index e32f7c638..29bfaba4f 100644 --- a/tests/habit_calendar_zi_test.sh +++ b/tests/habit_calendar_zi_test.sh @@ -10,9 +10,9 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM source=$root/tests/habit_calendar_behavior.zi "$bin/zi2zir" --root "$root/tests" --module-path "$root/src" \ - --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" -o "$work/ir" "$source" + --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" -o "$work/ir" "$source" "$bin/zi2zib" bundle --root "$root/tests" --module-path "$root/src" \ - --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" --entry habit_calendar_behavior:CalendarAnswer \ + --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" --entry habit_calendar_behavior:CalendarAnswer \ -o "$work/source.zib" "$source" "$bin/zi2zib" bundle --root "$work/ir" \ --entry habit_calendar_behavior:CalendarAnswer \ @@ -22,7 +22,7 @@ test "$("$bin/zi2zib" run "$work/source.zib")" = 42 test "$("$bin/zi2zib" run "$work/saved.zib")" = 42 "$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \ - --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" "$source" + --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" "$source" cat > "$work/c/main.c" <<'C' #include "habit_calendar_behavior.h" int main(void) { return Answer() == 42 && CalendarAnswer() == 42 ? 0 : 1; } diff --git a/tests/habit_days_memory_zi_test.sh b/tests/habit_days_memory_zi_test.sh index 886a07508..74171525f 100644 --- a/tests/habit_days_memory_zi_test.sh +++ b/tests/habit_days_memory_zi_test.sh @@ -8,7 +8,7 @@ mkdir -p "$work/c" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$root/src/habits/habit_days.zi" "${CC:-cc}" -std=c11 -Wall -Wextra -Werror \ diff --git a/tests/habit_form_zi_test.sh b/tests/habit_form_zi_test.sh index 3183e3c45..016b638e4 100755 --- a/tests/habit_form_zi_test.sh +++ b/tests/habit_form_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/habit_linked_rules_zi_test.sh b/tests/habit_linked_rules_zi_test.sh index acd51be31..bd0936380 100644 --- a/tests/habit_linked_rules_zi_test.sh +++ b/tests/habit_linked_rules_zi_test.sh @@ -9,10 +9,10 @@ source=$root/tests/habit_linked_rules_behavior.zi sh "$root/scripts/run-ziran.sh" "$bin/zi2zir" --check-only --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" "$source" + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" "$source" sh "$root/scripts/run-ziran.sh" "$bin/zi2c" --no-main --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" "$source" + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" "$source" "${CC:-cc}" -std=c11 -ffunction-sections -fdata-sections \ -Wl,--gc-sections -I"$root/build/packages/ziran/include" \ -I"$work/c" "$work/c"/*.c -o "$work/test" diff --git a/tests/habit_model_zi_test.sh b/tests/habit_model_zi_test.sh index 5cae57034..ae3488bee 100755 --- a/tests/habit_model_zi_test.sh +++ b/tests/habit_model_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/habit_sessions_zi_test.sh b/tests/habit_sessions_zi_test.sh index bfd2c18c1..39821fc7b 100755 --- a/tests/habit_sessions_zi_test.sh +++ b/tests/habit_sessions_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/language_selection_link_test.c b/tests/language_selection_link_test.c index be9f3b589..5144a7896 100644 --- a/tests/language_selection_link_test.c +++ b/tests/language_selection_link_test.c @@ -4,6 +4,7 @@ #include #include "app/language_selection.h" +#include "zir_string.h" static int32_t active_index; static const char *system_preference = "es_AR.UTF-8"; diff --git a/tests/language_selection_zi_test.sh b/tests/language_selection_zi_test.sh index dabe7d753..0e4a3ad5e 100644 --- a/tests/language_selection_zi_test.sh +++ b/tests/language_selection_zi_test.sh @@ -8,13 +8,13 @@ mkdir -p "$work/c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/daochi-client" \ "$root/src/app/language_selection.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/daochi-client" \ -o "$work/c" "$root/src/app/language_selection.zi" diff --git a/tests/legacy_session_zi_test.c b/tests/legacy_session_zi_test.c index de712825b..25423b93e 100644 --- a/tests/legacy_session_zi_test.c +++ b/tests/legacy_session_zi_test.c @@ -1,5 +1,6 @@ #define _GNU_SOURCE #include "storage/legacy_session.h" +#include "zir_string.h" #include "storage/legacy_session_files.h" #include "storage/legacy_session_time.h" #include "storage/legacy_session_zip.h" diff --git a/tests/lists_sharing_test.sh b/tests/lists_sharing_test.sh index bb2f9dc3c..0487d9ac5 100644 --- a/tests/lists_sharing_test.sh +++ b/tests/lists_sharing_test.sh @@ -12,8 +12,7 @@ rm -rf "$work/generated" mkdir -p "$work/generated" "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/locale_zi_test.sh b/tests/locale_zi_test.sh index 87b2139fd..52d1c8609 100644 --- a/tests/locale_zi_test.sh +++ b/tests/locale_zi_test.sh @@ -9,14 +9,14 @@ work=$root/build/locale-zi-test mkdir -p "$work/c" "$work/dropdown-c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$kryon/src/ui" \ - --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$kryon/src/backend" "$root/src/app/locale.zi" + --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" "$root/src/app/locale.zi" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$kryon/src/ui" \ - --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$kryon/src/backend" \ + --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" \ "$root/src/app/locale_dropdown.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$kryon/src/ui" \ - --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$kryon/src/backend" \ + --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" \ -o "$work/dropdown-c" "$root/src/app/locale_dropdown.zi" "${CC:-cc}" -std=c11 -I"$toolchain/include" \ -I"$work/dropdown-c" -c "$work/dropdown-c/app/locale_dropdown.c" \ @@ -24,7 +24,7 @@ mkdir -p "$work/c" "$work/dropdown-c" "$bin/zi2c" --no-main --root "$root/tests" \ --module-path "$root/src" \ --module-path "$kryon/src/ui" \ - --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$kryon/src/backend" \ + --module-path "$toolchain/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$kryon/src/backend" \ -o "$work/c" "$root/tests/locale_link_behavior.zi" mkdir -p "$work/c/app" cp "$work/c/assets.h" "$work/c/app/assets.h" diff --git a/tests/lumi_authorization_zi_test.sh b/tests/lumi_authorization_zi_test.sh index e185e023c..9a9402d13 100755 --- a/tests/lumi_authorization_zi_test.sh +++ b/tests/lumi_authorization_zi_test.sh @@ -7,8 +7,7 @@ work=${LUMI_AUTHORIZATION_TEST_OUTPUT:-"$root/build/lumi-authorization-test"} mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/lumi_connection_test.sh b/tests/lumi_connection_test.sh index 1e6bfaa04..d659790fd 100755 --- a/tests/lumi_connection_test.sh +++ b/tests/lumi_connection_test.sh @@ -11,9 +11,7 @@ export YUE_DESKTOP_RECOVERY=0 mkdir -p "$work/generated" "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "plot=$root/build/packages/plot/src" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/lumi_delegate_scope_zi_test.sh b/tests/lumi_delegate_scope_zi_test.sh index 56358c9b6..4f3b34b8a 100644 --- a/tests/lumi_delegate_scope_zi_test.sh +++ b/tests/lumi_delegate_scope_zi_test.sh @@ -12,9 +12,8 @@ unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS export YUE_DESKTOP_RECOVERY=0 "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "plot=$root/build/packages/plot/src" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" --entry lumi_delegate_scope_behavior:Check \ -o "$work/generated" "$root/tests/lumi_delegate_scope_behavior.zi" "$root/tests/sync_test_host.zi" "$root/tests/delegate_account_host.zi" diff --git a/tests/lumi_engine_test.sh b/tests/lumi_engine_test.sh index 3b0459183..8587c32ab 100644 --- a/tests/lumi_engine_test.sh +++ b/tests/lumi_engine_test.sh @@ -34,7 +34,7 @@ result=$(env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADD printf '%s\n' 'Lumi emphasis: visible bold ranges, Unicode, escapes, code and literal user messages passed' "$root/build/ziran-toolchain/bin/ziran" bundle --root "$root/tests" \ --module-path "$root/build/packages/kryon/src/ui" --define KRYON_HOSTED_UI \ - --module-path "mingcute=$root/build/packages/mingcute/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --entry lumi_reply_cache_behavior:Answer -o "$work/reply-cache.zib" \ "$root/tests/lumi_reply_cache_behavior.zi" result=$(env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \ diff --git a/tests/lumi_feedback_delivery_test.sh b/tests/lumi_feedback_delivery_test.sh index aad4542be..f82de559a 100644 --- a/tests/lumi_feedback_delivery_test.sh +++ b/tests/lumi_feedback_delivery_test.sh @@ -9,11 +9,11 @@ flock 9 unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS export YUE_DESKTOP_RECOVERY=0 mkdir -p "$work/generated" +# shellcheck disable=SC2046 "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "plot=$root/build/packages/plot/src" \ + --module-path "$root/build/packages/kss/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/lumi_narration_link_test.c b/tests/lumi_narration_link_test.c index 226b8bf9c..60d0a3538 100644 --- a/tests/lumi_narration_link_test.c +++ b/tests/lumi_narration_link_test.c @@ -1,4 +1,5 @@ #include "app/lumi_guide.h" +#include "zir_string.h" #include "assets.h" #include diff --git a/tests/lumi_narration_test.sh b/tests/lumi_narration_test.sh index 27ba19a80..7082739de 100644 --- a/tests/lumi_narration_test.sh +++ b/tests/lumi_narration_test.sh @@ -9,7 +9,7 @@ mkdir -p "$generated" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ -o "$generated" "$root/src/app/lumi_guide.zi" "${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK \ diff --git a/tests/lumi_telegram_input_zi_test.sh b/tests/lumi_telegram_input_zi_test.sh index 5561e3f33..ca4d05d3b 100644 --- a/tests/lumi_telegram_input_zi_test.sh +++ b/tests/lumi_telegram_input_zi_test.sh @@ -11,9 +11,7 @@ export YUE_DESKTOP_RECOVERY=0 mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "plot=$root/build/packages/plot/src" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/lumi_updates_test.sh b/tests/lumi_updates_test.sh index ad9d60300..9bcb5d6a9 100644 --- a/tests/lumi_updates_test.sh +++ b/tests/lumi_updates_test.sh @@ -13,11 +13,7 @@ mkdir -p "$work/generated" "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kss/src" \ - --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "qrcode=$root/build/packages/qrcode/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "plot=$root/build/packages/plot/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/media_store_zi_test.sh b/tests/media_store_zi_test.sh index f73e55b7a..153f2838c 100755 --- a/tests/media_store_zi_test.sh +++ b/tests/media_store_zi_test.sh @@ -17,7 +17,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/meditation_audio_archive_test.c b/tests/meditation_audio_archive_test.c index ec9848a1d..21a996957 100644 --- a/tests/meditation_audio_archive_test.c +++ b/tests/meditation_audio_archive_test.c @@ -1,4 +1,5 @@ #include "practices/meditation/meditation_audio_archive.h" +#include "zir_string.h" #include #include diff --git a/tests/metrics_zi_test.sh b/tests/metrics_zi_test.sh index 2084a69f1..cea954abd 100644 --- a/tests/metrics_zi_test.sh +++ b/tests/metrics_zi_test.sh @@ -7,7 +7,7 @@ work=$root/build/metrics-zi-test mkdir -p "$work/c" "$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" \ "$root/tests/metrics_link_behavior.zi" "${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK -ffunction-sections \ -fdata-sections -Wl,--gc-sections \ diff --git a/tests/music_library_link_test.c b/tests/music_library_link_test.c index 800d340c5..87ccf4523 100644 --- a/tests/music_library_link_test.c +++ b/tests/music_library_link_test.c @@ -1,4 +1,5 @@ #include "app/music_library.h" +#include "zir_string.h" #include #include diff --git a/tests/music_library_zi_test.sh b/tests/music_library_zi_test.sh index ca7096f21..4ca15d73b 100644 --- a/tests/music_library_zi_test.sh +++ b/tests/music_library_zi_test.sh @@ -9,18 +9,18 @@ mkdir -p "$work/c" "$work/stubs" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ "$root/src/app/music_library.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/src/app/music_library.zi" \ "$root/src/app/music_library_host.zi" "$bin/zi2c" --no-main --root "$root/tests" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/stubs" "$root/tests/music_library_host_stubs.zi" "${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK -ffunction-sections \ -fdata-sections -Wl,--gc-sections \ diff --git a/tests/navigation_routes_zi_test.sh b/tests/navigation_routes_zi_test.sh index 2164624d4..143b4703a 100644 --- a/tests/navigation_routes_zi_test.sh +++ b/tests/navigation_routes_zi_test.sh @@ -10,7 +10,7 @@ include=${ZIRAN_INCLUDE:-"$root/build/packages/ziran/include"} mkdir -p "$work/ir" "$bin/zi2zir" --root "$root/tests" --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/ir" "$source" for input in source saved; do @@ -29,7 +29,7 @@ for input in source saved; do "$bin/zi2zib" bundle --root "$module_root" \ --module-path "$module_path" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ --entry navigation_routes_behavior:Answer \ -o "$output/navigation_routes.zib" "$file" [ "$("$bin/zi2zib" run "$output/navigation_routes.zib")" = 42 ] @@ -37,7 +37,7 @@ for input in source saved; do "$bin/zi2c" --no-main --root "$module_root" \ --module-path "$module_path" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$output/c" "$file" cat > "$output/c/main.c" <<'C' #include "navigation_routes_behavior.h" @@ -54,7 +54,7 @@ C "$bin/zi2cpp" --no-main --root "$module_root" \ --module-path "$module_path" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$output/cpp" "$file" cat > "$output/cpp/main.cpp" <<'CPP' #include "navigation_routes_behavior.hpp" @@ -71,7 +71,7 @@ CPP "$bin/zi2go" --no-main --root "$module_root" \ --module-path "$module_path" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$output/go" "$file" cat > "$output/go/navigation_routes_behavior_test.go" <<'GO' package ziran diff --git a/tests/package_manager_host.c b/tests/package_manager_host.c index edbe58f9d..7c3489e6b 100644 --- a/tests/package_manager_host.c +++ b/tests/package_manager_host.c @@ -1,4 +1,5 @@ #include "package_manager.h" +#include "zir_string.h" #include #include #include diff --git a/tests/package_release_test.py b/tests/package_release_test.py index a8878b0a3..2f5fbc906 100644 --- a/tests/package_release_test.py +++ b/tests/package_release_test.py @@ -46,6 +46,11 @@ def main(): mapping.write_text('\n'.join(dict.fromkeys(rows)) + '\n') environment['ZIRAN_PACKAGE_MAP'] = str(mapping.resolve()) + # Dependencies are imported as PACKAGE/Module through their linked packages. + package_paths = subprocess.check_output( + ['sh', str(ROOT / 'scripts/package-paths.sh'), str(ROOT / 'build/packages')], + text=True).split()[1::2] + def generate(target, fixture, paths): if target.exists(): shutil.rmtree(target) @@ -277,7 +282,7 @@ def main(): (fixtures / "diary-bad").write_text(json.dumps(updated)) generate(work / 'generated', 'package_release_behavior.zi', [ROOT / 'src', toolchain / 'std', ROOT / 'build/packages/kryon/src/ui', - ROOT / 'build/packages/daochi-client']) + ROOT / 'build/packages/daochi-client', *package_paths]) sources = list((work / "generated").rglob("*.c")) subprocess.run([os.environ.get("CC", "cc"), "-std=c11", "-D_GNU_SOURCE", "-O1", "-ffunction-sections", "-fdata-sections", "-I" + str(work / "generated"), @@ -295,7 +300,7 @@ def main(): [ROOT / 'src', toolchain / 'std', ROOT / 'build/packages/kryon/src/ui', ROOT / 'build/packages/kryon/src/backend', ROOT / 'build/packages/daochi-client', ROOT / 'build/packages/kss/src', ROOT / 'build/packages/game2d/src', - 'oqs=' + str(ROOT / 'build/packages/oqs/src')]) + *package_paths]) # Package scoping changes generated C names, not the download API. # Bind this fixture's wrappers to the actual declared symbols. wrappers = [] diff --git a/tests/patterns_session_zi_test.sh b/tests/patterns_session_zi_test.sh index be941a149..8f16a3cb4 100644 --- a/tests/patterns_session_zi_test.sh +++ b/tests/patterns_session_zi_test.sh @@ -9,10 +9,10 @@ source=$root/tests/patterns_session_behavior.zi "$bin/zi2zir" --check-only --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" "$source" + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" "$source" "$bin/zi2c" --no-main --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" "$source" + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" -o "$work/c" "$source" cat > "$work/c/main.c" <<'C' #include "patterns_session_behavior.h" int main(void) { return Answer() == 42 ? 0 : 1; } diff --git a/tests/photos_app_behavior.zi b/tests/photos_app_behavior.zi index 205d6438d..a96b77fe5 100644 --- a/tests/photos_app_behavior.zi +++ b/tests/photos_app_behavior.zi @@ -27,8 +27,8 @@ #import, file "../src/storage/db.zi"; #import, file "../src/storage/storage_settings.zi"; #import, file "../src/cells/module_types.zi"; -#import, file "../src/cells/node_app_types.zi"; -#import, file "../src/cells/node_app_codec.zi"; +#import "apps/node_types" +#import "apps/node_codec" #import, file "../src/cells/node_apps.zi"; #import, file "../src/cells/hosted_assets.zi"; #import, file "../src/cells/media_store.zi"; diff --git a/tests/photos_app_test.sh b/tests/photos_app_test.sh index 9bf74d676..20eb01f59 100755 --- a/tests/photos_app_test.sh +++ b/tests/photos_app_test.sh @@ -17,13 +17,13 @@ flock 9 rm -rf "$work" mkdir -p "$work/generated" -"$ziran" bundle --root "$root" --module-path "$root/src" \ +"$ziran" bundle --root "$root" --module-path "$root/src" $(sh "$root/scripts/package-paths.sh" "$packages") \ --module-path "$packages/kryon/src/ui" --module-path "$packages/ziran/std" \ --define KRYON_HOSTED_UI --entry photos:Main -o "$work/photos.zib" "$root/apps/photos/photos.zi" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$packages/kryon/src/ui" \ - --module-path "$packages/kss/src" --module-path "oqs=$packages/oqs/src" --module-path "kryon=$packages/kryon/src/ui" \ + --module-path "$packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$packages") \ --module-path "$packages/kryon/src/backend" \ --module-path "$packages/game2d/src" \ --module-path "$packages/ziran/std" \ diff --git a/tests/practice_carousel_zi_test.sh b/tests/practice_carousel_zi_test.sh index 6f4bd94f2..1cfd988b3 100644 --- a/tests/practice_carousel_zi_test.sh +++ b/tests/practice_carousel_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/tests/fakes" --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/practice_narration_link_test.c b/tests/practice_narration_link_test.c index 437c5a08c..4886294a5 100644 --- a/tests/practice_narration_link_test.c +++ b/tests/practice_narration_link_test.c @@ -1,4 +1,5 @@ #include "practices/practice_narration.h" +#include "zir_string.h" #include "assets.h" #include diff --git a/tests/practice_narration_test.sh b/tests/practice_narration_test.sh index 4a9244956..a264a8fbe 100644 --- a/tests/practice_narration_test.sh +++ b/tests/practice_narration_test.sh @@ -9,7 +9,7 @@ mkdir -p "$generated" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ -o "$generated" "$root/src/practices/practice_narration.zi" "${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK \ diff --git a/tests/radio_app_test.sh b/tests/radio_app_test.sh index 857954bf6..5f6403655 100644 --- a/tests/radio_app_test.sh +++ b/tests/radio_app_test.sh @@ -6,7 +6,7 @@ standard=${2:-"$root/build/packages/ziran/std"} ui=${3:-"$root/build/packages/kryon/src/ui"} work="$root/build/radio-test" mkdir -p "$work" -"$ziran" bundle --root "$root" --module-path "$root/src" \ +"$ziran" bundle --root "$root" --module-path "$root/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$ui" --define KRYON_HOSTED_UI --module-path "$standard" \ --entry radio:Main -o "$work/radio.zib" "$root/apps/radio/radio.zi" library=${ZIRAN_LIB:-"$(dirname "$ziran")/../libziran.a"} diff --git a/tests/raylib_text_input_link_test.c b/tests/raylib_text_input_link_test.c index e8a324801..ac4aba5dd 100644 --- a/tests/raylib_text_input_link_test.c +++ b/tests/raylib_text_input_link_test.c @@ -1,4 +1,5 @@ #include "platform/raylib_text_input.h" +#include "zir_string.h" #include #include diff --git a/tests/raylib_text_input_zi_test.sh b/tests/raylib_text_input_zi_test.sh index 00c8cdd0f..67d93d970 100644 --- a/tests/raylib_text_input_zi_test.sh +++ b/tests/raylib_text_input_zi_test.sh @@ -8,11 +8,11 @@ mkdir -p "$work/c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ "$root/src/platform/raylib_text_input.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$root/src/platform/raylib_text_input.zi" "${CC:-cc}" -std=c11 -Wall -Wextra -Werror \ diff --git a/tests/route_catalog_zi_test.sh b/tests/route_catalog_zi_test.sh index 4d88ad214..7fbebfe49 100644 --- a/tests/route_catalog_zi_test.sh +++ b/tests/route_catalog_zi_test.sh @@ -10,7 +10,7 @@ ui=${KRYON_UI_DIR:-$root/build/packages/kryon/src/ui} mkdir -p "$work/ir" "$bin/zi2zir" --root "$root/tests" --module-path "$root/src" \ - --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" -o "$work/ir" "$source" + --module-path "$ui" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" -o "$work/ir" "$source" for input in source saved; do if [ "$input" = source ]; then diff --git a/tests/screenshot_arguments_host_test.c b/tests/screenshot_arguments_host_test.c index 5fb905230..3bbef640d 100644 --- a/tests/screenshot_arguments_host_test.c +++ b/tests/screenshot_arguments_host_test.c @@ -1,4 +1,5 @@ #include "screenshot_arguments.h" +#include "zir_string.h" #include "screenshot_request.h" #include "screenshot_arguments_link.h" diff --git a/tests/session_results_zi_test.sh b/tests/session_results_zi_test.sh index 5a8f68a0a..46950ceb4 100755 --- a/tests/session_results_zi_test.sh +++ b/tests/session_results_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/settings_cache_host_test.c b/tests/settings_cache_host_test.c index b0b58ef8b..edc30105f 100644 --- a/tests/settings_cache_host_test.c +++ b/tests/settings_cache_host_test.c @@ -1,4 +1,5 @@ #include "settings_store.h" +#include "zir_string.h" #include "settings_cache.h" #include diff --git a/tests/settings_key_host_test.c b/tests/settings_key_host_test.c index f570b95f6..152adb053 100644 --- a/tests/settings_key_host_test.c +++ b/tests/settings_key_host_test.c @@ -1,4 +1,5 @@ #include "settings_store.h" +#include "zir_string.h" #include #include diff --git a/tests/settings_mutation_zi_test.sh b/tests/settings_mutation_zi_test.sh index ff13110e7..7b104f4c3 100644 --- a/tests/settings_mutation_zi_test.sh +++ b/tests/settings_mutation_zi_test.sh @@ -7,7 +7,7 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM sh "$root/scripts/run-ziran.sh" "$bin/zi2c" --no-main --root "$root" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/daochi-client" \ -o "$work/c" "$root/tests/settings_mutation_behavior.zi" diff --git a/tests/settings_store_link_test.c b/tests/settings_store_link_test.c index 7a21c2434..c3eae5ba4 100644 --- a/tests/settings_store_link_test.c +++ b/tests/settings_store_link_test.c @@ -1,4 +1,5 @@ #include "settings_store_link_behavior.h" +#include "zir_string.h" #include #include diff --git a/tests/settings_telegram_ui_test.c b/tests/settings_telegram_ui_test.c index 262909dfa..31a423478 100644 --- a/tests/settings_telegram_ui_test.c +++ b/tests/settings_telegram_ui_test.c @@ -1,4 +1,5 @@ #include "screens/settings/settings_telegram.h" +#include "zir_string.h" #include "lumi_authorization.h" #include "lumi_telegram.h" #include "session.h" diff --git a/tests/settings_telegram_ui_zi_test.sh b/tests/settings_telegram_ui_zi_test.sh index e6b6b9463..032f392e9 100755 --- a/tests/settings_telegram_ui_zi_test.sh +++ b/tests/settings_telegram_ui_zi_test.sh @@ -9,11 +9,8 @@ mkdir -p "$work/c" "$bin/zi2c" --no-main --define PLATFORM_DESKTOP --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "plot=$root/build/packages/plot/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kss/src" \ - --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "qrcode=$root/build/packages/qrcode/src" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/settings_ui_link_test.c b/tests/settings_ui_link_test.c index 9e105611f..4c5f8d4ff 100644 --- a/tests/settings_ui_link_test.c +++ b/tests/settings_ui_link_test.c @@ -1,4 +1,5 @@ #include "screens/settings/settings_ui.h" +#include "zir_string.h" #include "tree.h" #include "tree_input.h" #include "paint_queue.h" diff --git a/tests/settings_ui_zi_test.sh b/tests/settings_ui_zi_test.sh index c64c87c43..4ac2a7bf5 100644 --- a/tests/settings_ui_zi_test.sh +++ b/tests/settings_ui_zi_test.sh @@ -9,13 +9,13 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM mkdir -p "$work/c" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ "$root/src/screens/settings/settings_ui.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ -o "$work/c" "$root/src/screens/settings/settings_ui.zi" @@ -30,13 +30,13 @@ env -u DISPLAY -u WAYLAND_DISPLAY "$work/test" mkdir -p "$work/device" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ "$root/src/screens/settings/settings_device.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ -o "$work/device" "$root/src/screens/settings/settings_device.zi" @@ -47,13 +47,13 @@ mkdir -p "$work/device" mkdir -p "$work/breaks" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ "$root/src/screens/settings/settings_breaks.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ -o "$work/breaks" "$root/src/screens/settings/settings_breaks.zi" @@ -64,13 +64,13 @@ mkdir -p "$work/breaks" mkdir -p "$work/notifications" "$bin/zi2zir" --check-only --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ "$root/src/screens/settings/settings_notifications.zi" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ -o "$work/notifications" \ diff --git a/tests/statistics_date_zi_test.sh b/tests/statistics_date_zi_test.sh index 9b491a903..633f6da88 100755 --- a/tests/statistics_date_zi_test.sh +++ b/tests/statistics_date_zi_test.sh @@ -10,7 +10,7 @@ source=$root/tests/statistics_date_behavior.zi "$bin/ziran" bundle --root "$root" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ --entry statistics_date_behavior:Answer \ -o "$work/date.zib" "$source" test "$("$bin/ziran" run "$work/date.zib")" = 42 @@ -18,7 +18,7 @@ test "$("$bin/ziran" run "$work/date.zib")" = 42 "$bin/zi2c" --no-main --root "$root" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/c" "$source" cat > "$work/c/main.c" <<'C' #include "statistics_date_behavior.h" diff --git a/tests/storage_delegate_zi_test.sh b/tests/storage_delegate_zi_test.sh index bac6d6aba..6dd670c70 100644 --- a/tests/storage_delegate_zi_test.sh +++ b/tests/storage_delegate_zi_test.sh @@ -10,8 +10,7 @@ mkdir -p "$work/generated" --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kss/src" \ - --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/storage_habits_zi_test.sh b/tests/storage_habits_zi_test.sh index 9d7aa8e28..a720b9727 100755 --- a/tests/storage_habits_zi_test.sh +++ b/tests/storage_habits_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/storage_import_zi_test.sh b/tests/storage_import_zi_test.sh index 29baeab6e..fc11defb1 100755 --- a/tests/storage_import_zi_test.sh +++ b/tests/storage_import_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/storage_more_zi_test.sh b/tests/storage_more_zi_test.sh index 429282292..ce6c33352 100755 --- a/tests/storage_more_zi_test.sh +++ b/tests/storage_more_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/storage_paths_scenarios_zi_test.sh b/tests/storage_paths_scenarios_zi_test.sh index 4e908eec7..6b9de3ce5 100755 --- a/tests/storage_paths_scenarios_zi_test.sh +++ b/tests/storage_paths_scenarios_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/storage_paths_zi_test.sh b/tests/storage_paths_zi_test.sh index f3f6e9c7a..39d5e23a3 100644 --- a/tests/storage_paths_zi_test.sh +++ b/tests/storage_paths_zi_test.sh @@ -8,7 +8,7 @@ mkdir -p "$work/generated" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/ziran/std" \ - --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/generated" "$root/src/storage/paths.zi" "${CC:-cc}" -std=c11 -O0 -Wall -Wextra -Werror \ diff --git a/tests/storage_settings_threads_zi_test.sh b/tests/storage_settings_threads_zi_test.sh index 9fe40046e..e68f2454d 100755 --- a/tests/storage_settings_threads_zi_test.sh +++ b/tests/storage_settings_threads_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/storage_sync_zi_test.sh b/tests/storage_sync_zi_test.sh index f7b3c354e..cd84831c2 100755 --- a/tests/storage_sync_zi_test.sh +++ b/tests/storage_sync_zi_test.sh @@ -18,7 +18,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/style_apply_link_test.c b/tests/style_apply_link_test.c index 85f454881..5ab5465fb 100644 --- a/tests/style_apply_link_test.c +++ b/tests/style_apply_link_test.c @@ -1,5 +1,6 @@ #define _POSIX_C_SOURCE 200809L #include "style_apply_link_behavior.h" +#include "zir_string.h" #include #include diff --git a/tests/style_apply_zi_test.sh b/tests/style_apply_zi_test.sh index b22b30ba4..cb1ac5104 100644 --- a/tests/style_apply_zi_test.sh +++ b/tests/style_apply_zi_test.sh @@ -10,7 +10,7 @@ mkdir -p "$work/c" --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/tests/style_apply_link_behavior.zi" mkdir -p "$work/c/app" cp "$work/c/assets.h" "$work/c/app/assets.h" diff --git a/tests/sync_account_zi_test.sh b/tests/sync_account_zi_test.sh index 224dd73a3..677ac726a 100755 --- a/tests/sync_account_zi_test.sh +++ b/tests/sync_account_zi_test.sh @@ -14,7 +14,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/sync_recovery_zi_test.sh b/tests/sync_recovery_zi_test.sh index 40c136d90..6e65b15d3 100644 --- a/tests/sync_recovery_zi_test.sh +++ b/tests/sync_recovery_zi_test.sh @@ -13,12 +13,11 @@ rm -rf "$work" mkdir -p "$work/c" "$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \ --module-path "$root/build/packages/ziran/std" \ - --module-path "self=$root/build/packages/self/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ - --module-path "qrcode=$root/build/packages/qrcode/src" \ --module-path "$root/build/packages/daochi-client" \ -o "$work/c" "$root/tests/sync_recovery_behavior.zi" "${CC:-cc}" -std=gnu11 -w -DZIRAN_BOUNDS_CHECK -ffunction-sections \ diff --git a/tests/sync_review_zi_test.sh b/tests/sync_review_zi_test.sh index 0a03166b5..6e0a100cb 100755 --- a/tests/sync_review_zi_test.sh +++ b/tests/sync_review_zi_test.sh @@ -11,7 +11,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/sync_safety_zi_test.sh b/tests/sync_safety_zi_test.sh index c2a51b30b..1635a2187 100644 --- a/tests/sync_safety_zi_test.sh +++ b/tests/sync_safety_zi_test.sh @@ -68,7 +68,7 @@ cmp "$work/source/safety.zib" "$work/saved/safety.zib" "$bin/zi2c" --no-main --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" --module-path "$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \ -o "$work/native" "$root/src/app/sync_safety.zi" "${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK \ -ffunction-sections -fdata-sections -Wl,--gc-sections \ diff --git a/tests/sync_server_zi_test.sh b/tests/sync_server_zi_test.sh index bab889517..8fd104253 100755 --- a/tests/sync_server_zi_test.sh +++ b/tests/sync_server_zi_test.sh @@ -17,7 +17,7 @@ mkdir -p "$work/generated" "$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/sync_url_zi_test.sh b/tests/sync_url_zi_test.sh index 2ee0441f7..84902cff9 100755 --- a/tests/sync_url_zi_test.sh +++ b/tests/sync_url_zi_test.sh @@ -7,7 +7,7 @@ work=$root/build/sync-url-zi-test mkdir -p "$work" "$ziran" bundle --root "$root/tests" \ - --module-path "$root/build/packages/daochi-client" --module-path "oqs=$root/build/packages/oqs/src" \ + --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/ziran/std" \ --entry sync_url_behavior:Check \ -o "$work/sync_url.zib" "$root/tests/sync_url_behavior.zi" diff --git a/tests/telegram_account_flow_zi_test.sh b/tests/telegram_account_flow_zi_test.sh index 16364f897..3666205a2 100755 --- a/tests/telegram_account_flow_zi_test.sh +++ b/tests/telegram_account_flow_zi_test.sh @@ -11,9 +11,8 @@ export YUE_DESKTOP_RECOVERY=0 --module-path "$root/tests/flow_fake" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" \ - --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "qrcode=$root/build/packages/qrcode/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/game2d/src" --module-path "$root/build/packages/ziran/std" \ --module-path "$root/build/packages/daochi-client" --entry telegram_account_flow_behavior:Check \ -o "$work/generated" "$root/tests/telegram_account_flow_behavior.zi" \ diff --git a/tests/telegram_account_ui_test.c b/tests/telegram_account_ui_test.c index c442a8afd..f3d1b731f 100644 --- a/tests/telegram_account_ui_test.c +++ b/tests/telegram_account_ui_test.c @@ -1,4 +1,5 @@ #include "screens/telegram_account.h" +#include "zir_string.h" #include "session.h" #include "tree.h" #include "tree_input.h" diff --git a/tests/telegram_account_ui_zi_test.sh b/tests/telegram_account_ui_zi_test.sh index cf577dad9..2a8e6558e 100755 --- a/tests/telegram_account_ui_zi_test.sh +++ b/tests/telegram_account_ui_zi_test.sh @@ -7,8 +7,8 @@ mkdir -p "$work/c" "$bin/zi2c" --no-main --define PLATFORM_DESKTOP --root "$root/src" \ --module-path "$root/build/packages/kryon/src/ui" \ --module-path "$root/build/packages/kryon/src/backend" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" \ + $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ + --module-path "$root/build/packages/kss/src" \ --module-path "$root/build/packages/daochi-client" \ --module-path "$root/build/packages/ziran/std" \ -o "$work/c" "$root/src/screens/telegram_account.zi" diff --git a/tests/telegram_entry_protocol_zi_test.sh b/tests/telegram_entry_protocol_zi_test.sh index d44600f16..77a01a80c 100755 --- a/tests/telegram_entry_protocol_zi_test.sh +++ b/tests/telegram_entry_protocol_zi_test.sh @@ -9,8 +9,7 @@ unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS export YUE_DESKTOP_RECOVERY=0 "$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \ --module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" \ - --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/game2d/src" \ --module-path "$root/build/packages/ziran/std" \ diff --git a/tests/text_buffers_link_test.c b/tests/text_buffers_link_test.c index e62d7cc5d..76fef8f16 100644 --- a/tests/text_buffers_link_test.c +++ b/tests/text_buffers_link_test.c @@ -1,4 +1,5 @@ #include "app/text_buffers.h" +#include "zir_string.h" #include #include diff --git a/tests/theme_catalog_zi_test.sh b/tests/theme_catalog_zi_test.sh index 8f65adc23..3713ba425 100644 --- a/tests/theme_catalog_zi_test.sh +++ b/tests/theme_catalog_zi_test.sh @@ -9,7 +9,7 @@ mkdir -p "$work/c" "$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \ --module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" --module-path "$root/build/packages/kryon/src/backend" \ --module-path "$root/build/packages/kryon/src/ui" \ - --module-path "$root/build/packages/kss/src" --module-path "oqs=$root/build/packages/oqs/src" --module-path "kryon=$root/build/packages/kryon/src/ui" --module-path "kryon=$root/build/packages/kryon/src/backend" \ + --module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \ -o "$work/c" "$root/tests/theme_catalog_link_behavior.zi" mkdir -p "$work/c/app" cp "$work/c/assets.h" "$work/c/app/assets.h" diff --git a/tests/update_flow_zi_test.py b/tests/update_flow_zi_test.py index bbb7bf29e..b3972b355 100644 --- a/tests/update_flow_zi_test.py +++ b/tests/update_flow_zi_test.py @@ -78,10 +78,9 @@ def build_probe(work, compiler, env): "--root", "tests", "--module-path", "src", "--module-path", "build/packages/kryon/src/ui", "--module-path", "build/packages/kss/src", - "--module-path", "kryon=build/packages/kryon/src/ui", + *subprocess.check_output(["sh", "scripts/package-paths.sh"], cwd=ROOT, text=True).split(), "--module-path", "build/packages/kryon/src/backend", "--module-path", "build/packages/ziran/std", - "--module-path", "oqs=build/packages/oqs/src", "--module-path", "build/packages/daochi-client", "-o", str(output), "tests/update_flow_probe.zi", ], cwd=ROOT, check=True, env=env) diff --git a/ziran.lock b/ziran.lock index 8c9bcd678..90e8e16ff 100644 --- a/ziran.lock +++ b/ziran.lock @@ -11,23 +11,30 @@ "url": "https://github.com/raysan5/rini.git" }, { - "commit": "d8f6cc7ea400c3b71cc1d72c1b900206cc009329", - "dependencies": {}, - "id": "p151b83a361c86f2d", - "name": "sqlite", + "commit": "aa1281eba2ed3adc93308e0a80196e32683e7a0b", + "dependencies": {"kryon": "p7ae5fbb4f3ddc252"}, + "id": "p0a9cefe423582025", + "name": "plot", "ref": "master", - "source": true, - "url": "https://github.com/sqlite/sqlite.git" + "url": "https://github.com/kryonlabs/plot.git" }, { - "commit": "ab2b16dd619ad5f6979a4fbe69cfa324a6fcc35f", + "commit": "d1895c3799005122b2e68f47f442cc5ba709d866", "dependencies": {}, - "id": "p2ff634c7b007140d", + "id": "p0bd527640057f7d4", "name": "monocypher", "ref": "master", "source": true, "url": "https://github.com/LoupVaillant/Monocypher.git" }, + { + "commit": "756b163cdb3602081596e50afbac9dad9b07f550", + "dependencies": {"crypto": "p7a547cc31d71f0e5", "kryon": "p7ae5fbb4f3ddc252"}, + "id": "p3124a9c7e1d54b7f", + "name": "Apps", + "ref": "master", + "url": "https://github.com/waozixyz/apps.git" + }, { "commit": "5cc7677b290f0448462410f7c7e85f518664b943", "dependencies": {"liboqs": "pfb3df7cb222b1bdc"}, @@ -55,23 +62,31 @@ }, { "commit": "e9410df5b4ebd23b7e049db8a00742bf6930478c", - "dependencies": {"daochi_client": "p96e1f539ccb91af5", "kryon": "p65ebdb75153a8b8b", "monocypher": "p2ff634c7b007140d", "qrcode": "pf0ce9cea355c9228"}, + "dependencies": {"daochi_client": "p96e1f539ccb91af5", "kryon": "p7ae5fbb4f3ddc252", "monocypher": "p0bd527640057f7d4", "qrcode": "pf0ce9cea355c9228"}, "id": "p631e0098a83ae5d4", "name": "Self", "ref": "master", "url": "https://github.com/waozixyz/self.git" }, { - "commit": "0f48864b264367526ad6699151eecb5bf89d910d", + "commit": "187f59dfa2df8c60455fd7ce35afb85204e49acb", + "dependencies": {}, + "id": "p7a547cc31d71f0e5", + "name": "crypto", + "ref": "master", + "url": "https://github.com/ziranlang/crypto.git" + }, + { + "commit": "3288f4faa006ce10f8574453cb8dd7e1d65e43fe", "dependencies": {"raylib": "p5a77c9c35110e925"}, - "id": "p65ebdb75153a8b8b", + "id": "p7ae5fbb4f3ddc252", "name": "kryon", "ref": "master", "url": "https://github.com/kryonlabs/kryon.git" }, { "commit": "41538659afbbda300915ef009b55c18f6de159b8", - "dependencies": {"kryon": "p65ebdb75153a8b8b"}, + "dependencies": {"kryon": "p7ae5fbb4f3ddc252"}, "id": "p9504fb8e5fabefc6", "name": "Kss", "ref": "master", @@ -85,31 +100,32 @@ "ref": "master", "url": "https://github.com/ziranlang/daochi-client.git" }, - { - "commit": "2ee29338c9b93fb4f4a56a49c7be09e9d2c2418f", - "dependencies": {"kryon": "p65ebdb75153a8b8b"}, - "id": "pa5dd7b8b83307b18", - "name": "plot", - "ref": "master", - "url": "https://github.com/kryonlabs/plot.git" - }, { "commit": "7aa01465ac3f988e0404f3c6dc244bf4b009f253", - "dependencies": {"kryon": "p65ebdb75153a8b8b"}, + "dependencies": {"kryon": "p7ae5fbb4f3ddc252"}, "id": "paa08e1730a25bda0", "name": "Game2D", "ref": "master", "url": "https://github.com/kryonlabs/game2d.git" }, { - "commit": "bb837dda23ed4df77a9bbeaefd69c8cd9b6e4915", + "commit": "9ef1a3a130450d603abd029772422abd40cfcde0", "dependencies": {}, - "id": "pc4b263336680098b", + "id": "pd4bcd11b7d623073", "name": "curl", "ref": "master", "source": true, "url": "https://github.com/curl/curl.git" }, + { + "commit": "58626f682afbc2e3467e8c2e5b37f7f29d89ed99", + "dependencies": {}, + "id": "peaa43c4b7ef72edf", + "name": "sqlite", + "ref": "master", + "source": true, + "url": "https://github.com/sqlite/sqlite.git" + }, { "commit": "51fa84aedaa6ae4f6734e0fcca9bfc35a184d297", "dependencies": {}, @@ -129,11 +145,11 @@ } ], "root": { - "dependencies": {"curl": "pc4b263336680098b", "daochi_client": "p96e1f539ccb91af5", "game2d": "paa08e1730a25bda0", "kryon": "p65ebdb75153a8b8b", "kss": "p9504fb8e5fabefc6", "liboqs": "pfb3df7cb222b1bdc", "mingcute": "p56788fa3dab3e73a", "monocypher": "p2ff634c7b007140d", "oqs": "p55635fc8976895a9", "plot": "pa5dd7b8b83307b18", "qrcode": "pf0ce9cea355c9228", "rini": "p09fa77e94b0dfc6c", "self": "p631e0098a83ae5d4", "sqlite": "p151b83a361c86f2d"}, + "dependencies": {"apps": "p3124a9c7e1d54b7f", "crypto": "p7a547cc31d71f0e5", "curl": "pd4bcd11b7d623073", "daochi_client": "p96e1f539ccb91af5", "game2d": "paa08e1730a25bda0", "kryon": "p7ae5fbb4f3ddc252", "kss": "p9504fb8e5fabefc6", "liboqs": "pfb3df7cb222b1bdc", "mingcute": "p56788fa3dab3e73a", "monocypher": "p0bd527640057f7d4", "oqs": "p55635fc8976895a9", "plot": "p0a9cefe423582025", "qrcode": "pf0ce9cea355c9228", "rini": "p09fa77e94b0dfc6c", "self": "p631e0098a83ae5d4", "sqlite": "peaa43c4b7ef72edf"}, "name": "Inbe" }, "toolchain": { - "commit": "28c331e3a4095a45388fecdff44698aae05ebed5", + "commit": "5a0a29ce0dc83bc347148316286813d2910905d7", "ref": "master", "url": "https://github.com/ziranlang/ziran.git" } diff --git a/ziran.toml b/ziran.toml index 8239a1e3e..1e2d6027c 100644 --- a/ziran.toml +++ b/ziran.toml @@ -3,11 +3,6 @@ name = "Inbe" entry = "src/main.zi" module_roots = ["src", "src/cells"] -[exports] -module_types = "src/cells/module_types.zi" -node_app_types = "src/cells/node_app_types.zi" -node_app_codec = "src/cells/node_app_codec.zi" - [toolchain] git = "https://github.com/ziranlang/ziran.git" ref = "master" @@ -72,3 +67,11 @@ ref = "master" [dependencies.self] git = "https://github.com/waozixyz/self.git" ref = "master" + +[dependencies.crypto] +git = "https://github.com/ziranlang/crypto.git" +ref = "master" + +[dependencies.apps] +git = "https://github.com/waozixyz/apps.git" +ref = "master"