Expand description
Compile-time configuration.
trouble
has some configuration settings that are set at compile time.
They can be set in two ways:
- Via Cargo features: enable a feature like
<name>-<value>
.name
must be in lowercase and use dashes instead of underscores. For example.l2cap-rx-queue-size-4
. Only a selection of values is available, checkCargo.toml
for the list. - Via environment variables at build time: set the variable named
TROUBLE_HOST_<value>
. For exampleTROUBLE_HOST_L2CAP_RX_QUEUE_SIZE=1 cargo build
. You can also set them in the[env]
section of.cargo/config.toml
. Any value can be set, unlike with Cargo features.
Environment variables take precedence over Cargo features. If two Cargo features are enabled for the same setting with different values, compilation fails.
Constants§
- CONNECTION_
EVENT_ QUEUE_ SIZE - Connection event queue size
- GATT_
CLIENT_ NOTIFICATION_ MAX_ SUBSCRIBERS - Default: 1.
- GATT_
CLIENT_ NOTIFICATION_ QUEUE_ SIZE - GATT notification queue size.
- L2CAP_
RX_ PACKET_ POOL_ SIZE - L2CAP RX packet pool size
- L2CAP_
RX_ QUEUE_ SIZE - L2CAP RX queue size
- L2CAP_
TX_ PACKET_ POOL_ SIZE - L2CAP TX packet pool size
- L2CAP_
TX_ QUEUE_ SIZE - L2CAP TX queue size