BT.features

BT.features

BT.features

Function

returns the current interpreter capability table.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
None-NoNoneNo parameters required.

Return Value

TypeDescription
ObjectReturns the interpreter capability object. See "Return Object Fields" below for fields.

Return object field

FieldTypeMust existDescription
webBoolYesWhether to have built-in Web service capabilities. The current standard build is true.
desktopBoolYesWhether to enable desktop App capabilities. The CLI build is usually false and the bt_app desktop build is true.
ffiBoolYesWhether to build in the native dynamic library FFI. The official BT interpreter is true.
netBoolYesWhether to build in TCP, UDP, WebSocket, DNS and network interface related capabilities.
deviceBoolYesWhether to have built-in device communication capabilities. Currently contains serial serial port capabilities.
mysqlBoolYesWhether the MySQL standard library is built-in.
reqwestBoolYesWhether to build in the HTTP client standard library.
cryptoBoolYesWhether to have built-in encryption digest capabilities such as SHA, HMAC, and UUID.
fsBoolYesWhether to build the file system standard library.
processBoolYesWhether to build in child process and process environment related capabilities.
statsBoolYesWhether to build in BT.stats() runtime statistics capability.
bytesBoolYesWhether to build Bytes binary byte capability.
modbusBoolYesWhether to have built-in Modbus frame building, parsing and CRC auxiliary capabilities.

Examples

Notes

  • desktop will reflect whether the current binary actually enables desktop capabilities.
  • ffi will reflect whether the current interpreter has built-in FFI; BT official interpreter has built-in FFI by default, and the special tailored version may be false.
  • features returns the static capability table and does not perform runtime scanning.
  • Field names are fixed with snake_case or lowercase words, and can be used with BT.has(name) to determine individual abilities.