Open rcoh opened 3 years ago
I probably wouldn't pull in a crate that appears to be bound to a c library as my first choice, personally. But worth looking into.
This isn't especially high priority, I don't think there are an AWS models that use these shapes.
To move forward with this, I recommend pulling in the num
crate. It's pure Rust, well vetted and openly licensed.
This would involve:
num
types in our public API. It would be safer and more future-proof for us to newtype them instead.Updating SymbolVisitor.kt
something like this:
override fun bigIntegerShape(shape: BigIntegerShape?): Symbol {
return symbolBuilder(RustType.Opaque(name = "BigInt", namespace = "num_bigint"))
.addDependency(NumBigInt).build()
}
override fun bigDecimalShape(shape: BigDecimalShape?): Symbol {
return symbolBuilder(RustType.Opaque(name = "BigRational", namespace = "num_rational"))
.addDependency(NumRational).build()
}
CargoDependency.ky
like this:
val NumBigInt: CargoDependency = CargoDependency("num-bigint", CratesIo("0.4.3"))
val NumRational: CargoDependency = CargoDependency("num-rational", CratesIo("0.4.1"))
Can we use the
rug
crate? seems like a pretty mature crate on top of GNU libraries.