Closed RunDevelopment closed 1 week ago
Converting to draft until #4246 is resolved.
Converting to draft until #4246 is resolved.
Either that, or I just use BigInt(value)
everywhere for now. If we decide to bigint literals in #4246 later, I can just make another PR to change it later. Grepping for BigInt(
isn't hard.
Converting to draft until #4246 is resolved.
Either that, or I just use
BigInt(value)
everywhere for now. If we decide to bigint literals in #4246 later, I can just make another PR to change it later. Grepping forBigInt(
isn't hard.
Yep, please go ahead and just use the constructor!
Fixes #2822
This adds WASM ABI support for
i128
andu128
. Both are split into 2u64
and passed as such in the ABI.The following types can now be used in argument and return positions:
i128
,u128
,Option<i128>
, andOption<u128>
. Return positions can also useResult<i128, E>
andResult<u128, E>
.It's important to note that
Result<Option<i128>, E>
is not supported. This is because theWasmAbi
trait supports at most 4 primitives, butResult<Option<i128>, E>
would require 5 primitives (2 fori128
, 1 for the option tag, 1 for the result tag, and 1 for the error variant value). FutureResult<Option<T>, E>
ABI optimizations (either combining the result and option tag into one primitive, or raising the number of supported primitives to 5) will makeResult<Option<i128>, E>
possible, but this should be a separate PR IMO.Related to #4201.