Skip to main content

Variable: features

readonly features: object

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

  • wasmBUILD_WITH_WASM: the WebAssembly global and tjs-wasi.
  • sqliteBUILD_WITH_SQLITE: the tjs-sqlite module and persistent localStorage.
  • tlsBUILD_WITH_TLS: HTTPS/WSS and tjs:tls. WebCrypto is unaffected by this one.
  • bundledCaBUILD_WITH_BUNDLED_CA: the embedded Mozilla CA bundle. When false, TLS builds need TJS_CA_BUNDLE or setCABundlePath() to verify certificates.
  • webcryptoBUILD_WITH_WEBCRYPTO: crypto.subtle. crypto.getRandomValues() and crypto.randomUUID() are always present.
  • ffiBUILD_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