Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
desktop-cef
Status: shipped macOS desktop app. The desktop release workflow builds it, packages it as a signed DMG, and publishes the release.
What it is
The macOS desktop app rendered with Chromium (CEF) instead of WKWebView. It is a
thin binary over ../src-tauri (app_lib::run_with) that selects
tauri-runtime-cef.
Scope
- Owns: the macOS Chromium binary, its Cargo workspace and lockfile, and its
bundle config (
tauri.conf.json). - Not here: app behaviour, which stays in
../src-tauri; iOS, Android, Linux, and Windows, which build../src-taurifrom../Cargo.tomlon wry.
Checks
RUSTUP_TOOLCHAIN=1.95.0 cargo check --target aarch64-apple-darwin- From the repository root on macOS,
nix build --option sandbox false .#tauri-desktop-cef-appbuilds the unsigned app. Release builds use.#tauri-desktop-dmgand sign, notarize, and publish that app. - Bundle: build the frontend inside
nix develop(just build-tauriinapps/web), then from here run the Tauri CLI built from themacro-cefbranch ofmacro-inc/tauri:RUSTUP_TOOLCHAIN=1.95.0 cargo-tauri build --bundles app -c '{"build":{"beforeBuildCommand":""}}'. The stockcargo-tauridoes not ship the Chromium framework or helper apps.
Gotchas
- Keep this a separate workspace. A
[patch]applies to every target in its workspace, so moving the CEF Tauri patches into../Cargo.tomlwould rebuild iOS and Android against the CEF branch. - A dependency change in
../src-taurior a shared plugin updates both lockfiles: runcargo metadata --format-version 1 > /dev/nullhere as well as in... A new git dependency also needs itsoutputHashesentry on both vendor dirs innix/tauri-desktop.nix. Thecheck tauri lockfilesPR workflow fails when either lockfile is stale (cargo update --workspace --locked); otherwise only the macOS release build would. When a lockfile or Nix input changes it also builds the vendor dirs (nix build .#checks.x86_64-linux.tauri-cargo-lockfiles). ../src-taurimust resolvetaurithrough[patch.crates-io](a version requirement, not a git dependency) so this workspace can repoint it.- The
ceffeature of../src-tauriadds no dependencies; it switches the served origin tohttp://tauri.localhostand theAppRuntimealias totauri::DynRuntime. It only compiles in this workspace. - The CEF Tauri fork's
on_web_content_process_terminatecallback takes a webview and termination details; the regular fork takes only a webview. Check both workspaces when changing shared callback registration. - Needs Rust 1.95 (the repo pins 1.94),
cmake, andninja; the first build downloads about 1 GB of CEF into~/Library/Caches/tauri-cef. That CDN build has no H.264, HEVC, or AAC, so most videos won't play in a local build; setCEF_PATHto an extracted codec distribution (below) to test media. - Releases embed CEF built with proprietary codecs, pinned in
cef-codecs.jsonand laid out bynix/tauri-desktop.nix; Nix evaluation fails if that pin doesn't match thecefcrate inCargo.lock. Whilesha256is empty, Nix warns and builds with the codec-less CDN CEF. To bump thecefcrate, put the new CDN version (cefVersion, itsg<hash>ascefCommit, the Chromium branch) and a newreleaseTag/assetin the manifest with an emptysha256on a PR. TheBuild CEF with codecsworkflow then builds and publishes it (several hours on the large Mac runner); copy the sha256 from its run summary into the manifest. - Nix pins Rust 1.95 and the
macro-cefTauri CLI separately for macOS. Keepnix/tauri-desktop.nixon this workspace and CLI; the stock CLI omits the CEF framework and helper apps from macOS bundles. - Keep
entitlements.pliston the CEF config and the Nix DMG signing step. The release signs the unsigned Nix app after bundling, and Chromium needs the JIT entitlements under the hardened runtime. Calls and dictation need its camera and audio-input entitlements, plus the usage descriptions in../src-tauri/icons/macos/Info.plist; without either, macOS refuses capture. The ast-grep rulesplist-media-entitlementsandplist-media-usage-stringscheck both. - Keep the HTTP/WebSocket fork revision and Nix source hash aligned with the
shared native workspace; native cookies use Application Support as documented
in
../src-tauri/README.md#native-authentication-cookies. - The app hosts Chromium in Alloy style, which has no screen picker and refuses
getDisplayMedia(). Screen sharing goes through Macro's picker and../src-tauri/src/screen_capture.rs:main.rsregisterson_desktop_capture_request(a hook of themacro-ceffork), which grants a desktop capture only right after the user picks a source. - Keep
tauri.conf.jsonaligned with../src-tauri/tauri.conf.jsonandtauri.macos.conf.json: the CLI bundles from this file, while the app's runtime config still comes from../src-tauri. - Keep
SecretStorage::Mockinsrc/main.rs. With the system store, Chromium keeps its cookie key in a "Chromium Safe Storage" keychain item and macOS asks for keychain access on launch. The app's sign-in uses the native HTTP cookie jar, so Chromium's own cookies (embeds) are all the mock key covers; switching key sources drops those cookies once.