|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
Shared BAS/BWS build defaults and dependency validation. More...
#include <BaConfigDefs.h>#include <BaConfigOpts.h>#include <BaConfigTypes.h>#include <BaConfigEndian.h>
Go to the source code of this file.
Macros | |
| #define | BA_ALLOCATOR BA_ALLOCATOR_DEFAULT |
| Select the port default, dlmalloc, or MQX allocation hooks. More... | |
| #define | BA_THREAD_STACK_SIZE 24000 |
| Default stack request for supplied hosts; a positive byte count. More... | |
| #define | BA_ENABLE_THREAD_NAMES 0 |
| FreeRTOS only: 1 uses source filenames; 0 uses "BAS" (BAS/BWS, Mako, and Xedge). More... | |
| #define | BA_TIMER_SOURCE BA_TIMER_SOURCE_INTERNAL |
| Select internal sleep timing or a port-provided timer trigger. More... | |
| #define | BA_ENABLE_AUTHENTICATION 1 |
| Select the full-SDK BWS authenticator sources. More... | |
| #define | BA_ENABLE_JSON_USER_DATABASE 0 |
| Select the BWS JSON user container; requires authentication and JSON. More... | |
| #define | BA_ENABLE_HTTP_THREAD_POOL 0 |
| Select the BWS HTTP command thread pool; configure its size at runtime. More... | |
| #define | BA_ENABLE_HTTP_UPLOAD 0 |
| Select BWS upload and supporting asynchronous HTTP sources. More... | |
| #define | BA_ENABLE_WEBDAV 0 |
| Select BWS WebDAV sources; requires HTTP upload. More... | |
| #define | BA_ENABLE_ZIP_IO 0 |
| Select BWS ZIP-backed I/O sources, independently of decompression. More... | |
| #define | BA_ENABLE_JSON 0 |
| Select the native JSON sources in the full-SDK BWS wrapper. More... | |
| #define | BA_ENABLE_WEBSOCKET 1 |
| Select the WebSocket server implementation in the full-SDK BWS wrapper. More... | |
| #define | BA_ENABLE_MDNS 0 |
| Enable the mDNS responder core in builds that select its sources. More... | |
| #define | BA_ENABLE_MDNS_LUA 0 |
| Enable mDNS Lua integration; requires the core and BAS Lua support. More... | |
| #define | MAKO_ENABLE_LUA_MODULE_INTERFACE 0 |
| Enable the Mako module-interface loader path; keep host and SDK consistent. More... | |
| #define | BA_ENABLE_SYSLOG 0 |
| Enable the Lua trace logger's operating-system syslog backend. More... | |
| #define | BA_HAVE_LOG2 1 |
| Allow Lua to use the C log2 function where its runtime policy permits. More... | |
| #define | BA_USE_C_RUNTIME_TIME 1 |
| Use C-runtime time/calendar functions in Lua instead of the BAS fallback. More... | |
| #define | BA_HAVE_STDIO 0 |
| Allow the Lua package loader to probe native files through C stdio. More... | |
| #define | BA_ENABLE_LUA_STDIO 1 |
| Include Lua FILE/loadfile support; the OS mode also controls the io opener. More... | |
| #define | BA_LUA_USE_DLOPEN 1 |
| Allow automatic Linux/macOS/iOS Lua loading options; not a global loader ban. More... | |
| #define | BA_LUA_OS_LIBRARY_MODE BA_LUA_OS_LIBRARY_FULL |
| Select the full or minimal Lua OS-library surface. More... | |
| #define | BA_ENABLE_SERVER 1 |
| Select server integration contracts rather than standalone/client contracts. More... | |
| #define | BA_ENABLE_HTTP_TRACE 1 |
| Enable HttpTrace diagnostics; unrelated to the HTTP TRACE request method. More... | |
| #define | BA_ENABLE_JENCODER_JVAL 1 |
| Enable JEncoder's JVal-tree interface and J format. More... | |
| #define | BA_ENABLE_LUA_DEBUG_LIBRARY 1 |
| Include the standard Lua debug library in the embedded runtime. More... | |
| #define | BA_ENABLE_SHARKSSL 1 |
| Select SharkSSL integration, including TLS and associated crypto helpers. More... | |
| #define | BA_ENABLE_ZLIB 1 |
| Enable zlib support for ZIP inflation and HTTP compression. More... | |
| #define | BA_ENABLE_LUA_SOCKET_COMPAT 1 |
| Register BAS's LuaSocket compatibility surface alongside ba.socket. More... | |
| #define | BA_ENABLE_EMBEDDED_LUA 1 |
| Include the Lua core in BAS; zero requires a separately linked compatible core. More... | |
| #define | BA_USE_EPOLL 0 |
| Select the epoll dispatcher in a supporting build and socket port. More... | |
| #define | BA_ENABLE_SOCKET_REUSE_ADDRESS 0 |
| Request address reuse where the selected socket port implements it. More... | |
| #define | BA_ENABLE_AUX_API 1 |
| Select the grouped BAS auxiliary source modules. More... | |
| #define | BA_ENABLE_TLS_TOOLS 0 |
| Enable SharkSSL binary certificate/CA-list data export in Lua. More... | |
| #define | BA_ENABLE_LUA_CBOR 0 |
| Register CBOR during Mako or standalone Xedge startup; requires LPeg. More... | |
| #define | BA_ENABLE_LUA_DEBUGGER 0 |
| Select remote-debugger integration, distinct from Lua's debug library. More... | |
| #define | BA_ENABLE_EMBEDDED_CA 0 |
| Make the embedded CA list available to the SharkSSL Lua binding. More... | |
| #define | BA_ENABLE_LUA_FORKPTY 0 |
| Include the supported native fork/pseudoterminal integration. More... | |
| #define | BA_ENABLE_LUA_LPEG 0 |
| Register LPeg during Mako or standalone Xedge startup. More... | |
| #define | BA_ENABLE_LUA_PIPE 0 |
| Include pipe facilities in the BAS Lua socket binding on supported ports. More... | |
| #define | BA_ENABLE_LUA_OPCUA 0 |
| Include OPC UA native sources in the BAS auxiliary group. More... | |
| #define | BA_ENABLE_LUA_PROTOBUF 0 |
| Register Protocol Buffers during Mako or standalone Xedge startup. More... | |
| #define | BA_ENABLE_REVERSE_PROXY 0 |
| Include the HTTP reverse-proxy implementation. More... | |
| #define | BA_ENABLE_REVERSE_CONNECTION 0 |
| Include Lua reverse connections within the auxiliary SharkSSL group. More... | |
| #define | BA_ENABLE_UBJSON 0 |
| Include UBJSON native and Lua sources within the auxiliary group. More... | |
| #define | BA_ENABLE_TPM 0 |
| Set to 1 when using Lua TPM support to configure its crypto dependencies. More... | |
Shared BAS/BWS build defaults and dependency validation.
Configure your product in BaConfigOpts.h or shared compiler definitions. Include TargConfig.h so application overrides and port defaults are loaded in the correct order. The complete guide is maintained in doc/en/C/md/BaConfig.md.
The Barracuda App Server (BAS) and Barracuda Web Server (BWS) let you build web interfaces and connected services into your product. Their build settings select the native components, Lua facilities, and platform integration that your application needs. A well-defined configuration makes those choices repeatable across your library, application, and development builds.
BaConfig.h supplies shared defaults and checks incompatible combinations. Use this guide when building BAS or BWS from source, adapting a port, or maintaining a Mako Server or Xedge build. Start with the supplied project for your target, then change the options needed by your application.
Put your overrides in BaConfigOpts.h or in compiler definitions shared by the whole build. Include TargConfig.h, not BaConfig.h, from application code that needs the configuration. The selected port loads your overrides before supplying its defaults and including BaConfig.h.
For a quick lookup, jump to the macro summary.
For a native BWS build using the full SDK's BWS.c or BWSCore.c, this BaConfigOpts.h example adds the native JSON parser, encoder, and value tree:
BaConfigOpts.h selected by your project's include path. The distributed file is intentionally empty. If you keep a project-specific copy, make sure it is found before the distributed copy.-DBA_ENABLE_JSON=1 or MSVC's /DBA_ENABLE_JSON=1 instead of defining the same option again in the overrides file.Setting a macro in one application .c file cannot reconfigure an already compiled library. Use one configuration for each complete build, including matching headers and library binaries.
The normal configuration path is:
TargConfig.h includes BaConfigDefs.h and BaConfigOpts.h.BaConfig.h supplies missing shared values and checks dependencies. It also includes BaConfigTypes.h for pointer and file-offset settings.HttpCfg.h, by BaSocketConfig.h.Most defaults use #ifndef, so an earlier definition wins. A definition in BaConfigOpts.h must not conflict with a compiler definition. Some port facts and BAS crypto requirements are fixed rather than optional defaults.
The defaults below are the fallback values in BaConfig.h. Your port or build profile may select another value first. For example, the Windows and POSIX ports enable socket address reuse before this header supplies its fallback. Windows and POSIX builds other than NuttX also default reverse proxy, reverse connection, and UBJSON support to enabled. Mako and Xedge projects also select their own optional modules.
All boolean options documented below are integer preprocessor values 0 or 1, with no units. Both values are checked explicitly. Use numeric tests in your own conditional code:
Do not use #ifdef BA_ENABLE_JSON to test whether the feature is enabled. Selectors such as BA_ALLOCATOR use named integer constants from BaConfigDefs.h; they are not booleans.
| Build | What the settings control |
|---|---|
| Full-SDK native BWS | amalgamation/BWSCore.c conditionally includes optional native components. BWS.c combines the core with BWSPort.c. |
| Full-SDK BAS | BASCore.c includes the application-server components and Lua bindings. Several native components are always present because those bindings use them. The BWS source switches do not remove those BAS dependencies. |
| Individually compiled sources | Your project owns the source list. Keep it consistent with the macros seen by declarations, implementations, and consumers. |
| Generated single-file distribution | The generator determines which source bodies are packaged. A macro can control retained conditional code, but cannot restore a source body omitted from the package. Check the supplied wrapper and build instructions before applying a full-SDK source-selection recipe. |
| Mako Server or Xedge | The host selects and registers features on top of BAS. Its compiler settings, host configuration, Lua resources, and linked modules must agree with the library. |
A feature selector makes code available where its consumer uses the selector. It does not create a listener, mount a filesystem, register a Lua module in a custom host, or start a network service. Those remain application setup steps.
A default in BaConfig.h does not mean that every product uses the option. The descriptions below identify the code that acts on it:
| Product or layer | How to read its options |
|---|---|
| BWS | Native C/C++ web-server components. The eight options in Select native web-server components select sources in the full-SDK BWS wrapper. They are not BAS, Mako, or Xedge feature switches. |
| BAS | Shared native services plus Lua runtime and bindings. BAS library options also affect Mako and standalone Xedge when those hosts use that library. |
| Mako Server | The host in examples/MakoServer/src/MakoMain.c, with its own module registration and startup policy. See its separate table in Mako Server. |
| Standalone Xedge | The host in examples/xedge/src/xedge.c, with its own module registration and startup requirements. See its separate table in Standalone Xedge. Xedge applications hosted inside Mako use Mako's native host. |
An inherited setting takes effect inside the library or port; Mako or Xedge need not contain another conditional using the same macro. Startup options are identified by product in the tables below. The scope statements describe the supplied sources, not the capabilities of an independently extended application.
Dependency checks in BaConfig.h run for every build that includes it, even when a particular source-selection option has no consumer in that build.
Applies to: full-SDK BWS source selection only. The consumers are in amalgamation/BWSCore.c. BASCore.c includes these component groups through its own source list and dependencies, without consulting these eight selectors. They therefore do not switch those features off in BAS, Mako, or Xedge. Generated distributions may have fixed source composition.
| Option | Shared default | Use it for and required setup |
|---|---|---|
BA_ENABLE_AUTHENTICATION | 1 | Native Basic, Digest, and form authenticators. Configure users, authorization, and protected resources in the application. Disabling this BWS source group does not remove the session implementation. |
BA_ENABLE_JSON_USER_DATABASE | 0 | The JSON-backed native user container. Requires both BA_ENABLE_AUTHENTICATION=1 and BA_ENABLE_JSON=1. |
BA_ENABLE_HTTP_THREAD_POOL | 0 | Native HTTP command thread-pool implementation. Construct and size the pool in the host; this option is not a thread count. |
BA_ENABLE_HTTP_UPLOAD | 0 | Native upload, multipart reception, and asynchronous request/response implementations. Install the receiving resource in the application. |
BA_ENABLE_WEBDAV | 0 | WebDAV access to an application-mounted filesystem. Requires BA_ENABLE_HTTP_UPLOAD=1; configure the mount and access control separately. |
BA_ENABLE_ZIP_IO | 0 | The native ZIP-backed I/O implementation and its supporting readers. Separate from selecting the ZIP used to boot a host and from enabling decompression. |
BA_ENABLE_JSON | 0 | Native JSON parser, encoder, and value-tree sources. BAS's Lua JSON support has its own source dependencies and is not disabled by this BWS selector. |
BA_ENABLE_WEBSOCKET | 1 | Native WebSocket server implementation. Install the WebSocket endpoint in the application. |
For example, a full-SDK BWS WebDAV build needs both definitions:
The dependency check rejects WebDAV with upload disabled. It does not create a writable filesystem or configure authentication for that filesystem.
Applies to: BAS and BWS native code; inherited by Mako and Xedge. The relevant component must be present in the build. For example, BA_ENABLE_JENCODER_JVAL affects a BWS build only when it includes the encoder. The Lua-only syslog setting is listed with BAS services below.
| Option | Shared default | Effect and boundary |
|---|---|---|
BA_ENABLE_SERVER | 1 | Selects server-oriented integration in Lua and native connection handling. 0 is for deliberately constructed client or standalone Lua profiles. It does not remove all server source files from the BAS wrapper. |
BA_ENABLE_HTTP_TRACE | 1 | Enables the HttpTrace diagnostic implementation. Disabled builds retain the API's disabled forms. This controls diagnostic output, not the HTTP TRACE request method. |
BA_ENABLE_ZLIB | 1 | Enables zlib support used for ZIP inflation and HTTP compression. With 0, keep resources and application behavior compatible with the available uncompressed paths. |
BA_ENABLE_JENCODER_JVAL | 1 | Enables JEncoder_setJV and the encoder's J format for a JVal tree. 0 allows a separately assembled streaming-encoder build without JVal.c; it does not remove every JSON value-tree consumer from BAS. |
BA_ENABLE_SHARKSSL | 1 | Selects BAS/BWS SharkSSL integration, including TLS and associated crypto helpers. It is broader than an HTTPS-listener switch. TLS means Transport Layer Security. |
BA_ENABLE_SERVER=0 changes integration contracts as well as code paths. For example, the standalone Lua path uses an existing Lua state, and native TCP/TLS acceptance needs the appropriate application callback. In the full Lua OS library, os.exit can terminate a standalone process; the server build rejects that call. Treat this as a complete build profile, not as a way to stop a running server.
Keep BA_ENABLE_SERVER=1 and BA_ENABLE_SHARKSSL=1 for the supplied Mako Server and standalone Xedge builds. Their startup code creates a new BAS Lua state and installs SharkSSL/crypto bindings without checking these selectors. Setting either to 0 requires changes to that startup code; it is not a supported way to build Mako or standalone Xedge without a server or without SharkSSL. A custom BAS application must follow the selected balua_create contract; native BWS has no Lua initialization contract.
BA_ENABLE_JENCODER_JVAL=0 removes a documented encoder dependency. The streaming format path rejects J when that support is absent. A reduced encoder library must also omit JVal.c from its source list to obtain that build boundary.
Applies to: BAS Lua integration, including the BAS library used by Mako and Xedge. Native BWS does not include Lua or gain these facilities. If Lua is built separately, apply the corresponding settings to that Lua build as well. The Mako-specific module-interface option is described in Mako Server because it also needs Mako's loader interface.
| Option | Shared default | Effect and boundary |
|---|---|---|
BA_ENABLE_EMBEDDED_LUA | 1 | Includes the Lua core in the BAS wrapper. 0 requires a separately linked compatible Lua core; BAS Lua bindings remain. Match the BAS Lua headers, configuration, and integration hooks. |
BA_ENABLE_LUA_DEBUG_LIBRARY | 1 | Includes Lua's standard debug library in the embedded runtime. Separate from the remote debugger. |
BA_ENABLE_LUA_DEBUGGER | 0 | Selects BAS remote-debugger integration and Lua thread hooks. The BAS wrapper requires SharkSSL and the Lua debug library; its implementation is in the auxiliary source group. The shared lwIP socket adapter also checks this flag and requires SO_REUSE when it is enabled. |
BA_ENABLE_LUA_SOCKET_COMPAT | 1 | Registers the LuaSocket compatibility surface supplied by the BAS socket binding. 0 retains the native ba.socket API. |
The lwIP check is a port prerequisite for debugger restarts, not a native BWS debugger implementation. It can reject a BWS/lwIP build if the debugger flag is set while SO_REUSE is disabled.
These settings describe different capabilities. Select them independently according to the port; do not infer one from another. They have the same BAS/Mako/Xedge scope as the Lua facilities above. Even when a port supplies their defaults, their consumers configure Lua, not the native BWS runtime. On VxWorks, BA_HAVE_STDIO also determines the port's default Lua OS-library mode.
| Option | Type and accepted values | Shared default | Meaning |
|---|---|---|---|
BA_LUA_OS_LIBRARY_MODE | Integer selector: BA_LUA_OS_LIBRARY_FULL (0) or BA_LUA_OS_LIBRARY_MINIMAL (1) | BA_LUA_OS_LIBRARY_FULL | Selects the standard OS-library surface and participates in selecting the standard io opener. |
BA_ENABLE_LUA_STDIO | Boolean: 0 or 1 | 1 | Controls Lua's C FILE-backed stream/loadfile support. 0 keeps the unsupported-loadfile error path and selects an empty standard io opener. |
BA_HAVE_STDIO | Boolean: 0 or 1 | 0 | Describes C file probing available to the Lua package loader. With 0, its native filesystem readability probe returns not found. This does not disable BAS virtual I/O. |
BA_HAVE_LOG2 | Boolean: 0 or 1 | 1 | Lets Lua's math library use C log2 where its C89 policy permits. With 0, it uses the logarithm fallback. |
BA_USE_C_RUNTIME_TIME | Boolean: 0 or 1 | 1 | Selects C-runtime calendar/time functions in Lua's OS library. With 0, the BAS fallback supplies clock/time behavior; os.date and os.difftime are not registered. |
BA_LUA_USE_DLOPEN | Boolean: 0 or 1 | 1 | Permits gluaconf.h to derive POSIX, dynamic-loading, and readline options from Linux/macOS/iOS Lua platform selections. |
The minimal OS library registers clock and time, plus date when C-runtime time is enabled. It omits the full library's process, environment, file-management, locale, and temporary-name functions. With the full library, availability still depends on the target C runtime and the server policy.
The embedded BAS wrapper combines the OS mode and standard-I/O setting as follows. These rows concern Lua's standard io library and native file loading; BAS virtual I/O remains a separate facility.
| OS mode | BA_ENABLE_LUA_STDIO | Standard io opener | C FILE / loadfile support |
|---|---|---|---|
| Full | 1 | Full implementation | Included |
| Full | 0 | Empty implementation | Unsupported-loadfile stub |
| Minimal | 1 | Empty implementation | Included |
| Minimal | 0 | Empty implementation | Unsupported-loadfile stub |
BA_LUA_USE_DLOPEN=0 suppresses only those automatic platform definitions. It leaves explicitly supplied upstream Lua options intact and does not disable the separate Windows DLL loader. It is not a general prohibition on loading native modules.
Applies to: BAS sources and bindings, not the supplied native BWS wrapper. Mako and Xedge inherit the selected implementations, but they do not register every optional service in the same way. See their separate startup tables below. A custom BAS host must register the facilities it needs.
This scope describes the BAS source selectors. Native components such as HttpClient can also be compiled separately for BWS; the BWS SharkTrustX source group does exactly that. BA_ENABLE_AUX_API does not select those BWS sources or prohibit their use by a native BWS application.
| Option | Shared default | Purpose and integration requirements |
|---|---|---|
BA_ENABLE_AUX_API | 1 | Selects the grouped BAS auxiliary sources for HTTP/client I/O, threads, and related services. Crypto, sockets, and trace-logger sources within this group also depend on SharkSSL. Custom hosts must perform the corresponding initialization. |
BA_ENABLE_TLS_TOOLS | 0 | Enables certstore:data() and sharkcert:data() export of SharkSSL binary CA-list/certificate data, subject to their existing SharkSSL/provider conditions. This is not a switch for all certificate or PEM operations. |
BA_ENABLE_EMBEDDED_CA | 0 | Makes the embedded certificate-authority (CA) list available to the SharkSSL Lua binding. The host selects its trust policy; this does not issue a device certificate. Standalone Xedge requires this support. |
BA_ENABLE_SYSLOG | 0 | Enables the operating-system syslog backend in xrc/lua/tracelogger.c. Mako and Xedge inherit it when they install the BAS trace logger on a supported platform. This does not control Mako's separate native daemon/error syslog calls. |
BA_ENABLE_LUA_OPCUA | 0 | Includes the Open Platform Communications Unified Architecture (OPC UA) implementation in the BAS auxiliary source group. Keep native source selection and required Lua resources aligned. |
BA_ENABLE_LUA_PIPE | 0 | Adds the pipe facilities in the BAS Lua socket binding. Requires a supporting platform; the POSIX port defaults to 1 except on NuttX. |
BA_ENABLE_LUA_FORKPTY | 0 | Includes the fork/pseudoterminal integration for supported systems. Mako registers it; standalone Xedge has no corresponding registration call. It depends on the native process/terminal facilities used by forkpty-linux.c; the POSIX port defaults to 1 except on NuttX. |
BA_ENABLE_REVERSE_PROXY | 0 | Includes the HTTP redirector/reverse-proxy implementation and Lua binding. Mako registers the binding; standalone Xedge has no corresponding registration call. A custom BAS host can register it explicitly. |
BA_ENABLE_REVERSE_CONNECTION | 0 | Includes the Lua reverse-connection implementation within the auxiliary SharkSSL source group. This is separate from the HTTP reverse proxy. |
BA_ENABLE_UBJSON | 0 | Includes Universal Binary JSON (UBJSON) native parser/encoder and Lua binding sources in the auxiliary group. Keep native and Lua consumers consistent. |
Mako and standalone Xedge both use BAS, so the shared native, Lua, port, and crypto settings apply through their BAS build. These tables identify what each supplied host does in addition. They describe startup behavior, not which optional modules every shipped build enables.
BA_ENABLE_LUA_CBOR, BA_ENABLE_LUA_LPEG, and BA_ENABLE_LUA_PROTOBUF are module-registration options for Mako Server and standalone Xedge. Both products use these same macro names in their own startup code; the BAS and BWS libraries do not use them to include or register modules. Each is an integer boolean (0 or 1), with shared default 0. Their defaults and value checks live in BaConfig.h. Enabling them does not add external libraries to the linker command. A custom BAS application must link and register those modules itself.
Source: examples/MakoServer/src/MakoMain.c, with the module-interface loader in src/plugins/lua/loadlib.c.
| Option | What Mako does | Library or build requirement |
|---|---|---|
BA_ENABLE_LUA_CBOR | Registers org.conman.cbor_c, the native part of Concise Binary Object Representation (CBOR). | Mako startup option. Supply its implementation and Lua resources; also enable LPeg. |
BA_ENABLE_LUA_LPEG | Registers the LPeg parsing-expression-grammar module as lpeg. | Mako startup option. Supply the LPeg implementation. |
BA_ENABLE_LUA_PROTOBUF | Registers the Protocol Buffers module as pb. | Mako startup option. Supply its implementation. |
MAKO_ENABLE_LUA_MODULE_INTERFACE | Uses the Mako native-module interface. Integer boolean, shared default 0. | Mako-specific, with a consumer in BAS's Lua loader. Compile the loader, Mako, and module SDK for the same interface; defining it only for MakoMain.c is insufficient. |
BA_ENABLE_SERVER, BA_ENABLE_SHARKSSL | Creates the BAS Lua state and installs SharkSSL/crypto bindings. | Keep both 1 for the supplied Mako startup code. Disabling either requires adapting Mako's initialization. |
BA_ENABLE_LUA_DEBUGGER | Installs the debug monitor after creating the Lua state. | Match BAS debugger sources and Lua hooks, plus their dependencies. |
BA_ENABLE_LUA_OPCUA | Registers the static OPC UA namespace module. | Select the BAS OPC UA sources and matching Lua resources. |
BA_ENABLE_UBJSON | Calls balua_ubjson. | Select the BAS native UBJSON and Lua binding sources. |
BA_ENABLE_REVERSE_CONNECTION | Calls balua_revcon. | Select the BAS reverse-connection implementation and its dependencies. |
BA_ENABLE_REVERSE_PROXY | Calls luaopen_ba_redirector. | Select the BAS reverse-proxy source. |
BA_ENABLE_LUA_FORKPTY | Calls balua_forkpty. | Select the BAS source and a supporting native process/terminal platform. |
BA_ENABLE_MDNS and BA_ENABLE_MDNS_LUA | Registers ba.createmdns only when both are 1. | Link the responder, socket adapter, timer support, and BAS Lua binding. |
BA_ENABLE_EMBEDDED_CA | Inherits the setting when it installs the BAS SharkSSL binding. | No standalone-Xedge-style requirement here; the BAS binding controls embedded CA-list support. |
BA_ENABLE_TLS_TOOLS, BA_ENABLE_SYSLOG, BA_ENABLE_LUA_PIPE, BA_ENABLE_LUA_SOCKET_COMPAT | Inherits the selected functionality when it installs the SharkSSL, trace-logger, and socket bindings. | Set these in the BAS compilation, not just in MakoMain.c. |
BA_ENABLE_AUX_API | Calls auxiliary HTTP, I/O, thread, socket, crypto, and logging APIs during startup. | The supplied host calls these APIs without an AUX enable guard. Setting the BAS selector to 0 alone does not produce a working reduced Mako host. |
BA_THREAD_STACK_SIZE | Passes the value to its Lua thread manager and HTTP command pool. | Constructors receive explicit stack requests; this is not a global switch for every library thread. |
BA_ALLOCATOR | Uses the selected port hooks and performs dlmalloc-specific host setup when selected. | Keep host, BAS, and port allocation settings consistent. |
BA_ENABLE_TPM | Uses the crypto defaults and checks in BaConfig.h when this is 1. | Set in BAS and Mako when using Lua TPM support. Configure TPM initialization separately; 0 does not disable it. See Configure TPM and crypto dependencies. |
Source: examples/xedge/src/xedge.c. These statements refer to the native standalone host, not Xedge running as an application inside Mako.
| Option | What standalone Xedge does | Library or build requirement |
|---|---|---|
BA_ENABLE_LUA_CBOR | Registers org.conman.cbor_c, the native CBOR module. | Standalone Xedge startup option. Supply its implementation and Lua resources; also enable LPeg. |
BA_ENABLE_LUA_LPEG | Registers the LPeg module as lpeg. | Standalone Xedge startup option. Supply the LPeg implementation. |
BA_ENABLE_LUA_PROTOBUF | Registers the Protocol Buffers module as pb. | Standalone Xedge startup option. Supply its implementation. |
BA_ENABLE_SERVER, BA_ENABLE_SHARKSSL | Creates the BAS Lua state and installs SharkSSL/crypto bindings. | Keep both 1 for the supplied standalone Xedge startup code. Disabling either requires adapting Xedge's initialization. |
BA_ENABLE_LUA_DEBUGGER | Installs the debug monitor; the host has a separate line-trace alternative. | Match BAS debugger sources and Lua hooks, plus their dependencies. |
BA_ENABLE_LUA_OPCUA | Registers the static OPC UA namespace module. | Select the BAS OPC UA sources and matching Lua resources. |
BA_ENABLE_UBJSON | Calls balua_ubjson. | Select the BAS native UBJSON and Lua binding sources. |
BA_ENABLE_REVERSE_CONNECTION | Calls balua_revcon. | Select the BAS reverse-connection implementation and its dependencies. |
BA_ENABLE_MDNS and BA_ENABLE_MDNS_LUA | Registers ba.createmdns only when both are 1. | Link the responder, socket adapter, timer support, and BAS Lua binding. |
BA_ENABLE_EMBEDDED_CA | Rejects a build with value 0. | The current standalone source requires 1 in both Xedge and BAS; this is a host requirement on a BAS binding option. |
BA_ENABLE_TLS_TOOLS, BA_ENABLE_SYSLOG, BA_ENABLE_LUA_PIPE, BA_ENABLE_LUA_SOCKET_COMPAT | Inherits the selected functionality when it installs the SharkSSL, trace-logger, and socket bindings. | Set these in the BAS compilation and use a platform that supports the selected backend. |
BA_ENABLE_AUX_API | Calls auxiliary HTTP, I/O, thread, socket, crypto, and logging APIs during startup. | The supplied host calls these APIs without an AUX enable guard. Setting the BAS selector to 0 alone does not produce a working reduced Xedge host. |
BA_THREAD_STACK_SIZE | Passes the value to its timer, Lua thread manager, and HTTP command pool. | Xedge thread counts are separate host settings. |
BA_ALLOCATOR | Uses the selected port hooks and registers allocator information for dlmalloc. | Keep host, BAS, and port allocation settings consistent. |
BA_ENABLE_TPM | Uses the crypto defaults and checks in BaConfig.h when this is 1. | Set in BAS and standalone Xedge when using Lua TPM support. Configure TPM initialization separately; 0 does not disable it. See Configure TPM and crypto dependencies. |
BA_ENABLE_REVERSE_PROXY, BA_ENABLE_LUA_FORKPTY | Has no corresponding registration call. | The BAS wrapper can compile these sources, but the supplied Xedge host does not expose their Lua entry points. Custom host integration is required. |
MAKO_ENABLE_LUA_MODULE_INTERFACE | Does not select or initialize the Mako module interface. | This is Mako-specific. It is not a generic Xedge native-module switch. |
Multicast DNS (mDNS) lets clients resolve a local hostname such as device.local. mDNS is required when using SharkCA, unless you use certificates containing only IPv4 addresses and access devices by those addresses. For certificates with a .local hostname, use BamDNS or your platform's mDNS responder.
The responder core and its Lua binding have separate boolean selectors:
Core scope: optional native component usable with BAS or BWS. Binding scope: BAS Lua, with registration in Mako and Xedge. Source integration depends on which package you build:
src/BAS.c already contains the responder core, selected by BA_ENABLE_MDNS=1. Do not compile a second copy of the core.src/BWS.c does not contain the responder. Its SharkTrustX package supplies src/BamDNS.c to compile separately.amalgamation/BAS.c and amalgamation/BWS.c wrappers compile the core separately as xrc/misc/BamDNS.c.All of these builds need one socket adapter: src/arch/NET/BamDNS-Sock.c in the generated public package, src/arch/bsdSocket/BamDNS-Sock.c in the full SDK, or your target's replacement. The supplied Mako build profiles already select their required sources. See Access Your Server by Name with mDNS for setup.
| Option | Shared default | Effect |
|---|---|---|
BA_ENABLE_MDNS | 0 | Selects the responder core where the build provides that source-selection guard. Include its socket adapter and timer dependencies. |
BA_ENABLE_MDNS_LUA | 0 | Enables the Lua-facing responder integration. Requires BA_ENABLE_MDNS=1, linked BAS Lua integration, and host registration. |
Native C applications can use core 1 with Lua 0. Lua 1 does not require the embedded Lua core specifically: a compatible external Lua core is also possible. Defining both selectors does not start a responder. See Access Your Server by Name with mDNS for source integration, initialization, and network requirements.
Use the port's supported settings and keep them identical in all consumers. These values can affect types, object layouts, allocation, or OS calls.
Applies to: shared BAS/BWS ports and native components, inherited by Mako and Xedge, with the following qualifications. BA_ENABLE_THREAD_NAMES has a FreeRTOS consumer only. BA_TIMER_SOURCE acts only when BaTimer is linked. BA_THREAD_STACK_SIZE is read by supplied hosts and examples, including native SharkTrustX examples; the BAS/BWS constructors themselves take explicit stack sizes. BA_USE_EPOLL selects a dispatcher in the shared full-SDK PortSources.ch wrapper and must match the network port.
| Option | Type and accepted values | Shared default | Meaning |
|---|---|---|---|
BA_BYTE_ORDER | Integer selector: BA_BYTE_ORDER_LITTLE_ENDIAN (1234) or BA_BYTE_ORDER_BIG_ENDIAN (4321) | Derived from the port or compiler | Describes the target byte order. Ports set or check this selector directly; conflicting port/compiler definitions are rejected. SharkSSL inherits BAS/BWS validation. |
BA_ALLOCATOR | Integer selector: BA_ALLOCATOR_DEFAULT (0), BA_ALLOCATOR_DLMALLOC (1), or BA_ALLOCATOR_MQX (2) | BA_ALLOCATOR_DEFAULT | Selects allocation hooks supported by the port. Default retains normal port hooks; dlmalloc requires its implementation; MQX is specific to the MQX port. Existing leak-check integration is separate. |
BA_THREAD_STACK_SIZE | Positive integer; requested stack bytes in the current Thread API | 24000 | Default passed by supplied hosts to selected thread, pool, and timer constructors. Ports can round or add overhead; it is not a thread count or a guarantee for every thread in a custom application. |
BA_ENABLE_THREAD_NAMES | Boolean: 0 or 1 | 0 | FreeRTOS: 1 selects source filenames; 0 selects BAS. Keep the setting consistent in the port and its callers. |
BA_TIMER_SOURCE | Integer selector: BA_TIMER_SOURCE_INTERNAL (0) or BA_TIMER_SOURCE_EXTERNAL (1) | BA_TIMER_SOURCE_INTERNAL | Selects periodic Thread_sleep timing or waiting for a port-provided trigger. Both use the timer manager's thread. External requires the port's BaTimer_installTrigger integration. |
BA_USE_EPOLL | Boolean: 0 or 1 | 0 | Selects the epoll dispatcher path in builds that provide it. Match the selected socket dispatcher sources and platform; this option does not add epoll support to another OS. |
BA_ENABLE_SOCKET_REUSE_ADDRESS | Boolean: 0 or 1 | 0 | Requests address reuse in socket ports that implement the option. Behavior follows the selected network stack. |
The VxWorks port supplies its own stack default: 30000 with 64-bit pointers and 15000 otherwise. The FreeRTOS thread adapter takes byte requests and converts them to the task-creation convention used by the selected FreeRTOS environment. Size stacks for the actual application and libraries, then validate their use on the target.
With FreeRTOS configUSE_TIMERS enabled, the port defaults to the external timer source and installs a FreeRTOS software timer. Otherwise it defaults to the internal source. External timing supports one BAS timer manager; see BaTimer for the constructor and lifetime contract.
Ports that assign a fixed name to BAS/BWS Thread objects use BAS; FreeRTOS can optionally use source filenames.
Applies to: BAS Lua TPM configurations, including Mako and standalone Xedge.
When using Lua Trusted Platform Module (TPM) support, set BA_ENABLE_TPM=1 in both BAS and the application build. This tells BaConfig.h to supply the required crypto defaults and reject conflicting settings. The option is an integer boolean (0 or 1), defaults to 0, and requires BA_ENABLE_SHARKSSL=1 when enabled.
TPM initialization is configured separately. Setting BA_ENABLE_TPM=0 skips the TPM-specific crypto defaults and checks; it does not disable an existing TPM integration or remove its Lua resources. In Mako and standalone Xedge, BA_ENABLE_SOFTTPM_KEY_MATERIAL in MakoConfig.h or XedgeConfig.h controls the built-in softTPM key material and related startup code. This boolean (0 or 1) defaults to 1 without PSA and must be 0 with PSA. PSA builds use the provider integration described below.
Native BWS has no Lua TPM API and does not need this option for normal use. If it is set to 1 in a BWS build, the shared header still applies the crypto defaults and checks, but does not add Lua TPM support.
SHARKSSL_PSA_CONSUMER selects the separate Platform Security Architecture (PSA) Crypto consumer integration. It is a SharkSSL/provider setting rather than a boolean default owned by this header. See Getting Started with PSA Crypto and PSA Crypto: How It Works for provider setup, key ownership, and runtime behavior.
The following are integer 0/1 SharkSSL options. Their definitions in BaConfig.h reach both BAS and BWS through TargConfig.h; Mako and Xedge inherit them through their BAS build. Their consumers are SharkSSL's native headers, sources, and provider adapters, with additional BAS binding dependencies. They take effect only where the selected source/backend uses them; enabling a flag cannot add an omitted implementation.
The table records what this header supplies when an earlier definition is absent; SharkSSL and the provider have further configuration requirements.
| Options | Default supplied here | Dependency or scope |
|---|---|---|
SHARKSSL_ENABLE_ASN1_KEY_CREATION, SHARKSSL_ENABLE_CSR_CREATION, SHARKSSL_ENABLE_CSR_SIGNING | 1 | BA_ENABLE_TPM=1 requires all three to remain 1. CSR means certificate signing request. |
SHARKSSL_ENABLE_RSAKEY_CREATE, SHARKSSL_ENABLE_ECCKEY_CREATE | !SHARKSSL_PSA_CONSUMER | Native RSA/elliptic-curve key generation defaults off for PSA. With BA_ENABLE_TPM=1, PSA rejects either native generator enabled; the non-PSA configuration requires native ECC key generation. |
SHARKSSL_USE_SHA_512 | 1 | PSA selects HKDF-SHA-512; explicit 0 selects HKDF-SHA-256 and changes derived keys and root policy. softTPM retains its existing SHA-256 fallback. TPM still requires SHA-256 and SHA-384. |
SHARKSSL_ECC_USE_SECP256R1, SHARKSSL_ECC_USE_SECP384R1 | 1 | BA_ENABLE_TPM=1 requires both curves. |
SHARKSSL_ECC_USE_SECP521R1, SHARKSSL_ECC_USE_BRAINPOOLP256R1, SHARKSSL_ECC_USE_BRAINPOOLP384R1, SHARKSSL_ECC_USE_BRAINPOOLP512R1 | 1 | Additional native curve defaults. A flag alone does not establish a provider's algorithm support. |
SHARKSSL_ENABLE_RSA_OAEP | 0 with PSA; 1 otherwise | Native implementation policy; PSA operations use the provider path. |
SHARKSSL_PSA_CONSUMER_STANDALONE_AES | 1 in PSA builds | BA_ENABLE_TPM=1 with PSA requires 1. |
SHARKSSL_ENABLE_RSA_API, SHARKSSL_ENABLE_DHE_RSA, SHARKSSL_USE_RNG_FORTUNA, SHARKSSL_USE_RNG_TINYMT | 0 in PSA builds | Native crypto/random-generator defaults for provider-backed builds. Outside PSA these are left to SharkSSL unless set elsewhere. |
SHARKSSL_ENABLE_ECDSA_API | 0 with PSA; 1 with BA_ENABLE_TPM=1 without PSA | The non-PSA TPM dependency check requires 1. Otherwise the non-PSA default belongs to SharkSSL. This is independent of Mako/Xedge's BA_ENABLE_SOFTTPM_KEY_MATERIAL setting. |
SHARKSSL_TLS_1_3_INITIAL_KEY_SHARE_X25519_ONLY | 1 in PSA builds | Initial TLS 1.3 key-share policy; distinct from the provider's complete algorithm capabilities. |
When BA_ENABLE_TPM=1, the header also defaults the following to 1 and rejects an explicit conflicting value:
SHARKSSL_ENABLE_PEM_API, SHARKSSL_USE_ECC, SHARKSSL_ENABLE_ECDSA, and SHARKSSL_ENABLE_ECDHE_ECDSA.SHARKSSL_USE_SHA_256, SHARKSSL_USE_SHA_384, SHARKSSL_USE_AES_128, SHARKSSL_USE_AES_256, and SHARKSSL_ENABLE_AES_GCM.With TPM and PSA together, SHARKSSL_PSA_CONSUMER_STRICT_IDENTITY must be 0; the header supplies that value if absent. These checks align the selected BAS integration with its crypto dependencies. They do not certify a provider or prove hardware support.
The final block of BaConfig.h supplies fixed definitions motivated by the BAS crypto bindings. The same header is included by BWS, so native SharkSSL consumers also see those values. SHARKSSL_HMAC_API is the exception in consumer scope: its current uses are in the BAS Lua crypto binding, not a native BWS HMAC feature selector. Mako and Xedge inherit that Lua behavior. Treat these as integration requirements rather than independent host switches:
| Option | Value supplied here |
|---|---|
SHARKSSL_USE_SHA1 | 0 with PSA, 1 otherwise; BAS supplies legacy SHA-1 outside the PSA provider. |
SHARKSSL_USE_MD5 | 1 outside PSA; this block does not define it in PSA builds. BAS supplies legacy MD5 outside the provider. |
SHARKSSL_ENABLE_AES_CCM, SHARKSSL_ENABLE_AES_CBC, SHARKSSL_ENABLE_ENCRYPTED_PKCS8_SUPPORT | 1; native SharkSSL settings shared by BAS/BWS. |
SHARKSSL_HMAC_API | 1; BAS Lua crypto-binding consumer in xrc/lua/lcrypto.c, inherited by Mako/Xedge. |
The configuration is shared across several deliberate boundaries. Use the owner below when a setting is not defined in BaConfig.h.
| Owner | Settings and responsibility |
|---|---|
BaConfigDefs.h | Named values for byte order, allocator, OS-library mode, and timer source. Include these through the normal port entry point. |
BaConfigTypes.h | BA_ARCH_64BIT is derived from compiler pointer width and must agree with it. BA_FILE_OFFSET_BITS accepts integer 32 or 64, measured in bits, with shared fallback 32 and possible port overrides. File-offset width affects the application binary interface (ABI). |
BaConfigPosix.h | Applies POSIX large-file feature-test settings before system headers, using application overrides. It is included by the POSIX target and the POSIX DiskIo source. |
BaSocketConfig.h, after HttpCfg.h | Network capabilities such as BA_ENABLE_IPV6, BA_ENABLE_UDP, resolver selection, socket write events, multicast membership, and keepalive tuning. |
Port TargConfig.h and luaconf.h | Target facts, allocator hooks, supported C-runtime and Lua-library defaults, and platform adaptation. |
Mako MakoConfig.h / Xedge XedgeConfig.h | Host startup policy, softTPM key-header selection, ZIP policies, and other host choices. Shared library options must still reach the library compilation. |
balua.h | BALUA_ENABLE_LEGACY_PEM_KEY_API defaults to !SHARKSSL_PSA_CONSUMER and is rejected when enabled with PSA. |
xrc/lua/lpsa.c | BA_PSA_* root IDs, key locations, and device-root policy. These defaults currently remain with the PSA consumer, where provider types are available. See Getting Started with PSA Crypto. |
| SharkSSL configuration and provider | TLS algorithms, crypto implementation capabilities, and provider integration beyond the BAS defaults above. |
On POSIX, BA_FILE_OFFSET_BITS is an integer bit width, either 32 (the shared default) or 64. Use the same value throughout the library and host. For 64, the early BaConfigPosix.h helper applies the native large-file settings before system headers, and DiskIo uses fseeko() for 64-bit seeking. Include TargConfig.h before system headers in application code. If a forced include or third-party header must come first, supply _FILE_OFFSET_BITS=64 on the compiler command line for the whole build as well. Do not put system header includes in BaConfigOpts.h; a 32-bit build with late file-offset settings is rejected by the POSIX DiskIo size check.
BA_INTERNAL_CONFIG_OPTS_LOADED and the header guards are internal include bookkeeping shared by all four builds, not application feature switches. The legacy B_LITTLE_ENDIAN and B_BIG_ENDIAN flags are rejected. Remove those definitions from projects and makefiles. Select the actual target through BA_BYTE_ORDER, using BA_BYTE_ORDER_LITTLE_ENDIAN (1234) or BA_BYTE_ORDER_BIG_ENDIAN (4321); neither constant may be redefined. The compiler or port normally supplies this fact. An unknown byte order needs an explicit selection; a selection that contradicts a known fact fails compilation.
Ports load application overrides and establish their platform facts before BaConfig.h includes the macro-only BaConfigEndian.h validator. SharkSSL inherits this validated byte order and its constants. SharkSSL_cfg.h checks the _BaConfigEndian_h header guard and skips its standalone validator when BAS has already supplied the contract. BAS/BWS therefore does not need SharkSslConfigEndian.h in its include tree or exported headers.
Each selected TargConfig.h sets or checks BA_BYTE_ORDER directly against its platform facts. Standalone SharkSSL ports supply their default, include SharkSslConfigEndian.h to define constants, load application options and validate compiler facts, then check the final selection against the port. BAS/BWS uses only BaConfigEndian.h and requires no standalone endian header. Merely defining BA_BYTE_ORDER does not skip validation. inc/SharkSSL_cfg.h remains an SVN file external from SharkSSL. Direct BAS assembly/preprocessor probes must include BaConfigEndian.h before SharkSSL_cfg.h and use the same application options as their C sources. The supplied Mako GNU assembly rules do this automatically.
| Scope | Authoritative consumers |
|---|---|
| Native BWS source selectors | amalgamation/BWSCore.c; compare amalgamation/BASCore.c before treating one as a BAS feature switch. |
| BAS Lua runtime and capabilities | amalgamation/BASCore.c, src/plugins/lua/, and inc/gluaconf.h; the VxWorks TargConfig.h also maps stdio capability to a Lua-library default. |
| BAS services and bindings | xrc/lua/lsharkssl.c, lsocket.c, tracelogger.c, lcrypto.c, and the source-inclusion guards in BASCore.c. |
| Host registration | examples/MakoServer/src/MakoMain.c and examples/xedge/src/xedge.c; these determine which compiled bindings are exposed at startup. |
| Shared native controls | inc/HttpTrace.h, inc/JEncoder.h, src/plugins/JEncoder.c, the native HTTP/ZIP sources, and their SharkSSL integration. |
| Ports, allocation, timers, and sockets | inc/arch/, src/arch/, inc/gBsdSock.h, src/core/BaTimer.c, and amalgamation/PortSources.ch. |
| Crypto defaults and TPM prerequisites | inc/BaConfig.h, src/plugins/SharkSSL/inc/, src/plugins/SharkSSL/src/, and the BAS crypto bindings. |
| Symptom | What to check |
|---|---|
| A setting has no effect | Confirm which BaConfigOpts.h the compiler includes, earlier definitions, the macro's actual consumer, and whether the selected sources are in the package. Rebuild the library as well as the application. |
A dependency #error appears | Read the named requirement and set the complete combination in the shared configuration. For example, WebDAV requires upload, and the JSON user database requires authentication and JSON. |
| Undefined symbols after enabling a feature | Add its implementation/library and required port adapter, using the same configuration. A declaration or registration guard cannot supply missing object code. |
| A Lua module is missing at runtime | Check its native implementation, host registration, required Lua resources, and the dependencies of its source group. |
#ifdef selects code for a disabled feature | Replace the presence test with #if OPTION; configuration booleans remain defined at zero. |
| Library and application disagree about a type or feature | Check all producer/consumer definitions, include paths, port selections, and ABI settings. Rebuild matching binaries. |
| A port feature fails despite passing central checks | Confirm that the selected OS/network adapter implements it. Central checks validate only the combinations encoded there; they do not validate every platform capability. |
When updating an older build, use the current option names. The old presence-style flags are not compatibility aliases. Removing a historical flag without selecting its current equivalent may restore a default that differs from the old build.
| #define BA_ALLOCATOR BA_ALLOCATOR_DEFAULT |
Select the port default, dlmalloc, or MQX allocation hooks.
Applies to: BAS/BWS port hooks; Mako/Xedge inherit them and have dlmalloc host integration.
See Configure the port, allocator, and threads for values, defaults, and requirements.
| #define BA_ENABLE_AUTHENTICATION 1 |
Select the full-SDK BWS authenticator sources.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_AUX_API 1 |
Select the grouped BAS auxiliary source modules.
Applies to: BAS wrapper source selection; supplied Mako and standalone Xedge startup requires these APIs. Native BWS can use separately compiled native components from this group without this BAS selector.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_EMBEDDED_CA 0 |
Make the embedded CA list available to the SharkSSL Lua binding.
Applies to: BAS SharkSSL Lua binding; inherited by Mako and required by standalone Xedge. Not BWS.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_EMBEDDED_LUA 1 |
Include the Lua core in BAS; zero requires a separately linked compatible core.
Applies to: BAS wrapper source selection, including Mako/Xedge BAS builds; not native BWS.
See Choose Lua runtime facilities for values, defaults, and requirements.
| #define BA_ENABLE_HTTP_THREAD_POOL 0 |
Select the BWS HTTP command thread pool; configure its size at runtime.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_HTTP_TRACE 1 |
Enable HttpTrace diagnostics; unrelated to the HTTP TRACE request method.
Applies to: Shared BAS/BWS native components; inherited by Mako/Xedge.
See Configure server integration and shared services for values, defaults, and requirements.
| #define BA_ENABLE_HTTP_UPLOAD 0 |
Select BWS upload and supporting asynchronous HTTP sources.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_JENCODER_JVAL 1 |
Enable JEncoder's JVal-tree interface and J format.
Applies to: Native encoder in BAS/BWS when linked; inherited by Mako/Xedge.
See Configure server integration and shared services for values, defaults, and requirements.
| #define BA_ENABLE_JSON 0 |
Select the native JSON sources in the full-SDK BWS wrapper.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_JSON_USER_DATABASE 0 |
Select the BWS JSON user container; requires authentication and JSON.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_LUA_CBOR 0 |
Register CBOR during Mako or standalone Xedge startup; requires LPeg.
Applies to: Mako Server and standalone Xedge. Both use this option; BAS and BWS libraries do not register the module.
Supply the module implementation and Lua resources. Custom BAS applications must link and register the module themselves. See Configure host startup for values, defaults, and requirements.
| #define BA_ENABLE_LUA_DEBUG_LIBRARY 1 |
Include the standard Lua debug library in the embedded runtime.
Applies to: BAS Lua library selection, inherited by Mako/Xedge; not native BWS.
See Choose Lua runtime facilities for values, defaults, and requirements.
| #define BA_ENABLE_LUA_DEBUGGER 0 |
Select remote-debugger integration, distinct from Lua's debug library.
Applies to: BAS debugger sources/hooks and Mako/Xedge startup. The shared lwIP port also checks SO_REUSE; BWS gains no Lua debugger.
See Choose Lua runtime facilities for values, defaults, and requirements.
| #define BA_ENABLE_LUA_FORKPTY 0 |
Include the supported native fork/pseudoterminal integration.
Applies to: BAS source selection and Mako registration; no supplied Xedge registration or BWS consumer.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_LUA_LPEG 0 |
Register LPeg during Mako or standalone Xedge startup.
Applies to: Mako Server and standalone Xedge. Both use this option; BAS and BWS libraries do not register the module.
Supply the LPeg implementation. Custom BAS applications must link and register LPeg themselves. See Configure host startup for values, defaults, and requirements.
| #define BA_ENABLE_LUA_OPCUA 0 |
Include OPC UA native sources in the BAS auxiliary group.
Applies to: BAS source selection and Mako/Xedge registration; not the native BWS wrapper.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_LUA_PIPE 0 |
Include pipe facilities in the BAS Lua socket binding on supported ports.
Applies to: BAS Lua socket binding, installed by Mako/Xedge; not native BWS.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_LUA_PROTOBUF 0 |
Register Protocol Buffers during Mako or standalone Xedge startup.
Applies to: Mako Server and standalone Xedge. Both use this option; BAS and BWS libraries do not register the module.
Supply the module implementation. Custom BAS applications must link and register it themselves. See Configure host startup for values, defaults, and requirements.
| #define BA_ENABLE_LUA_SOCKET_COMPAT 1 |
Register BAS's LuaSocket compatibility surface alongside ba.socket.
Applies to: BAS Lua socket binding, installed by Mako/Xedge; not native BWS.
See Choose Lua runtime facilities for values, defaults, and requirements.
| #define BA_ENABLE_LUA_STDIO 1 |
Include Lua FILE/loadfile support; the OS mode also controls the io opener.
Applies to: BAS Lua runtime/configuration, inherited by Mako/Xedge; no native BWS consumer.
See OS library, FILE I/O, and module loading for values, defaults, and requirements.
| #define BA_ENABLE_MDNS 0 |
Enable the mDNS responder core in builds that select its sources.
Applies to: Optional native responder usable with BAS or BWS. Mako and standalone Xedge require BA_ENABLE_MDNS_LUA for their Lua registration.
See Enable local hostname resolution for values, defaults, and requirements.
| #define BA_ENABLE_MDNS_LUA 0 |
Enable mDNS Lua integration; requires the core and BAS Lua support.
Applies to: BAS Lua binding and Mako/Xedge registration; not native BWS.
See Enable local hostname resolution for values, defaults, and requirements.
| #define BA_ENABLE_REVERSE_CONNECTION 0 |
Include Lua reverse connections within the auxiliary SharkSSL group.
Applies to: BAS source selection and Mako/Xedge registration; not the native BWS wrapper.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_REVERSE_PROXY 0 |
Include the HTTP reverse-proxy implementation.
Applies to: BAS source selection and Mako registration; no supplied Xedge registration or BWS selector.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_SERVER 1 |
Select server integration contracts rather than standalone/client contracts.
Applies to: BAS/BWS native accept handling and BAS Lua integration; the supplied Mako and standalone Xedge startup code requires value 1.
See Configure server integration and shared services for values, defaults, and requirements.
| #define BA_ENABLE_SHARKSSL 1 |
Select SharkSSL integration, including TLS and associated crypto helpers.
Applies to: Shared BAS/BWS native components; inherited by Mako/Xedge. Keep value 1 for the supplied Mako and standalone Xedge startup code.
See Configure server integration and shared services for values, defaults, and requirements.
| #define BA_ENABLE_SOCKET_REUSE_ADDRESS 0 |
Request address reuse where the selected socket port implements it.
Applies to: Shared BAS/BWS BSD-style socket port; inherited by Mako/Xedge.
See Configure the port, allocator, and threads for values, defaults, and requirements.
| #define BA_ENABLE_SYSLOG 0 |
Enable the Lua trace logger's operating-system syslog backend.
Applies to: BAS Lua trace logger, inherited by Mako/Xedge; not native BWS or Mako daemon logging.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_THREAD_NAMES 0 |
FreeRTOS only: 1 uses source filenames; 0 uses "BAS" (BAS/BWS, Mako, and Xedge).
| #define BA_ENABLE_TLS_TOOLS 0 |
Enable SharkSSL binary certificate/CA-list data export in Lua.
Applies to: BAS SharkSSL Lua binding, inherited by Mako/Xedge; not native BWS.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_TPM 0 |
Set to 1 when using Lua TPM support to configure its crypto dependencies.
Applies to: BAS Lua TPM configurations, including Mako and standalone Xedge. Set consistently in BAS and the application. BaConfig.h supplies required crypto defaults and checks for conflicting settings. TPM initialization is configured separately; value 0 does not disable TPM support. Native BWS has no Lua TPM API.
See Configure TPM and crypto dependencies for values, defaults, and requirements.
| #define BA_ENABLE_UBJSON 0 |
Include UBJSON native and Lua sources within the auxiliary group.
Applies to: BAS source selection and Mako/Xedge registration; not the native BWS wrapper.
See Select BAS application services for values, defaults, and requirements.
| #define BA_ENABLE_WEBDAV 0 |
Select BWS WebDAV sources; requires HTTP upload.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_WEBSOCKET 1 |
Select the WebSocket server implementation in the full-SDK BWS wrapper.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_ZIP_IO 0 |
Select BWS ZIP-backed I/O sources, independently of decompression.
Applies to: Full-SDK BWS source selection only; not a BAS, Mako, or Xedge feature switch.
See Select native web-server components for values, defaults, and requirements.
| #define BA_ENABLE_ZLIB 1 |
Enable zlib support for ZIP inflation and HTTP compression.
Applies to: Shared BAS/BWS native components; inherited by Mako/Xedge.
See Configure server integration and shared services for values, defaults, and requirements.
| #define BA_HAVE_LOG2 1 |
Allow Lua to use the C log2 function where its runtime policy permits.
Applies to: BAS Lua runtime/configuration, inherited by Mako/Xedge; no native BWS consumer.
See OS library, FILE I/O, and module loading for values, defaults, and requirements.
| #define BA_HAVE_STDIO 0 |
Allow the Lua package loader to probe native files through C stdio.
Applies to: BAS Lua runtime/configuration, inherited by Mako/Xedge; no native BWS consumer.
See OS library, FILE I/O, and module loading for values, defaults, and requirements.
| #define BA_LUA_OS_LIBRARY_MODE BA_LUA_OS_LIBRARY_FULL |
Select the full or minimal Lua OS-library surface.
Applies to: BAS Lua runtime/configuration, inherited by Mako/Xedge; no native BWS consumer.
See OS library, FILE I/O, and module loading for values, defaults, and requirements.
| #define BA_LUA_USE_DLOPEN 1 |
Allow automatic Linux/macOS/iOS Lua loading options; not a global loader ban.
Applies to: BAS Lua runtime/configuration, inherited by Mako/Xedge; no native BWS consumer.
See OS library, FILE I/O, and module loading for values, defaults, and requirements.
| #define BA_THREAD_STACK_SIZE 24000 |
Default stack request for supplied hosts; a positive byte count.
Applies to: Mako/Xedge and supplied examples; BAS/BWS constructors take explicit sizes.
See Configure the port, allocator, and threads for values, defaults, and requirements.
| #define BA_TIMER_SOURCE BA_TIMER_SOURCE_INTERNAL |
Select internal sleep timing or a port-provided timer trigger.
Applies to: Native BaTimer in BAS or BWS; inherited by Mako/Xedge when the timer is linked.
See Configure the port, allocator, and threads for values, defaults, and requirements.
| #define BA_USE_C_RUNTIME_TIME 1 |
Use C-runtime time/calendar functions in Lua instead of the BAS fallback.
Applies to: BAS Lua runtime/configuration, inherited by Mako/Xedge; no native BWS consumer.
See OS library, FILE I/O, and module loading for values, defaults, and requirements.
| #define BA_USE_EPOLL 0 |
Select the epoll dispatcher in a supporting build and socket port.
Applies to: Shared full-SDK BAS/BWS port wrapper; Mako/Xedge inherit the selected dispatcher.
See Configure the port, allocator, and threads for values, defaults, and requirements.
| #define MAKO_ENABLE_LUA_MODULE_INTERFACE 0 |
Enable the Mako module-interface loader path; keep host and SDK consistent.
Applies to: Mako integration plus the BAS Lua loader; not BWS or supplied Xedge startup.
See Mako Server for values, defaults, and requirements.