left-curve / grug

Grug
https://leftcurve.software/grug
44 stars 5 forks source link

Math redone #22

Closed larry0x closed 1 day ago

larry0x commented 4 weeks ago

In CosmWasm there are the types Uint{64,128,256,512} but they are basically the same file copy-pasted. Same situation with Int64/128/256/512, Decimal128/512, and SignedDecimal128/512. We want to avoid the duplicate code.

Also, CosmWasm uses bnum underneath which isn't a particularly popular library (only about 500k all time downloads).

Ideas:

larry0x commented 4 weeks ago

Note: when importing crypto-bigint, make sure to disable default features, otherwise randomness operators are included

[dependencies.crypto-bigint]
git              = "https://github.com/left-curve/crypto-bigint"
branch           = "v0.5.5-grug"
default-features = false
features         = ["serde", "borsh"]
Rhaki commented 4 weeks ago

Based on the current design:

larry0x commented 1 day ago

Completed