srijs / rust-aws-lambda

Support for running Rust programs on AWS Lambda
https://srijs.github.io/rust-aws-lambda
MIT License
319 stars 17 forks source link

Stop using 64 bit numbers for all numeric event fields #6

Closed LegNeato closed 6 years ago

LegNeato commented 6 years ago

Right now when we parse the Go event defs, we always generate Rust code with the 64bit version of the type. Even if Go says a field is an i32, we generate the corresponding Rust field with i64. While this works, because memory use is important on lambda we should match the Go size exactly.

That being said, it looks like pretty much all numeric types are 64 bit in the Go typedefs.

LegNeato commented 6 years ago

Actually, it looks like the events are always using 64 bit numbers so while this isn't "correct" there is no real need to do anything.