emb_cli 0.3.1
emb_cli: ^0.3.1 copied to clipboard
Flutter Embedder CLI: provision an embedded-Linux Flutter workspace and build ivi-homescreen bundles (cross-compiled AOT for arm64/riscv64).
0.3.1 #
- feat: build the Flutter engine for musl targets. The source build now handles
a musl libc target — routing the in-tree libc++ to its native musl path,
fixing the flatbuffers and swiftshader glibc assumptions, dropping the glibc
execinfo backtrace, and applying its patch series with plain
patchso it reaches nested engine DEPS repos. Validated with a from-scratch arm64-musl build whoselibflutter_engine.soloads and runs a Dart app headless in an Alpine arm64 container, within 2.3% of the published glibc engine for the same commit. musl targets must be embedded architectures (arm64/riscv/armv7): an x86_64-musl target collides with the x86_64 host toolchain. - fix: the engine ABI gate no longer false-fails a clean musl engine. Rule 6
treated libc's
__cxa_atexit/__cxa_finalize/__cxa_thread_atexit_implas a libstdc++/libc++abi dependency, but those are the C runtime's static-destructor registration, provided by libc itself. The earlier glibc fix filtered version-tagged symbols, but musl carries no symbol version, so a clean musl engine tripped the rule. A genuine undefined__cxa_throwstill fires.
0.3.0 #
- feat: build the Flutter engine from source when no prebuilt is published. When
emb enginefinds no published engine SDK for a(commit, arch, mode), it can now build one on demand as an opt-in augment, producing a drop-in artifact thataot/bundleconsume unchanged. A fail-closed ABI gate (readelf/nm) verifies the builtlibflutter_engine.sois a self-contained, C-ABI-clean drop-in before it is staged. The singletool/engine/build-engine.shrecipe — a fetch/build split mirroring Yocto'sdo_fetch/do_compile, with--offline/--offline-strictenforcement — is shared by emb, meta-flutter/flutter-engine CI, and a Yocto recipe, so the orchestration is not triplicated. - feat: route Linux/x86_64
aot/build/bundleinto a glibc container on a host that cannot run them natively (non-Linux or non-x86_64), re-entering emb with--exec-nativebehind anEMB_IN_CONTAINERguard so the inner run does not recurse. - feat:
emb doctor --offline-probe --engine-commit <sha>certifies that a fetched engine source closure can build with the network denied — the local analog of a Yoctodo_compilesandbox — with the verdict carried in the--jsonenvelope for CI. - feat: add an Alpine
apkhost-dependency backend and a musl-devsysroot provider. Alpine uses apk and OpenRC, not PackageKit/systemd, so host provisioning drivesapkdirectly — no D-Bus, no systemd, no native bridge — and the musl cross sysroot is built from apk packages, the musl analog of the Debian dpkg path. - feat: require
packagekit_dart0.4.3, whose build hook now skips the native bridge cleanly when cmake/ninja/libsystemd are absent. Without it, installing emb aborted in that hook on Alpine, minimal images, and any non-systemd host — even though emb never uses the PackageKit backend there — which is what the engine builder/runtime container images rely on.
0.2.0 #
- fix: the update notice is no longer printed under
--json. It is written to stdout, so it landed after the envelope and made the output unparseable for exactly the callers who asked for machine-readable output. - fix: only a newer published version is offered as an update. The check compared for inequality, so any unreleased build — every developer on main, and every release branch before its publish — was told to "update" to the older published version.
- feat:
emb doctorreports the board library — resolved source rung, install path, board count, and any version skew, in both the text and--jsonoutput. A reachable emb with no board library is the same false green the authorization probe exists for: nothing looks wrong until a manifest usesextends:. - fix: commands that take no positional arguments now reject stray ones
instead of silently discarding them.
emb sync boardsran the repository sync and reported "No source repositories found to sync", with no hint thatboardshad been dropped; it now names the stray argument and suggestsemb boards sync. - fix:
extends:now works on an installedemb.dart installproduces a standalone binary that carries no package data files, soboards/never reached it and every board name failed withKnown boards: none. The board library is installed to<data-home>/emb/boardsand resolved from there. - fix: an empty board registry no longer reports
unknown board "<name>", which read as a typo and sent people to audit a correct manifest. It now says the library was not found and lists every path tried. - feat:
emb boards list(what is loaded, from which rung, with any version skew) andemb boards sync(install the library for a pub.flutter-io.cn install, which has no checkout to copy from). - feat: add
--[no-]interactivetodeps,setup, andcross, plus theEMB_NON_INTERACTIVEenvironment variable, and honorNONINTERACTIVE=1(Homebrew's convention) as a secondary.DEBIAN_FRONTENDis deliberately not consulted: it suppresses the debconf package-configuration prompts rather than authorization, and images set it globally for that unrelated reason. Interactive is the unconditional default; nothing about the environment changes it, andCI-style variables are deliberately not consulted. Requirespackagekit_dart0.4.0, which sends the polkitinteractivehint — without it noemb depscould install a package on a stock Fedora/openSUSE desktop unless the caller was root or covered by a permissive polkit rule. - feat: decouple
--yesfrom interactivity.--yesskips emb's own confirmation prompt only;--no-interactiveimplies--yesbecause nobody is there to answer, but the converse does not hold. - feat:
brewsetsNONINTERACTIVE=1when non-interactive. WinGet accepts the flag for interface parity but has no equivalent to apply it to. - feat: classify install failures.
ProvisionResult.kindcarries a typedProvisionFailure(notAuthorized,unresolved,daemonUnavailable,other) derived from the backend's error codes, so the command layer no longer string-matches error text that varies by backend. - feat: on an authorization failure, print remediation instead of a raw exception. The advice branches on the interactivity mode, because the daemon reports the same error whether it could not prompt or prompted and was refused.
- feat:
emb doctorreports whether you are authorized to install host packages. Its other checks only exercise read-only operations, which need no authorization, so a reachable backend was previously reported green even whenemb depscould not install anything. The probe never prompts. - fix: defer the install spinner until the backend reports progress. An authorization prompt can appear first, and an animating spinner drew over it and made the password prompt unreadable.
- docs: document authorization, including why polkit cannot prompt under WSL and the narrowly scoped polkit rule that works there, plus what CI needs.
- fix: the documented polkit rule now matches both
wheel(Fedora/RHEL/Arch) andsudo(Debian/Ubuntu). Awheel-only rule silently does nothing on Debian, which is hard to diagnose because the rule looks installed. - test: CI job exercising authorization against a real PackageKit daemon —
refusal with remediation before the rule is installed, unattended success
after, and
EMB_NON_INTERACTIVEequivalence.
0.1.1 #
- fix: locate the PackageKit native bridge (
libpackagekit_nc.so) when emb is installed from pub.flutter-io.cn viadart install emb_cli. The code asset ships in thedart installapp-bundle'slib/next to the executable; the resolver now finds it there (relative toPlatform.resolvedExecutable). Previously the Linux backend reported "packagekit is not available" unlessPK_NC_LIBorLD_LIBRARY_PATHwas set by hand.
0.1.0 #
Port of meta-flutter/workspace-automation to a Dart CLI.
- feat:
emb doctor— host detection + package-backend availability. - feat:
emb deps— coalesce host deps across manifests, filter, install in one PackageKit transaction (withWhatProvidesresolution). - feat:
emb sync— concurrent git clone/update intoapp/. - feat:
emb flutter— install the Flutter SDK (auto-resolves the engine commit). - feat:
emb engine— fetch prebuilt engine artifacts frommeta-flutter/flutter-enginereleases (auto fetch-else-build). - feat:
emb aot—create_aot.pyport producinglibapp.so(profile/release). - feat:
emb bundle— assemble an ivi-homescreen bundle (debug JIT / AOT), with implicit engine fetch and cross-compile (x86_64 → arm64/riscv64). - feat:
emb build— manifest-driven build (build:block) over an arch × mode matrix. - feat:
emb cross— resolve a manifestcross:block into a toolchain + sysroot profile: cross-compile the native embedder for arm64/riscv64 with rootless sysroot extraction and Debian.debhandling. - feat:
emb fetch— fetch a cross target's toolchain + sysroot closure into the store: the online acquisition step for an offline build. - feat:
emb matrix— render a CI build matrix from manifestcross:blocks. - feat:
emb cache— inspect and reclaim the shared artifact cache. - feat:
emb update— self-update the CLI. - feat:
emb setup— one-shot provision; emitssetup_env.sh. - feat:
emb env— writesetup_env.sh. - feat: install with
dart install(Dart 3.10+), or with zero preinstalled toolchain viabootstrap.sh/bootstrap.ps1, which fetch a pinned Dart SDK and putembonPATHin one step. - feat: carry native code assets through cross-compiled bundles — stage them
onto the loader path, build the Linux asset bundle, and accept
native_assets.jsonfor the kernel compile. - feat: depend on the published
packagekit_dart^0.3.2(hosted, not a path dependency). - feat: auto-resolve the PackageKit native bridge (
libpackagekit_nc.so) — from the package's own build or, for hosted installs, thepackage:hooksbuild-hook output under.dart_tool/— so the Linux backend works withoutPK_NC_LIB. - docs: full per-command reference (every option, default, and value set) in the
README; add
example/.
0.0.1 #
- feat: initial commit 🎉