Skip to main content

Variable: features

readonly features: object

Build-time feature flags reflecting the CMake options the binary was compiled with:

  • wasm — BUILD_WITH_WASM: the WebAssembly global and tjs-wasi.
  • sqlite — BUILD_WITH_SQLITE: the tjs-sqlite module and persistent localStorage.
  • tls — BUILD_WITH_TLS: HTTPS/WSS and tjs:tls. WebCrypto is unaffected by this one.
  • bundledCa — BUILD_WITH_BUNDLED_CA: the embedded Mozilla CA bundle. When false, TLS builds need TJS_CA_BUNDLE or setCABundlePath() to verify certificates.
  • webcrypto — BUILD_WITH_WEBCRYPTO: crypto.subtle. crypto.getRandomValues() and crypto.randomUUID() are always present.
  • ffi — BUILD_WITH_FFI: the tjs-ffi module.

Type Declaration​

bundledCa​

readonly bundledCa: boolean

ffi​

readonly ffi: boolean

sqlite​

readonly sqlite: boolean

tls​

readonly tls: boolean

wasm​

readonly wasm: boolean

webcrypto​

readonly webcrypto: boolean