-
-
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
Expose BigInt bindings #1087
Comments
Looking into this further, I see that some other types that are castable when creating manual bindings, are not supported with explicit conversion to I wonder if it would make sense to provide a blanket implementation of |
We've previously decided that any phase 4 proposals can be added to js-sys, so once it's there we're good to go! |
Ah I see. And how about a blanket |
I think we currently have that? Although we may be missing a few by accident! |
That's what I'm trying to say - |
Oh sure yeah makes sense, and seems fine by me to add! |
We decided awhile back that we'd bind stage 4+ proposals, and it looks like this is currently stage 3 so I'm going to go ahead and close this. |
Nooo, I'm working on it in a branch, there is just a bunch of different changes needed. ;( |
Oh that's still fine! I just figured we didn't need a tracking issue for something that's not quite ready yet, but there can always be a crate on crates.io that we pull in later |
Wouldn't it be a bit inconsistent that wasm-bindgen already internally relies on BigInt for u64/i64 support, but doesn't expose explicit bindings to it? This was the main motivation for this issue. |
It only relies on it in an experimental fashion because it's the only way to work with some of those types. |
BigInt has since moved to stage 4: https://github.com/tc39/proposals/blob/master/finished-proposals.md |
@RReverser I just hit this, and it looks like |
Feel free to do it, I stopped my work back then when this feature request was closed due to API being experimental. |
These bindings are present and working in #2629. |
PR #188 a while back added mapping of
{u,i}64
toBigInt
s for custom bindings, but there is still no implementations ofFrom<{u,i}64> for JsValue
or rawBigInt
bindings which makes their construction a bit cumbersome in generic contexts.The text was updated successfully, but these errors were encountered: