|
1 | 1 | # libnativeapi workspace |
2 | 2 |
|
3 | | -This is the workspace repo (`libnativeapi/nativeapi`, formerly `nativeapi-flutter` and `nativeapi-workspace`) for the [libnativeapi](https://github.com/libnativeapi) project family. Every binding (`bindings/dart/`, `bindings/rust/`, `bindings/csharp/`, `bindings/js/`, `bindings/python/`, `bindings/go/`), the code generator (`tools/codegen/`), the `./codegen` script, the specs and the shared tooling live directly in this repo (the Rust and C# histories were merged in from `nativeapi-rust` and `nativeapi-csharp`); only `core/` and the leanflutter packages under `bindings/dart/` (`tray_manager/`, `screen_retriever/`, `window_manager/`, `clipboard_watcher/`) are git submodules of independent repositories. Work inside a submodule is committed and pushed from that subdirectory; everything else is committed here. |
| 3 | +This is the workspace repo (`libnativeapi/nativeapi`, formerly `nativeapi-flutter` and `nativeapi-workspace`) for the [libnativeapi](https://github.com/libnativeapi) project family. Every binding (`bindings/dart/`, `bindings/rust/`, `bindings/csharp/`, `bindings/js/`, `bindings/python/`, `bindings/go/`), the code generator (`tools/codegen/`), the `./codegen` script, the specs and the shared tooling live directly in this repo (the Rust and C# histories were merged in from `nativeapi-rust` and `nativeapi-csharp`); only `core/` and the leanflutter packages under `bindings/dart/` (`tray_manager/`, `screen_retriever/`, `window_manager/`) are git submodules of independent repositories. Work inside a submodule is committed and pushed from that subdirectory; everything else is committed here. |
4 | 4 |
|
5 | 5 | ## Layout |
6 | 6 |
|
7 | 7 | ``` |
8 | 8 | core/ # submodule: nativeapi-core — the C++ core library |
9 | 9 | bindings/ |
10 | | -├── dart/ # the Dart binding: nativeapi/, cnativeapi/, nativeapi_flutter/; tray_manager/, screen_retriever/, window_manager/, clipboard_watcher/ (submodules of the leanflutter repos of the same names) |
| 10 | +├── dart/ # the Dart binding: nativeapi/, cnativeapi/, nativeapi_flutter/; tray_manager/, screen_retriever/, window_manager/ (submodules of the leanflutter repos of the same names) |
11 | 11 | ├── rust/ # the Rust binding: crates/{nativeapi,cnativeapi} |
12 | 12 | ├── csharp/ # the C# binding: src/, tests/, NativeAPI.slnx |
13 | 13 | ├── js/ # the JS/TS binding: a Node-API addon (src/) + TypeScript (lib/) |
@@ -109,7 +109,7 @@ scenarios for *this project's* examples live in [tools/gui/](tools/gui/README.md |
109 | 109 | ## Conventions |
110 | 110 |
|
111 | 111 | - `core` tracks `branch = main`. Use `make sync` to fast-forward it; `make status` to see dirty state everywhere; `make bump` to stage its pointer. |
112 | | -- The leanflutter packages built on nativeapi (`tray_manager`, `window_manager`, `launch_at_startup`, …) live in their own repos under github.com/leanflutter and depend on the published `nativeapi`. Some ride along as submodules under `bindings/dart/<package>` (tracking `main`): `tray_manager`, `screen_retriever`, `window_manager` and `clipboard_watcher` so far. They are not members of the root pub workspace, melos ignores them (add the path to `ignore` in the root `pubspec.yaml`), and CI does not check them out. To try one against local changes, point a `dependency_overrides` entry in that package at `bindings/dart/nativeapi_flutter` (and `nativeapi`, `cnativeapi`) and never commit the override. |
| 112 | +- The leanflutter packages built on nativeapi (`tray_manager`, `window_manager`, `launch_at_startup`, …) live in their own repos under github.com/leanflutter and depend on the published `nativeapi`. Some ride along as submodules under `bindings/dart/<package>` (tracking `main`): `tray_manager`, `screen_retriever` and `window_manager` so far. They are not members of the root pub workspace, melos ignores them (add the path to `ignore` in the root `pubspec.yaml`), and CI does not check them out. To try one against local changes, point a `dependency_overrides` entry in that package at `bindings/dart/nativeapi_flutter` (and `nativeapi`, `cnativeapi`) and never commit the override. |
113 | 113 | - Commit workspace submodule pointer updates only when the combination is compatible (a known-good snapshot). |
114 | 114 | - Examples live in `examples/<binding>_<name>_example` (`dart_` for plain Dart programs, `flutter_`, `rust_`, `csharp_`, `js_`, `python_`, `go_`), not inside the bindings; a new Dart, Flutter or Rust example must also be listed in the root `pubspec.yaml` / `Cargo.toml`, a C# one in `bindings/csharp/NativeAPI.slnx`, a JS one in the root `package.json`. A Python example is a standalone uv project whose `pyproject.toml` points `nativeapi` at `../../bindings/python` (`uv run main.py` builds the wheel). A Go example is a standalone module whose `go.mod` replaces `github.com/libnativeapi/nativeapi/bindings/go` with `../../bindings/go`. Only the pub.dev package examples (`bindings/dart/*/example`) stay inside their package. |
115 | 115 | - CI is one workflow per binding (`dart-ci.yml`, `rust-ci.yml`, `csharp-ci.yml`, `js-ci.yml`, `python-ci.yml`, `go-ci.yml`), each running only for changes under its `bindings/<lang>/` and its examples (`examples/dart_*` and `examples/flutter_*` for Dart, `examples/rust_*`, `examples/csharp_*`, `examples/js_*`, `examples/python_*`, `examples/go_*`). Release tags are per binding: `v*` publishes the Dart packages (`dart-release.yml`), `rust-v*` publishes the crates (`rust-release.yml`), `python-v*` publishes the Python package to PyPI (`python-release.yml`: an sdist carrying core in `cxx_impl/`, and wheels built from it with cibuildwheel; the tag must equal `python-v` + the version in `bindings/python/pyproject.toml`); never push a bare `v*` tag for anything but the Dart packages. Nothing has been published to PyPI yet: the first release needs `nativeapi` set up on PyPI with this workflow and the `pypi` environment as a trusted publisher. |
|
0 commit comments