From 0d8ddc29ed60f2ff336892e05967a5b5d41ffecc Mon Sep 17 00:00:00 2001 From: Waozi Date: Sun, 18 Oct 2026 22:33:13 -0300 Subject: [PATCH] Export Plot from its own Plot/module.zi plot/Plot now resolves by its file in builds that name --module-path plot=DIR as well as in projects, like PlotWidget. --- README.md | 4 +++- src/{ => Plot}/module.zi | 0 src/app.zi | 2 +- ziran.toml | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) rename src/{ => Plot}/module.zi (100%) diff --git a/README.md b/README.md index c8f237c..b38e0b0 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ Install the Ziran launcher once with `make install-user` in Ziran, then run `ziran fetch` and `make build` here. `make run` opens a small demo on the Cairo backend; `make check` checks the source and runs the nonvisual indicator test. The checked-in `ziran.lock` pins both Ziran and Kryon to exact commits. Plot -exports `src/module.zi` for other packages. That module re-exports Plot's +exports `src/Plot/module.zi` for other packages, so `plot/Plot` resolves by +its file both in projects and in builds that name `--module-path plot=DIR`. +That module re-exports Plot's charts and Kryon's public UI surface; app code can use `using Charts :: #import "Plot";`. diff --git a/src/module.zi b/src/Plot/module.zi similarity index 100% rename from src/module.zi rename to src/Plot/module.zi diff --git a/src/app.zi b/src/app.zi index 47fe604..5ea3a22 100644 --- a/src/app.zi +++ b/src/app.zi @@ -1,4 +1,4 @@ -using Charts :: #import "module"; +using Charts :: #import "Plot"; #program_export Frame :: (session: Session, viewport: Rectangle) -> s32 { diff --git a/ziran.toml b/ziran.toml index 7f0429b..6354a8b 100644 --- a/ziran.toml +++ b/ziran.toml @@ -14,8 +14,8 @@ ref = "master" [exports] # Public module is Plot; the lowercase export is retained for older imports. -plot = "src/module.zi" -Plot = "src/module.zi" +plot = "src/Plot/module.zi" +Plot = "src/Plot/module.zi" # The chart surface alone, for apps that draw their own series. PlotWidget = "src/PlotWidget/module.zi"