sunrise-choir / legacy-msg-data

Rust implementation of ssb legacy message data formats.
GNU Lesser General Public License v3.0
4 stars 4 forks source link

Compile for 32bit systems fails #1

Open pietgeursen opened 5 years ago

pietgeursen commented 5 years ago

https://github.com/ssbrs/legacy-msg-data/blob/4f0761c58fabd8c41f7f729d02eb38619be1053d/src/cbor/de.rs#L147

@AljoschaMeyer it would be cool if we can support 32 bit architectures (esp for wasm32.)

Are there deeper design decisions that have gone into using a u64 len here?

AljoschaMeyer commented 5 years ago

Nah, I think this can go. I didn't want the conversion from u64 to usize to be lossy. But since a large value followed by that many entries would run into the memory limit of the machine anyways, that shouldn't actually be a problem. Also, ssb's message size limits should prevent this happening in the first place.