Adds a run_in_sim feature to bridges (like for src & sinks)#862
Merged
Conversation
This is missing to run end to end in sim the new stacks built on bridges.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds simulation support for bridges to match existing src/sink behavior, letting configs opt out of instantiating the real bridge implementation in sim. Also introduces a macro-level option to skip resource bundle compilation in sim runs.
Changes:
- Add
run_in_simtoBridgeConfig(defaulting totrue) and use it during codegen to select either the real bridge type or a sim placeholder bridge. - Introduce
CuSimBridge(and empty channel-set helpers) as a no-op bridge implementation used whenrun_in_sim: false. - Add
ignore_resourcesto#[copper_runtime(...)]to bypass resource bundle compilation/collection in sim mode.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| core/cu29_runtime/src/config.rs | Adds BridgeConfig.run_in_sim + helper to preserve backward-compatible default behavior. |
| core/cu29_runtime/src/simulation.rs | Adds CuSimBridge placeholder + empty channel-set types for bridges not run in sim. |
| core/cu29_derive/src/lib.rs | Updates codegen to honor bridge run_in_sim, generates sim-only channel sets, and adds ignore_resources attribute support. |
| core/cu29_runtime/tests/sim_bridge.rs | Extends sim test to assert the real bridge is not instantiated when run_in_sim: false. |
| core/cu29_runtime/tests/sim_bridge_config.ron | Sets run_in_sim: false for the test bridge to exercise placeholder behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
This is missing to run end to end in sim the new stacks built on bridges.
Also adds an ignore_resources option so the sim environment never tries to compile resources. We will make that more fine grain later for resources that are not hw.
Related issues
Changes
Testing
just fmtjust lintjust testjust std-ci(if std/runtime paths are impacted)just nostd-ci(if embedded/no_std paths are impacted)pro-tip:
justwith no parameters in the root defaults tojust fmt,just lint, andjust test.Checklist
Breaking changes (if any)
Additional context