Configuration
On this page
Run MatchBox from your project directory so relative paths and project settings resolve together.
| File or directory | Purpose |
|---|---|
box.json | Package dependencies and ESP32 build settings. |
boxlang.json | Runtime settings, including module configuration. |
matchbox.toml | Explicit module paths and datasources. |
boxlang_modules/ | Project-local modules. |
BOXLANG_HOME/modules/ | Shared modules in the runtime home. |
Command-line options override the relevant settings for a run. See the CLI reference for commands and environment variables.
Modules
Install modules in boxlang_modules/, or select a directory explicitly:
matchbox --module ./libs/greeter app.bxs
A module contains ModuleConfig.bx and can provide BoxLang code, settings and native functionality. Configure application-specific settings in boxlang.json:
{
"modules": {
"greeter": {
"settings": { "greeting": "Howdy" }
}
}
}
See Modules for the package layout and lifecycle.
matchbox.toml
Use explicit module paths and datasource settings when needed:
[modules.greeter]
path = "./libs/greeter"
[datasources.main]
driver = "sqlite"
database = "app.db"
Database support depends on the runtime build. See Queries and data for programmatic configuration and queries.
ESP32 settings
The esp32 block in box.json configures the device build:
{
"esp32": {
"board": "xiao-esp32s3-sense",
"psram": true,
"webPort": 8080,
"wifi": {
"ssid": "my-network",
"password": "my-password",
"hostname": "matchbox-device"
}
}
}
These settings are compiled into firmware. Keep real credentials out of source control. See the ESP32 guide for toolchains and flashing.
Cargo features
Cargo features apply when building MatchBox itself, not as application settings. See Building MatchBox.