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

wasm web-sys support #1

Open
emilk opened this issue Nov 19, 2022 · 4 comments
Open

wasm web-sys support #1

emilk opened this issue Nov 19, 2022 · 4 comments

Comments

@emilk
Copy link

emilk commented Nov 19, 2022

Hi, and thanks for this useful library!

What would make it even more useful to me is if worked on the web (wasm32-unknown-unknown), probably using window.performance.memory.usedJSHeapSize.

@emilk
Copy link
Author

emilk commented Nov 20, 2022

Blocked on rustwasm/wasm-bindgen#3159

@Arc-blroth
Copy link
Owner

WASM support also sounds useful to me, so feel free to shoot a PR when that gets unblocked!

(sorry for the late response I've been busy with college)

@emilk
Copy link
Author

emilk commented Jan 26, 2024

This is now unblocked:

https://docs.rs/web-sys/latest/web_sys/struct.Performance.html#method.measure_user_agent_specific_memory

Note that it is chrome-only, and behind the web_sys_unstable_apis feature flag.

Anways, I don't have time to work on this right now, but I'm leaving this here for someone else, or for future me :)

@Arc-blroth
Copy link
Owner

I'm slightly hesitant to include this API in memory-stats right now, since it is both unstable and vendor-specific; that being said at least #8 should unblock building on WASM right now

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

2 participants