Local Dev: Run plaid locally with docker compose#272
Open
harry-anderson wants to merge 8 commits intomainfrom
Open
Local Dev: Run plaid locally with docker compose#272harry-anderson wants to merge 8 commits intomainfrom
harry-anderson wants to merge 8 commits intomainfrom
Conversation
Adds a complete local development setup for building and testing Plaid rules without needing the full production infrastructure. Includes multi-stage Dockerfile (Cranelift backend, no LLVM), working configs, hello-world example rule, helper scripts, and documentation covering both local rule development and testing external rules from plaid-rules or company repos via volume mounts. Also fixes chrono pulling in wasm-bindgen on wasm32 targets by disabling default features in plaid-stl, which caused link errors at runtime.
Add #[serde(default)] to HashMap/Vec config fields so minimal configs work without empty table boilerplate. Warn when log type inference truncates at underscores. Add docker-compose.dev.yml for external module mounts and watch-modules.sh for auto-restart.
obelisk
reviewed
Feb 26, 2026
local-dev/Dockerfile
Outdated
| # Stage 3: Minimal runtime image | ||
|
|
||
| # ── Stage 1: Build plaid runtime ───────────────────────────────────────────── | ||
| FROM rust:1.88.0-slim-bookworm AS runtime-builder |
Owner
There was a problem hiding this comment.
We're moving to 1.93 so would update this
obelisk
reviewed
Feb 26, 2026
| /// The limit's default value | ||
| pub default: u64, | ||
| /// Override values based on log type | ||
| #[serde(default)] |
obelisk
reviewed
Feb 26, 2026
| /// The limit's default value | ||
| default: LimitValue, | ||
| /// Override values based on log type | ||
| #[serde(default)] |
obelisk
reviewed
Feb 26, 2026
Owner
obelisk
left a comment
There was a problem hiding this comment.
Just a couple nits. Also want Michele to double check the limitable amounts default serde flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a local development environment for writing and testing plaid rules. Includes a docker-compose setup that builds the runtime from source, compiles WASM modules, and serves webhooks locally.
The companion examples PR (#273) has been merged — this PR provides the runtime changes and local-dev infrastructure those examples depend on.
What's included
local-dev/directory:Dockerfile- multi-stage build: runtime builder, module builder (Rust WASM target), final runtime imagedocker-compose.yml- single service with healthcheck on port 8080docker-compose.dev.yml- variant with external module volume mounts for faster iterationloading.toml,webhooks.toml,apis.toml, etc.) - minimal working config with cranelift backendrules/hello-world/- example rule that responds to POST/webhook/helloscripts/build-modules.sh- build WASM modules outside Dockerscripts/watch-modules.sh- auto-restart on.wasmchanges (inotifywait with polling fallback)scripts/test-webhook.sh- quick smoke testREADME.md- getting started guideRuntime changes:
#[serde(default)]to HashMap/Vec config fields in loader, general APIs, and network config so minimal configs parse without empty TOML table boilerplatewarn!()when log type inference truncates module names at underscoresCI:
LocalDevCheck.yml- builds docker-compose, waits for healthcheck, validates health and hello webhook endpoints, tears downQuick start