Skip to content

Conversation

connyay
Copy link
Contributor

@connyay connyay commented Oct 10, 2025

Adds support for accessing props passed to workers via service bindings, enabling configuration to be passed based on invocation context.

Adds support for accessing props passed to workers via service bindings, enabling configuration to be passed based on invocation context.
@connyay
Copy link
Contributor Author

connyay commented Oct 10, 2025

I can't figure out how to add test coverage for this.

Threads I pulled:

  1. miniflare I dont see a way to stress context.props with serviceBindings 🤔
  2. basic unit tests in worker/src/context.rs (example) but I cant figure out how to actually execute wasm_bindgen_test tests 🤔

@guybedford
Copy link
Collaborator

Thank you for this one! Yes we don't currently run wasm_bindgen_test properly here... if you want to work on this it would be very much welcome, otherwise I think we are at the mercy of miniflare support.

I'm happy to land this without tests, but I'm also trying to figure out how this fits into the automated bindgen story as we think more about that too - so I may prefer to wait a few weeks on landing this to dwell on that a bit more if you don't mind.

@connyay
Copy link
Contributor Author

connyay commented Oct 11, 2025

I missed wasm-bindgen-test-runner in my first pass. Seems to work locally. Will likely need some CI tweaks, but should be close

@guybedford
Copy link
Collaborator

The generate failure seems unrelated here, I can aim to get that fixed.

For the test failure, seems as simple as adding the wasm32-unknown-unknown target so looks like we're almost good to land here.

@guybedford guybedford merged commit 5f5d27f into cloudflare:main Oct 15, 2025
6 checks passed
@connyay connyay deleted the cjh-props branch October 15, 2025 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants