Skip to content

refactor: clean threaded runtime globals#14

Open
V3RON wants to merge 1 commit into
mainfrom
refactor/clean-globals
Open

refactor: clean threaded runtime globals#14
V3RON wants to merge 1 commit into
mainfrom
refactor/clean-globals

Conversation

@V3RON
Copy link
Copy Markdown
Collaborator

@V3RON V3RON commented May 27, 2026

Why this matters

This removes undocumented secondary-runtime globals and fallback paths so runtime detection has one supported source of truth. It makes the public API clearer, avoids app code depending on internal globals, and keeps docs/examples aligned with the breaking cleanup from issue #12.

What changed

  • kept global.__THREADED_RUNTIME_ENV__ as the only supported runtime identity global and reduced it to runtimeName and kind
  • removed _is_it_a_list_env, __COMPOSE_CHAT_LIST_ENV__, __rnrRuntimeFunctionCacheRuntimeName, and the global event-emitter fallback guard
  • removed native global / globalThis self-assignment during secondary runtime setup
  • hid __rnrRegisterRuntimeFunction and __rnrCallRuntimeFunction behind internal helpers in core
  • updated the example app to use getCurrentRuntime() and isMainRuntime() instead of raw globals
  • updated README and website installation docs, including a short supported-vs-internal globals section

Verification

  • bunx tsc --noEmit in example/
  • bun test in example/ currently fails in the existing Bun + React Native test setup on Flow syntax in react-native/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant