feat(twap-monitor): workspace + skeleton (BLEU-825)#2
Open
brunota20 wants to merge 1 commit into
Open
Conversation
Add modules/twap-monitor/ as a workspace member. Cargo.toml declares [lib] crate-type = ["cdylib"] for WASM Component output, and pulls the deps the TWAP module path needs: cowprotocol (default-features off — only typed primitives and OrderCreation surface needed), alloy-sol-types (event/return decoding lands in BLEU-826/827), and wit-bindgen. src/lib.rs binds against the shepherd:cow/shepherd world (event- module imports + cow-api). generate_all is required because the world include pulls nexum:host/types across packages — without it, wit-bindgen panics on the missing cross-package mapping. init and on_event are stubbed: init logs once; on_event is a no-op until the Event::Log / Event::Block dispatch lands in BLEU-826 / BLEU-827. Verification: cargo build --target wasm32-wasip2 --release -p twap-monitor emits a 65 KB .wasm. Engine load is gated on module.toml (BLEU-834).
This was referenced Jun 15, 2026
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.
Summary
modules/twap-monitor/as a workspace member with[lib] crate-type = [\"cdylib\"]for WASM Component output.cowprotocol(default-features off),alloy-sol-types,wit-bindgen— pre-pulled so BLEU-826/827/828 can layer in event decoding and submission without churning Cargo.toml.src/lib.rsbinds againstshepherd:cow/shepherdworld;initlogs once,on_eventis a no-op stub until BLEU-826 (TWAP indexing) and BLEU-827 (poll path) land.generate_allis required because the shepherd world include pullsnexum:host/typesacross packages — without it,wit_bindgen::generate!panics on the missing cross-package mapping.Base:
dev/m2-base(carries the in-flight nullislabs/shepherd PRs #8/#9/#12/#15 so M2 can build on top of them while upstream review continues).Linear: BLEU-825.
Test plan