@geastack/core 0.1.30 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gea_app_entry.cpp CHANGED
@@ -274,9 +274,12 @@ void Application::frame(int timestampMs)
274
274
  applicationFramePhaseSet(ApplicationFramePhase::AnimationFrameCallbacks);
275
275
  gea::host::runAnimationFrameCallbacks(static_cast<double>(timestampMs));
276
276
  generated::drainMicrotasks();
277
+ // Offline builds have no network events to drain. Avoid locking empty queues every frame.
278
+ #if !defined(GEA_EMBEDDED_NETWORK_SERVICES_DISABLED) || !GEA_EMBEDDED_NETWORK_SERVICES_DISABLED
277
279
  gea::host::websocket::runCallbacks();
278
280
  gea::host::rtc::runCallbacks();
279
281
  gea::host::http::runRequests();
282
+ #endif
280
283
  recordFramePhase(ApplicationFramePhase::AnimationFrameCallbacks, phaseClockUs() - startUs);
281
284
 
282
285
  // Apply the coalesced style recompute for everything changed above, so layout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/core",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "GeaStack app API, reactivity headers, runtime sources, and type declarations.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -62,10 +62,9 @@
62
62
  "@babel/types": "^7.23.0",
63
63
  "@geajs/core": "1.5.1",
64
64
  "@geajs/vite-plugin": "1.5.0",
65
- "@geastack/compiler": "^1.0.19",
66
- "@geastack/geatsc-plugin-gea": "^0.1.11",
65
+ "@geastack/compiler": "^1.0.20",
66
+ "@geastack/geatsc-plugin-gea": "^0.1.13",
67
67
  "opentype.js": "^2.0.0",
68
68
  "vite": "^8.0.0"
69
- },
70
- "gitHead": "d118359147092ff5e0d319c892aa11c59fab03bc"
69
+ }
71
70
  }
