Closed griffi-gh closed 1 year ago
What programming language are you working in? This is the repository for the TOML language specification, not any particular implementation. Find the repository for your programming language's implementation and report your issue there.
(This isn't really a bug, though. TOML only mandates support for signed 64-bit integers. Support for anything out of that range is implementation-defined.)
Yeah, sorry this is the wrong repo, i was looking for toml-rs/toml not toml-lang/toml
And also I didn't know that max integer size is defined by the standard.
And also I didn't know that max integer size is defined by the standard.
It's not the maximum, but actually the minimum; TOML integers must support the full signed i64
range. There's nothing in the spec saying they can't support numbers outside that range (e.g. u64
, or 128-bit ints).
In practice though you'll find pretty much all implementations will just stick to i64
range so they don't create fragmentation, otherwise there can be situations where TOML exported from one environment can't be parsed in another.
There's a good discussion here if you want a bit more context.
u64
fields only accept numbers that can fit intoi64
Example 1
Example 2 (works)