-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[trick] to unlock toriiClient with safari/firefox #2038
Conversation
@Larkooo @ponderingdemocritus if you have a chance to confirm this change, it could be awesome. 🙏 |
This will only unlock the start_subscription blocking function on Safari/Firefox as it always returns empty state updates even where there aren't any. Because it seems like the main issue with Safari/Firefox right now is that they are blocking on our GRPC subscription streams until we receive a new message. I'm not sure if this should be the definite solution to implement but I think we can get a better grasp of whats happening thanks to it. |
thx, i applied same trick for other subscribers |
I am not against merging it but it will break the current torii clients, so appropriate changes need to be made to dojo.js/torii-wasm on your side and dojo.c on my side. As we will need to handle empty stream messages without panicking. There will be also be some work to be done on the ModelDiff subscription part of the torii-client, which will need to handle empty state updates. Perhaps also changing the protobuf types to properly return None "state_update", instead of a zero filled state update. |
6f4cf53
to
4b1f8c1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2038 +/- ##
==========================================
- Coverage 68.41% 68.36% -0.05%
==========================================
Files 323 323
Lines 40258 40286 +28
==========================================
+ Hits 27541 27543 +2
- Misses 12717 12743 +26 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work guys, let's iterate with those changes as a new base to at least unlock all major browsers.
* trick: to unlock toriiClient with safari/firefox * same trick for other subscribers * refactor: send initial stream message directly * chore: avoid sender clone --------- Co-authored-by: Nasr <[email protected]>
Description
With local dojo & dojo.js
in dojo.js / torii-wasm / Cargo.toml
refer local dependencies for dojo crates
in dojo.js / torii-wasm / rust-toolchain.toml
update version to
build dojo.js packages 'pnpm build'
build torii
tested with dojo-starter & dojo.js/examples/react/react-app
Related issue
dojoengine/dojo.js#130