StreamOps::timed (crates/wingfoil/src/fluent.rs, next to print) passes each value through unchanged and prints a performance summary at the end of the run. It is not exposed in Python — grep -rn '\btimed\b' crates/wingfoil-python/src finds only unrelated hits.
Its neighbour print is bound, and the two are the same shape, so this is a small, well-modelled first contribution to the Python crate.
Where to start
PyStream::print in crates/wingfoil-python/src/graph.rs (~line 662) is the model. The binding is one line over the erased PyElement edge plus rustdoc:
pub fn timed(&self) -> PyStream {
self.wrap(self.stream.timed())
}
Check the bound before assuming it compiles: timed wants T: Clone + Default + 'static and PyElement satisfies that (print additionally needs Debug and gets it). If it does not compile, say so on the issue rather than working around it — that would be a real finding about the erased edge.
The recipe for the Python step is /new-op §7 (.claude/commands/new-op.md), which distinguishes the one-line forward (an op whose Out is T, which this is) from the hand-written register_op1 needed for tuple outputs.
Acceptance criteria
Branch from main, target base main. See CONTRIBUTING.md.
StreamOps::timed(crates/wingfoil/src/fluent.rs, next toprint) passes each value through unchanged and prints a performance summary at the end of the run. It is not exposed in Python —grep -rn '\btimed\b' crates/wingfoil-python/srcfinds only unrelated hits.Its neighbour
printis bound, and the two are the same shape, so this is a small, well-modelled first contribution to the Python crate.Where to start
PyStream::printincrates/wingfoil-python/src/graph.rs(~line 662) is the model. The binding is one line over the erasedPyElementedge plus rustdoc:Check the bound before assuming it compiles:
timedwantsT: Clone + Default + 'staticandPyElementsatisfies that (printadditionally needsDebugand gets it). If it does not compile, say so on the issue rather than working around it — that would be a real finding about the erased edge.The recipe for the Python step is
/new-op§7 (.claude/commands/new-op.md), which distinguishes the one-line forward (an op whoseOutisT, which this is) from the hand-writtenregister_op1needed for tuple outputs.Acceptance criteria
PyStream::timedexists, with rustdoc saying what it prints and when (end of run, not per tick).graph.rs'smod tests, next to theprint/inspectones, asserting values pass through unchanged.crates/wingfoil-python/tests/covering the same from the Python side.crates/wingfoil-python/docs/),timedis added there too.cd crates/wingfoil-python && maturin develop && pytestpasses;cargo fmt --allandcargo lint-allclean.Branch from
main, target basemain. SeeCONTRIBUTING.md.