Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions logos-calc-ui-cpp/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
description = "Calculator C++ UI plugin for Logos - QML view with process-isolated backend for calc_module";

inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
logos-app-builder.url = "github:logos-co/logos-app-builder";
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";
};

outputs = inputs@{ logos-module-builder, calc_module, ... }:
logos-module-builder.lib.mkLogosQmlModule {
outputs = inputs@{ logos-app-builder, calc_module, ... }:
logos-app-builder.lib.mkLogosQmlModule {
Comment on lines 4 to +10
src = ./.;
configFile = ./metadata.json;
flakeInputs = inputs;
Expand Down
6 changes: 3 additions & 3 deletions logos-calc-ui/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
description = "Calculator QML UI Plugin for Logos - frontend for calc_module";

inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
logos-app-builder.url = "github:logos-co/logos-app-builder";
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";
};

outputs = inputs@{ logos-module-builder, ... }:
logos-module-builder.lib.mkLogosQmlModule {
outputs = inputs@{ logos-app-builder, ... }:
logos-app-builder.lib.mkLogosQmlModule {
Comment on lines 4 to +10
src = ./.;
configFile = ./metadata.json;
flakeInputs = inputs;
Expand Down
23 changes: 12 additions & 11 deletions logos-developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ nix build .#lgx-portable

This produces a `my_module-<version>.lgx` file in the `result/` directory.

This works because `logos-module-builder` includes `nix-bundle-lgx` as its own dependency and both `mkLogosModule` and `mkLogosQmlModule` automatically create the `lgx` and `lgx-portable` package outputs. No extra configuration is needed — it is part of the standard module template:
This works because both `logos-module-builder` and `logos-app-builder` include `nix-bundle-lgx` as a dependency, and `mkLogosModule` / `mkLogosQmlModule` automatically create the `lgx` and `lgx-portable` package outputs. No extra configuration is needed — it is part of the standard module template:

```nix
{
Expand Down Expand Up @@ -1026,7 +1026,8 @@ When your module is installed via `lgpm`, its dependencies are automatically res

| Repository | What It Provides | Key Outputs |
| -------------------------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------- |
| [logos-module-builder](https://github.com/logos-co/logos-module-builder) | Build system / scaffolding | `mkLogosModule`, `mkLogosQmlModule` Nix functions, `LogosModule.cmake`, templates |
| [logos-module-builder](https://github.com/logos-co/logos-module-builder) | Core module build system | `mkLogosModule`, `buildCppPlugin` Nix functions, `LogosModule.cmake`, templates |
| [logos-app-builder](https://github.com/logos-co/logos-app-builder) | UI/app build system | `mkLogosQmlModule`, `mkLogosApp` Nix functions, UI templates |
| [logos-module](https://github.com/logos-co/logos-module) | Plugin introspection | `liblogos_module.a` (static lib), `lm` (CLI) |
| [logos-cpp-sdk](https://github.com/logos-co/logos-cpp-sdk) | SDK + code generator | `LogosAPI`, `LogosResult`, `logos-cpp-generator`, `PluginInterface` |
| [logos-liblogos](https://github.com/logos-co/logos-liblogos) | Core library | `logos_host`, `liblogos_core` |
Expand Down Expand Up @@ -1166,7 +1167,7 @@ When running a UI module with `nix run`, the standalone app automatically bundle

**Requirements for auto-bundled dependencies:**

1. **Module type must be `"ui"` or use `mkLogosQmlModule`** — only UI modules get `apps.default` wired up with the standalone app.
1. **Module type must be `"ui"` or use `mkLogosQmlModule` (from `logos-app-builder`)** — only UI modules get `apps.default` wired up with the standalone app.

2. **Dependencies must be listed in `metadata.json`** under the `"dependencies"` array:

Expand All @@ -1192,8 +1193,8 @@ When running a UI module with `nix run`, the standalone app automatically bundle

**What changed (no more `logos-standalone-app` input):**

- `logos-standalone-app` is now bundled inside `logos-module-builder` — UI module flakes no longer need it as a separate input.
- No `logosStandalone` parameter is needed in `mkLogosQmlModule`, `mkLogosModule`, or `mkLogosQmlModule` calls.
- `logos-standalone-app` is bundled inside `logos-app-builder` — UI module flakes no longer need it as a separate input.
- No `logosStandalone` parameter is needed in `mkLogosQmlModule` or `mkLogosApp` calls.
- Dependencies (including transitive ones) are automatically resolved from the flake input tree, bundled as LGX packages at build time, and extracted into the modules directory at runtime.
- The standalone app uses `logos_core_load_plugin_with_dependencies()` which resolves the full transitive dependency graph via metadata.json files.

Expand All @@ -1203,11 +1204,11 @@ When running a UI module with `nix run`, the standalone app automatically bundle
{
description = "My UI module";
inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
logos-app-builder.url = "github:logos-co/logos-app-builder";
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";
};
outputs = inputs@{ logos-module-builder, ... }:
logos-module-builder.lib.mkLogosQmlModule {
outputs = inputs@{ logos-app-builder, ... }:
logos-app-builder.lib.mkLogosQmlModule {
src = ./.;
configFile = ./metadata.json;
flakeInputs = inputs;
Expand All @@ -1221,11 +1222,11 @@ When running a UI module with `nix run`, the standalone app automatically bundle
{
description = "My QML UI module";
inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
logos-app-builder.url = "github:logos-co/logos-app-builder";
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";
};
outputs = inputs@{ logos-module-builder, ... }:
logos-module-builder.lib.mkLogosQmlModule {
outputs = inputs@{ logos-app-builder, ... }:
logos-app-builder.lib.mkLogosQmlModule {
src = ./.;
configFile = ./metadata.json;
flakeInputs = inputs;
Expand Down
12 changes: 6 additions & 6 deletions tutorial-cpp-ui-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The `.rep` file declares the interface. At build time, Qt's `repc` compiler gene

```bash
mkdir logos-calc-ui-cpp && cd logos-calc-ui-cpp
nix flake init -t github:logos-co/logos-module-builder#ui-qml-backend
nix flake init -t github:logos-co/logos-app-builder#ui-qml-backend
git init && git add -A
```

Expand Down Expand Up @@ -418,7 +418,7 @@ Key patterns:
description = "Calculator C++ UI plugin — QML view with process-isolated backend";

inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
logos-app-builder.url = "github:logos-co/logos-app-builder";

# Option A: point to a remote repo (for CI or when calc_module is published)
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";
Expand All @@ -427,8 +427,8 @@ Key patterns:
# calc_module.url = "path:../logos-calc-module";
};

outputs = inputs@{ logos-module-builder, ... }:
logos-module-builder.lib.mkLogosQmlModule {
outputs = inputs@{ logos-app-builder, ... }:
logos-app-builder.lib.mkLogosQmlModule {
src = ./.;
configFile = ./metadata.json;
flakeInputs = inputs;
Expand All @@ -443,7 +443,7 @@ The `calc_module` input attribute name must match the dependency name in `metada

> **Important:** Whichever URL scheme you use, `calc_module` must be built with its shared library (`.so` on Linux, `.dylib` on macOS) present in `lib/`. If it's missing, the nix build will fail with linker errors. See [Part 1, Step 1.5](tutorial-wrapping-c-library.md#15-build-the-shared-library).

`mkLogosQmlModule` handles everything: compiles the C++ backend (because `main` is set), bundles the QML view, generates LGX packages, and wires up `nix run`.
`mkLogosQmlModule` (from `logos-app-builder`) handles everything: compiles the C++ backend (because `main` is set), bundles the QML view, generates LGX packages, and wires up `nix run`.

---

Expand Down Expand Up @@ -490,7 +490,7 @@ nix run --override-input calc_module path:../logos-calc-module

## Step 10: UI Integration Tests (Optional)

Add automated UI tests using the [logos-qt-mcp](https://github.com/logos-co/logos-qt-mcp) test framework. Just create `.mjs` files in `tests/` and `logos-module-builder` auto-wires `nix build .#integration-test`.
Add automated UI tests using the [logos-qt-mcp](https://github.com/logos-co/logos-qt-mcp) test framework. Just create `.mjs` files in `tests/` and `logos-app-builder` auto-wires `nix build .#integration-test`.

Create `tests/ui-tests.mjs`:

Expand Down
16 changes: 8 additions & 8 deletions tutorial-qml-ui-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Key points:

## Step 1: Scaffold

Use the QML module template from `logos-module-builder`:
Use the QML module template from `logos-app-builder`:

```bash
mkdir logos-calc-ui && cd logos-calc-ui
nix flake init -t github:logos-co/logos-module-builder#ui-qml
nix flake init -t github:logos-co/logos-app-builder#ui-qml
git init && git add -A
```

> **Note:** The generated `flake.nix` uses an unpinned `logos-module-builder` URL. Replace it with the pinned version shown in [Step 4](#step-4-update-flakenix) to ensure reproducible builds.
> **Note:** The generated `flake.nix` uses an unpinned `logos-app-builder` URL. Replace it with the pinned version shown in [Step 4](#step-4-update-flakenix) to ensure reproducible builds.

This gives you:

Expand Down Expand Up @@ -322,7 +322,7 @@ The template already has everything wired up. Update the description and add `ca
description = "Calculator QML UI Plugin for Logos - frontend for calc_module";

inputs = {
logos-module-builder.url = "github:logos-co/logos-module-builder";
logos-app-builder.url = "github:logos-co/logos-app-builder";

# Option A: point to a remote repo (for CI or when calc_module is published)
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";
Expand All @@ -331,8 +331,8 @@ The template already has everything wired up. Update the description and add `ca
# calc_module.url = "path:../logos-calc-module";
};

outputs = inputs@{ logos-module-builder, ... }:
logos-module-builder.lib.mkLogosQmlModule {
outputs = inputs@{ logos-app-builder, ... }:
logos-app-builder.lib.mkLogosQmlModule {
src = ./.;
configFile = ./metadata.json;
flakeInputs = inputs;
Expand All @@ -349,7 +349,7 @@ The `calc_module.url` can be either:

> **Important:** Whichever URL scheme you use, `calc_module` must be built with its shared library (`.so` on Linux, `.dylib` on macOS) present in `lib/`. If the library is missing, the nix build will fail with linker errors. See [Part 1, Step 1.5](tutorial-wrapping-c-library.md#15-build-the-shared-library) for build instructions.

`mkLogosQmlModule` handles everything — it stages QML files, metadata, and icons into a plugin directory, bundles all module dependencies (direct and transitive) from their LGX packages, and automatically wires up `apps.default` so `nix run .` launches the UI in a standalone window with all required backend modules self-contained. `flakeInputs = inputs` passes all inputs so that dependencies declared in `metadata.json` are resolved automatically.
`mkLogosQmlModule` (from `logos-app-builder`) handles everything — it stages QML files, metadata, and icons into a plugin directory, bundles all module dependencies (direct and transitive) from their LGX packages, and automatically wires up `apps.default` so `nix run .` launches the UI in a standalone window with all required backend modules self-contained. `flakeInputs = inputs` passes all inputs so that dependencies declared in `metadata.json` are resolved automatically.

> **Tip:** Even if `flake.nix` uses a `github:` URL, you can override it at build time with `--override-input calc_module path:../logos-calc-module` to use your local checkout without editing `flake.nix`. This is covered in [Step 5.2](#52-full-functionality-with-modules).

Expand Down Expand Up @@ -654,7 +654,7 @@ qml6 Main.qml

## Step 8: UI Integration Tests (Optional)

You can add automated UI tests that verify your QML plugin renders correctly. The test infrastructure is built into `logos-module-builder` — just add `.mjs` test files to a `tests/` directory and you get `nix build .#integration-test` for free.
You can add automated UI tests that verify your QML plugin renders correctly. The test infrastructure is built into `logos-app-builder` — just add `.mjs` test files to a `tests/` directory and you get `nix build .#integration-test` for free.

Tests use the [logos-qt-mcp](https://github.com/logos-co/logos-qt-mcp) test framework, which connects to the QML inspector inside `logos-standalone-app` and can find elements, click buttons, verify text, and take screenshots.

Expand Down