Skip to content

Adds a run_in_sim feature to bridges (like for src & sinks)#862

Merged
gbin merged 7 commits into
masterfrom
gbin/bridge_sim
Feb 26, 2026
Merged

Adds a run_in_sim feature to bridges (like for src & sinks)#862
gbin merged 7 commits into
masterfrom
gbin/bridge_sim

Conversation

@gbin

@gbin gbin commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

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

  • Closes #

Changes

Testing

  • just fmt
  • just lint
  • just test
  • optional full just std-ci (if std/runtime paths are impacted)
  • optional full just nostd-ci (if embedded/no_std paths are impacted)
  • Other (please specify):

pro-tip: just with no parameters in the root defaults to just fmt, just lint, and just test.

Checklist

  • I have updated docs or examples where needed
  • I have added or updated tests where needed
  • I have considered platform impact (Linux/macOS/Windows/embedded)
  • I have considered config/logging changes (if applicable)
  • This change is not a breaking change (or I documented it below)

Breaking changes (if any)

Additional context

gbin added 2 commits February 26, 2026 08:02
This is missing to run end to end in sim the new stacks built on
bridges.
@gbin gbin added enhancement New feature or request include in changelog labels Feb 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_sim to BridgeConfig (defaulting to true) 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 when run_in_sim: false.
  • Add ignore_resources to #[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.

Comment thread core/cu29_derive/src/lib.rs
@gbin gbin merged commit 978b2fc into master Feb 26, 2026
23 checks passed
@gbin gbin deleted the gbin/bridge_sim branch February 26, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants