Skip to main content

Reference

Build Matrix

Every build configuration variant, environment variable, and how they propagate across all Elements in the Land monorepo.

Build Matrix & Environment Variables

Every build configuration variant, environment variable, and how they propagate across all Elements in the Land monorepo.


Build Variant Profiles

Land ships multiple build profiles that gate features, performance tiers, and runtime behavior at compile time. Each profile combines a set of .env.Land* files that are read by every Element’s build system.

ProfileFiles LoadedPurpose
Development.env.LandDefault local development
Development + Bundled.env.Land + .env.Land.BundledDevelopment with pre-compiled workbench
Development + Extensions.env.Land + .env.Land.ExtensionsDevelopment with extension installation
Development + Node.env.Land + .env.Land.NodeDevelopment with specific Node.js version
Development + PostHog.env.Land + .env.Land.PostHogDevelopment with telemetry enabled
Development + Diagnostics.env.Land + .env.Land.DiagnosticsDevelopment with debug tracing
Production.env.Land.ProductionProduction build (all tiers locked down)
Production + Bundled.env.Land.Production + .env.Land.Production.BundledProduction with bundled workbench
Production + Extensions.env.Land.Production + .env.Land.Production.ExtensionsProduction with extension skip/mute
Production + Node.env.Land.Production + .env.Land.Production.NodeProduction with specific Node.js version
Production + PostHog.env.Land.Production + .env.Land.Production.PostHogProduction with telemetry
Production + Diagnostics.env.Land.Production + .env.Land.Production.DiagnosticsProduction with trace/record

Each Element consumer reads from the same .env.Land* files. If a tier flag flips, every Element picks up the change through its own build system.

ElementLanguageBuild SystemHow It Reads Env Vars
MountainRustbuild.rs + Cargorustc-env + --cfg feature flags
CommonRustbuild.rs + Cargorustc-env + --cfg feature flags
EchoRustbuild.rs + Cargorustc-env + --cfg feature flags
GroveRustbuild.rs + Cargorustc-env + --cfg feature flags
MaintainRustbuild.rs + Cargorustc-env + --cfg feature flags
MistRustCargorustc-env + --cfg feature flags
RestRustbuild.rs + Cargorustc-env + --cfg feature flags
SideCarRustbuild.rs + Cargorustc-env + --cfg feature flags
AirRustCargorustc-env + --cfg feature flags
VineProto + Rustprost-build + CargoPort numbers baked into generated stubs via build.rs
CocoonTypeScriptESBuilddefine substitution in bootstrap
WindTypeScriptViteimport.meta.env resolution
SkyTypeScriptAstro + ViteRuntime __LandTiers injection
OutputTypeScriptESBuilddefine substitution
WorkerTypeScriptESBuilddefine substitution

Environment Variables Reference

Product Identity

Variables that define the application’s name, version, and identity. Shared across all Elements as the single source of truth for product metadata.

VariableDefaultDescription
ProductApplicationNameland
ProductCommitdev
ProductDataFolderName.land
ProductEmbedderIdentifierland-desktop
ProductNameLongLand Editor
ProductNameShortLand
ProductQualitydevelopment
ProductServerApplicationNameland-server
ProductUrlProtocolland
ProductVersion1.118.0Land version and tier-gating flags. Single source of truth consumed by every Element: Mountain’s build.rs (Rust feature activation + rustc-env exposure), Cocoon’s Bootstrap (esbuild define substitution), Wind’s vite.config.ts (import.meta.env resolution), Sky’s astro.config.ts (runtime __LandTiers injection). When a tier value changes in .env.Land, every Element picks it up through its own build system. See: TierGatedImplementationSelection.md for the full cross-Element propagation workflow.

Network

Port bindings for Mountain and Cocoon gRPC servers. Override to run multiple concurrent sessions.

VariableDefaultDescription
NetworkCocoonPort50052
NetworkMountainPort50051Network ports (override for parallel sessions)

Transport

Tier flags that gate how Elements communicate with each other.

VariableDefaultDescription
TierHTTPProxyHandRolled
TierIPCMountainIPC routing tier for Wind and Output TauriMainProcessService. Mountain = all calls to native backend; NodeDeferred = Mountain first, Cocoon fallback on miss; Node = all calls to Cocoon Node.js. Runtime switch - no rebuild required.
TierLoggerStandard
TierRemoteProcedureCallgRPCTransport + communication
TierSchemeAssetsEmbedded

Tier flags controlling native file operations, search, and watchers.

VariableDefaultDescription
TierFileSystemLayer2File system + search
TierFileWatcherLayer4Layer4 forwards createFileSystemWatcher to Mountain’s native notify-crate backend in Environment/FileWatcherProvider.rs (FSEvents / inotify / ReadDirectoryChangesW, per-handle debounce, glob-to-regex filter). Stub drops every watch registration and blinds TypeScript / ESLint / Tailwind (and every other LSP-driven) extension to disk mutations. Keep Layer4 as the default; flip to Stub only for isolation debugging.
TierFindFilesLayer3
TierGlobJavaScript

VS Code API Surface

