Skip to content

Figure out endianness story #45

Closed
Closed
@Manishearth

Description

@Manishearth

Right now TinyStr contains an integer that can be interpreted as a string. There are also ways of looking at TinyStr as an integer, both by looking at the integer in the native endianness, and by converting it to a little-endian representation that can be sent across machines.

The conversion methods are kinda haphazard, #43 completes the set but really we should figure out what utilities we want to expose for viewing the TinyStr as an integer and stick to those.

Furthermore, it's unclear to me if the tinystr!() macro is sound when cross compiling: if you build your code on a little endian system targeting big endian, will the codegen use the little endian representation? It's kinda tricky to investigate, and our constructors from numbers should probably be exceedingly clear about this.

Ideally we can add dedicated constructors for the ULE use case (#44)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions