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

Update JS static globals to use new wasm_bindgen(thread_local) #538

Open
shanemadden opened this issue Aug 29, 2024 · 0 comments
Open

Update JS static globals to use new wasm_bindgen(thread_local) #538

shanemadden opened this issue Aug 29, 2024 · 0 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@shanemadden
Copy link
Collaborator

We're currently having to suppress deprecation warnings https://github.com/rustyscreeps/screeps-game-api/blob/main/src/lib.rs#L99 due to our use of JsStatic instead of the new thread_local method offered by wasm_bindgen for memory's ROOT as well as ROOM_POSITION_PROTOTYPE/COST_MATRIX_PROTOTYPE. I spent a few minutes trying to get these variables usable with the new approach and it wasn't immediately obvious due to additional wrapping by LocalKey - need to work this out then remove the suppression of the deprecation warnings.

@shanemadden shanemadden added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

1 participant