- Rust 1.42+
- SQLite
- Protobuf
Settings can either be included as a part of the environment or in a .env file.
SEABIRD_HOST- hostname of the seabird serverSEABIRD_TOKEN- authentication token for the seabird serverDATABASE_URL- SQLite connection string (e.g.,sqlite://seabird.db)SEABIRD_ENABLED_PLUGINS- comma-separated list of enabled plugins - if empty, all plugins will be loadedSEABIRD_DISABLED_PLUGINS- comma-separated list of plugins that should not be enabled
OPENWEATHERMAP_API_KEY- required by theforecastplugin for weather dataGOOGLE_MAPS_API_KEY- required by theforecastplugin for location lookups
Unfortunately, writing a new plugin requires a few steps.
- You must pick a unique name for your plugin. See
supported_pluginsinsrc/plugin.rsload()for the list of all existing plugin names. - You must create a new file in
src/pluginsthat adheres to thePluginasync trait. See existing plugins insrc/pluginsfor reference. - You must add your plugin to
src/plugins/mod.rs. See existing entries in the file for reference. - You must add your unique plugin name to the
supported_pluginsVecfrom step one. - You must load your plugin in
src/plugin.rsload(). See existing entries for reference.
cargo build
seabird-plugin-bundle will read DATABASE_URL at compile time to typecheck queries. If you see errors like relation "karma" does not exist, that means that migrations have had issues. The recommended fix is the following:
$ cargo install sqlx-cli
$ sqlx migrate run
Builds should succeed after this.