-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
web_sys::Navigator::hardware_concurrency should return u64 #2425
Comments
I found this via a related nit... the offset parameter for vertexAttribPointer in WebGL is a GLintptr type, Typedef is
and so the generator produces bindings as both i32 and f64, (rather than i32 and u64?) wasm-bindgen/crates/web-sys/src/features/gen_WebGlRenderingContext.rs Lines 1942 to 1971 in 564ce74
I guess an f64 can encode more of the integer space of a u64 than an i32 can, but not all of it! Interesting decision by the IDL translator, to be sure. |
That's sort of an unsolvable problem - even if the type on the Rust side is changed to |
Probably one of those things that can be fixed only on a major version bump: right now
Navigator::hardware_concurrency
returnsf64
, but it should be returningu64
as per spec (https://html.spec.whatwg.org/multipage/workers.html#dom-navigator-hardwareconcurrency) and for easier consumption by the end user.The text was updated successfully, but these errors were encountered: