Skip to content
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

Discuss requirement of cross-origin isolated #45

Closed
maxammann opened this issue Apr 26, 2022 · 4 comments
Closed

Discuss requirement of cross-origin isolated #45

maxammann opened this issue Apr 26, 2022 · 4 comments

Comments

@maxammann
Copy link
Collaborator

maxammann commented Apr 26, 2022

maplibre-rs currently requires that the host site, which runs maplibre-rs needs to be "corss-origin isolated". This is a quite strict requirement: https://web.dev/coop-coep/

The reason for this requirement is the usage of SharedArrayBuffer. I see three possible solutions for this problem:

  • Provide an alternative implementation for "multi-threading" on the web. This would complicate the asynchronous capabilities of maplibre-rs even more. This also introduces a performance penalty because computed data needs to be serialized in order to pass it between WebWorkers
  • Hope that the restrictions for SharedArrayBuffer are lowered in the next 2 years.
  • Live with that fact. This is probably not really possible. Enabling "cross-origin isolation" has an impact on any cross-origin resources used by users.

More Info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes

@maxammann
Copy link
Collaborator Author

There are apparently discussions about removing the restrictions for SharedArrayBuffer:

May 6, 2021: Based on feedback and issues reported we've decided to adjust the timeline for SharedArrayBuffer usage in none cross-origin isolated sites to be restricted in Chrome M92.

https://web.dev/coop-coep/

@maxammann
Copy link
Collaborator Author

Minor relaxation: https://github.com/WICG/credentiallessness

@maxammann
Copy link
Collaborator Author

related: whatwg/html#6364

@maxammann
Copy link
Collaborator Author

moved to: #60

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

No branches or pull requests

1 participant