Tier flags gating VS Code API compatibility layers.

VariableDefaultDescription
TierClipboardLayer3
TierConfigurationCacheVS Code API surface
TierDiagnosticsFull
TierDocumentMirrorFull
TierOpenExternalLayer3

Lifecycle & Concurrency

Tier flags controlling extension activation strategy and module caching.

VariableDefaultDescription
TierExtensionActivationParallel8Lifecycle + concurrency
TierExtensionScanSequential
TierModuleCacheSimple

Telemetry

Telemetry mode selection.

VariableDefaultDescription
TierTelemetrySynchronousTelemetry

Build-Shim

Variables exported by build scripts (not stored in .env files).

VariableDefaultDescription
BundleLeveldebugPassed to Maintain/Script/SignBundle.sh to select the Tauri output directory (Target/debug/ or Target/release/). Set to debug by Debug/Build.sh and release by Release/Build.sh. Also sets the ad-hoc re-sign identity correctly.
CopyToDesktop(unset)When set to any non-empty value, copies the signed .app to ~/Desktop after signing. Convenience shortcut for quick Finder launch.
MountainDirElement/MountainOverride the Mountain element root. Used by SignBundle.sh to locate Entitlements.plist and the Tauri bundle output directory.

After tauri build, Maintain/Script/SignBundle.sh re-signs the .app bundle with xattr -cr + codesign. This step runs automatically via BundleLevel=debug sh Maintain/Script/SignBundle.sh at the end of Debug/Build.sh (and the release equivalent). It is also triggered by beforeBundleCommand hooks in tauri.conf.json for production builds.


File Mapping

Which .env.Land* file each variable originates from:

VariableFiles
AskPostHog, Production.PostHog
AuthorizeProduction.PostHog
BatchPostHog, Production.PostHog
BeamProduction.PostHog
BootBundled, Production.Bundled
BundleLevelBuild-Shim (exported by Debug/Build.sh, Release/Build.sh)
BrandPostHog, Production.PostHog
BufferPostHog, Production.PostHog
CapPostHog, Production.PostHog
CapturePostHog, Production.PostHog
DisableProduction.Diagnostics
InstallExtensions, Production.Extensions
MuteProduction.Extensions
NetworkCocoonPortCore, Production
NetworkMountainPortCore, Production
OTLPEnabledPostHog, Production.PostHog
OTLPEndpointPostHog, Production.PostHog
PackBundled, Production.Bundled
ProductApplicationNameCore, Production
ProductCommitCore, Production
ProductDataFolderNameCore, Production
ProductEmbedderIdentifierCore, Production
ProductNameLongCore, Production
ProductNameShortCore, Production
ProductQualityCore, Production
ProductServerApplicationNameCore, Production
ProductUrlProtocolCore, Production
ProductVersionCore, Production
RecordPostHog, Production.Diagnostics, Production.PostHog
ReplayPostHog, Production.PostHog
ReportPostHog, Production.PostHog
RequireNode, Production.Node
SkipProduction.Extensions
ThrottlePostHog, Production.PostHog
TierClipboardCore, Production
TierConfigurationCore, Production
TierDiagnosticsCore, Production
TierDocumentMirrorCore, Production
TierExtensionActivationCore, Production
TierExtensionScanCore, Production
TierFileSystemCore, Production
TierFileWatcherCore, Production
TierFindFilesCore, Production
TierGlobCore, Production
TierHTTPProxyCore, Production
TierIPCCore, Production
TierLoggerCore, Production
TierModuleCacheCore, Production
TierOpenExternalCore, Production
TierRemoteProcedureCallCore, Production
TierSchemeAssetsCore, Production
TierTelemetryCore, Production
TracePostHog, Production.Diagnostics, Production.PostHog
WireProduction.Extensions

How Build Variants Affect Each Element

Not every Element needs to understand the full build matrix. Each Element only needs to know where it fits:

ElementRelevant Tier FlagsBuild Impact
AirNone directlyReads ProductVersion for update checks
CocoonTierExtensionActivationAffects extension loading strategy
CommonTierRemoteProcedureCall, TierLoggerDefines transport and logging traits
EchoNone directlyFixed scheduler implementation
GroveNone directlyFuture: inherits transport from Common
MaintainProductQuality, ProductVersionBuild orchestration uses quality/version
MistNetworkMountainPortDNS server binds to configured port
MountainAll Tier* flagsGates feature implementations via Cargo features
OutputTierSchemeAssets, TierIPCDetermines asset bundling strategy; TierIPC selects IPC routing in TauriMainProcessService
RestNone directlyCompiler is always active
SideCarRequire (Node version)Downloads correct Node.js binary
SkyPack, Boot, ProductQualitySelects workbench variant at build time
VineNetworkMountainPort, NetworkCocoonPortPort numbers baked into generated gRPC stubs
WindTierConfiguration, TierLogger, TierIPCUses tiers for service layer behavior; TierIPC selects IPC routing in TauriMainProcessService
WorkerNone directlyFixed service worker implementation

Project Maintainers: Source Open (Source/[email protected]) | GitHub Repository | Report an Issue