package/runtime.cpp CHANGED
@@ -57,8 +57,8 @@ namespace {
57
57
  void run_app_frame(int timestampMs, void *context)
58
58
  {
59
59
  (void)context;
60
- events::TouchRuntime::poll(timestampMs);
61
- services::BatteryService::poll(timestampMs);
60
+ // Canvas-only inference excludes input/battery consumers. These services
61
+ // belong to the full runtime and are not linked in the reduced source set.
62
62
  app::Application::frame(timestampMs);
63
63
  }
64
64
 
@@ -76,9 +76,17 @@ const { parse } = requireFromLib('@babel/parser')
76
76
  const traverseModule = requireFromLib('@babel/traverse')
77
77
  const t = requireFromLib('@babel/types')
78
78
  const traverse = traverseModule.default || traverseModule
79
- const useStaticCssRules = !['0', 'false', 'no'].includes(String(process.env.GEA_STATIC_CSS_RULES ?? '1').toLowerCase())
80
- const useStaticCssTape = !['0', 'false', 'no'].includes(String(process.env.GEA_STATIC_CSS_TAPE ?? '1').toLowerCase())
81
- const staticCssTapeMinChunk = Math.max(1, Number.parseInt(process.env.GEA_STATIC_CSS_TAPE_MIN_CHUNK ?? '5', 10) || 1)
79
+ const buildConfigPath = readOption('--build-config') ?? process.env.GEA_BUILD_CONFIG_JSON
80
+ const nativeBuildSettings = buildConfigPath
81
+ ? JSON.parse(fs.readFileSync(path.resolve(buildConfigPath), 'utf8')).settings || {}
82
+ : {}
83
+ const compilerSettings = nativeBuildSettings.compiler || {}
84
+ for (const name of ['GEA_STATIC_CSS_RULES', 'GEA_STATIC_CSS_TAPE', 'GEA_STATIC_CSS_TAPE_MIN_CHUNK', 'GEA_CPP_TRANSLATION_UNITS', 'GEA_PER_FILE_UNITS', 'GEA_SKIP_STORE_RELOWER', 'GEA_EMBEDDED_DIRECT_CANVAS_CONTEXT', 'GEA_EMBEDDED_NUMBER_F32']) {
85
+ if (process.env[name] !== undefined) fail(`${name} is no longer a build override; declare compiler settings in package.json and build through gea`)
86
+ }
87
+ const useStaticCssRules = compilerSettings.staticCssRules ?? true
88
+ const useStaticCssTape = compilerSettings.staticCssTape ?? true
89
+ const staticCssTapeMinChunk = compilerSettings.staticCssTapeMinChunk ?? 5
82
90
 
83
91
  function readOption(name) {
84
92
  const index = args.indexOf(name)
@@ -4262,10 +4270,10 @@ const viteBin = path.resolve(readOption('--vite-bin') ?? path.join(path.dirname(
4262
4270
  const viteOutDir = path.resolve(readOption('--vite-out-dir') ?? path.join(outDir, 'dist'))
4263
4271
  const bundlePath = path.resolve(readOption('--bundle-out') ?? path.join(outDir, 'gea-vite-bundle.js'))
4264
4272
  const geaIrPath = path.resolve(readOption('--gea-ir-out') ?? path.join(viteOutDir, 'gea-ir.json'))
4265
- const moduleGraphOutOption = readOption('--module-graph-out') ?? process.env.GEA_VITE_MODULE_GRAPH_OUT
4266
- const moduleGraphOnly = hasFlag('--module-graph-only')
4267
- const moduleGraphCompileRequested = hasFlag('--compile-module-graph')
4268
- const moduleGraphCompileDisabled = hasFlag('--no-compile-module-graph')
4273
+ const moduleGraphOutOption = readOption('--module-graph-out') ?? (compilerSettings.moduleGraph === 'only' || compilerSettings.moduleGraph === 'compile' ? path.join(outDir, 'module-graph') : undefined) ?? process.env.GEA_VITE_MODULE_GRAPH_OUT
4274
+ const moduleGraphOnly = hasFlag('--module-graph-only') || compilerSettings.moduleGraph === 'only'
4275
+ const moduleGraphCompileRequested = hasFlag('--compile-module-graph') || compilerSettings.moduleGraph === 'compile'
4276
+ const moduleGraphCompileDisabled = hasFlag('--no-compile-module-graph') || compilerSettings.moduleGraph === 'disabled'
4269
4277
  const geaPluginSpecifier = path.resolve(
4270
4278
  readOption('--geatsc-gea-plugin') ??
4271
4279
  (process.env.GEA_PLUGIN_DIR ? path.join(process.env.GEA_PLUGIN_DIR, 'dist/index.js') : undefined) ??
@@ -4558,21 +4566,17 @@ if (cppPreludeSymbol) geatscArgs.push('--plugin-option', `gea.cpp-prelude-symbol
4558
4566
  if (pixelPanelEndian) geatscArgs.push('--plugin-option', `gea.pixel-panel-endian=${pixelPanelEndian}`)
4559
4567
  if (cppBoard) geatscArgs.push('--cpp-board', cppBoard)
4560
4568
  if (cxxStandard) geatscArgs.push('--cxx-standard', cxxStandard)
4561
- if (hasFlag('--allow-any')) geatscArgs.push('--allow-any')
4569
+ if (hasFlag('--allow-any') || compilerSettings.allowAny) geatscArgs.push('--allow-any')
4562
4570
  if (entrySymbol) geatscArgs.push('--entry-symbol', entrySymbol)
4563
4571
  if (hasFlag('--isolate-symbols')) geatscArgs.push('--isolate-symbols')
4564
4572
  // One C++ unit per source module plus a shared header, instead of one unit for
4565
4573
  // the whole program. Every target already reads `geatsc-sources.txt` as a LIST,
4566
4574
  // so nothing downstream changes; see the compiler's docs/TRANSLATION-UNITS.md
4567
4575
  // for what it buys (parallel and incremental C++ builds) and what it costs.
4568
- // The env var is honored beside the flag so a target need not plumb one: every
4569
- // build in the tree goes through this script, and the boards' CMakeLists spell
4570
- // their geatsc command line by hand, so an env var reaches all of them at once
4571
- // (`GEA_PER_FILE_UNITS=1 <any build>`). build-macos.sh sets the flag itself and
4572
- // folds the variable into its freshness signature, because a layout change
4573
- // invalidates every generated file.
4574
- if (process.env.GEA_CPP_TRANSLATION_UNITS === 'balanced') geatscArgs.push('--translation-units', 'balanced')
4575
- else if (hasFlag('--per-file-units') || process.env.GEA_PER_FILE_UNITS === '1') geatscArgs.push('--translation-units', 'per-file')
4576
+ const translationUnits = readOption('--translation-units') ?? compilerSettings.translationUnits
4577
+ if (translationUnits === 'balanced') geatscArgs.push('--translation-units', 'balanced')
4578
+ else if (hasFlag('--per-file-units') || translationUnits === 'per-file') geatscArgs.push('--translation-units', 'per-file')
4579
+ geatscArgs.push('--plugin-option', `gea.store-relowering=${compilerSettings.storeRelowering !== false}`)
4576
4580
  if (hasFlag('--gea-ir-backend') || hasFlag('--gea-replace-renderers')) {
4577
4581
  geatscArgs.push('--plugin-option', 'gea.replace-renderers=true')
4578
4582
  }