Skip to content

setGlobalJITPreference

setGlobalJITPreference(preference): void

Defined in: packages/typegpu/src/data/compiledIO.ts:24

Controls whether TypeGPU is allowed to generate code at runtime (via new Function) to speed up writing data into buffers.

  • 'auto' (default) - checks lazily if eval is allowed in the environment, and uses it if so.
  • 'disabled' - never uses eval, falls back to the default writer. Useful in environments with a strict Content Security Policy, where even probing for eval reports a violation.

JITPreference

void

© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.