Comment by devsda
1 year ago
> Turns out some of my types were 80k characters long,
I know Rust uses name/symbol mangling but what sort of type declaration in Rust ends up with that long names ?
1 year ago
> Turns out some of my types were 80k characters long,
I know Rust uses name/symbol mangling but what sort of type declaration in Rust ends up with that long names ?
A parser with Chumsky. There’s a lexer with logos too, but that’s simple and fast. Chumsy makes you create parsing functions which are chains of other parsing functions, and the types can become insanely long, if you don’t box some of them for erasure.
edit: to elaborate, it’s not that the type name was 80k characters, the type definition itself was, like TypeA<TypeB<TypeC, TypeD>>, TypeB<TypeE, TypeF<TypeG…>>>