ArkType: Ergonomic TS validator 100x faster than Zod
1–10 of 72 posts
Re: ArkType: Ergonomic TS validator 100x faster than Zod
#2I've been evaluating schema libraries for a better-than-Zod source of truth, and ArkType is where I've been focused. Zod v4 just entered beta[1], and it improves many of my problems with it. For such a mature library to improve like this, v4 is treat and speaks volumes to the quality of engineering. But ArkType has a much larger scope, and feels to me more like a data modeling language than a library. Something I definitely want as a dev!
The main downside I see is that its runtime code size footprint is much larger than Zod. For some frontends this may be acceptable, but it's a real cost that isn't wise to pay in many cases. The good news is with precompilation[2] I think ArkType will come into its own and look more like a language with a compiler, and be suitable for lightweight frontends too.
Re: ArkType: Ergonomic TS validator 100x faster than Zod
#3Re: ArkType: Ergonomic TS validator 100x faster than Zod
#4There’s a few tools out there that generate code that typescript will prove will validate your schema. That I think is the path forward.
Re: ArkType: Ergonomic TS validator 100x faster than Zod
#5Re: ArkType: Ergonomic TS validator 100x faster than Zod
#6ArkType is a really interesting library that has a difficult time marketing itself. More than being a schema validator, it brings TS types into the runtime, so you can programmatically work with types as data with (near?) full fidelity. I've been evaluating schema libraries for a better-than-Zod source of truth, and ArkType is where I've been focused. Zod v4 just entered beta[1], and it improves many of my problems w…
Yes, it unfortunately really does bloat your bundle a lot, which is a big reason I personally chose to go with Valibot instead (it also helps that it's a lot closer to zods API so it's easier to pickup).
Thanks for linking that issue, I'll definitely revisit it if they can get the size down.
Re: ArkType: Ergonomic TS validator 100x faster than Zod
#7V4 of zod landed recently and it promises better perf https://v4.zod.dev/v4
Still far behind if the 100x is to be believed. v4 isn't even a 10x improvement. Nice changes though.
Re: ArkType: Ergonomic TS validator 100x faster than Zod
#8Since recent typescript features have made it more possible, I’m less interested in runtime validation, and really only keen in build-type schema validation. There’s a few tools out there that generate code that typescript will prove will validate your schema. That I think is the path forward.
Re: ArkType: Ergonomic TS validator 100x faster than Zod
#9ArkType is a really interesting library that has a difficult time marketing itself. More than being a schema validator, it brings TS types into the runtime, so you can programmatically work with types as data with (near?) full fidelity. I've been evaluating schema libraries for a better-than-Zod source of truth, and ArkType is where I've been focused. Zod v4 just entered beta[1], and it improves many of my problems w…