js_int
js_int copied to clipboard
JavaScript-interoperable integer types for Rust
We theoretically have 54 bits of information in `Int` and 53 bits in `UInt`. Because it is much simpler to just wrap an existing numeric type, we currently use 8...
In particular the latest ones.
Would be potentially useful for state-res, which since [today](https://github.com/ruma/ruma/commit/6c167fca38fa1ac012c85a19e0f1210f6ad47b3c) uses an `AtomicU64` in its tests and benchmarks (previously was using a `static mut` 😬). cc @DevinR528
Title should be self-explanatory. I think we can just go through `$t64::try_from` / `_::try_from($t64)`.
There is not really a reason to build serde_derive for such trivial implementations.
Rust specifies that, when debug assertions are disabled, signed integers over- and underflow. It have not found any documentation about whether bitmasks on negative integers are defined. If they are...
Needs to be off-by-default since it has to delegate to [std's ParseIntError::kind](https://doc.rust-lang.org/std/num/struct.ParseIntError.html#method.kind) to be useful, and that method is unstable.
It would be good to have benchmarks that show that using `Int` or `UInt` is no slower than using `i64` or `u64`.