- SignalDesk1小时前
Original Summary
tsv is a set of performance-focused language tools. Today it ships formatters and parsers for TypeScript/JS, CSS, and Svelte, including a vscode/openvsx extension. JSON and HTML are planned, maybe linting after. The readme has a loose roadmap - <a href="https://github.com/fuzdev/tsv" rel="nofollow">https://github.com/fuzdev/tsv</a><p>tsv's benchmarks show how the Web's newer native tools have some performance left on the table. Formatting TypeScript, tsv is more than twice as fast as oxfmt, and is smaller and uses less memory - <a href="https://tsv.fuz.dev/docs/benchmarks" rel="nofollow">https://tsv.fuz.dev/docs/benchmarks</a><p>From the site:<p>- Formatting TypeScript, tsv is ~2.2x faster than Oxfmt (native-vs-native), ~36x faster than Prettier (native Rust vs Prettier's JS; ~26x as wasm), and ~7.6x faster than Biome (wasm-vs-wasm)<p>- Formatting Svelte, tsv is ~79x faster than Prettier (~55x as wasm) and ~10x faster than Biome (wasm-vs-wasm)<p>- Formatting CSS, tsv is ~3.6x faster than Oxfmt (native-vs-native), ~111x faster than Prettier (~78x as wasm), and ~12x faster than Biome (wasm-vs-wasm)<p>tsv is focused on the Web and Svelte, and doesn't support other nonstandard languages like JSX/TSX and SCSS. This limits possible adoption, but it keeps the tool slim and simple, and there are plenty of other tools that offer a generic language platform - tsv isn't trying to compete with them. Part of my motivation was being tired of slow tools and Svelte's second-class status in this next generation.<p>Before starting the project, I had tried to build on Oxc and Biome, and ran into some discouraging edges. On the benchmarks' language support section, you'll see Oxc doesn't export its CSS parser (recently added, a fork of Raffia - <a href="https://github.com/g-plane/raffia" rel="nofollow">https://github.com/g-plane/raffia</a>), and Biome doesn't export its parsers. Also oxfmt doesn't ship wasm to the browser yet, and tsv's smaller footprint is useful there (Biome is 46.9 MB to tsv's 2.2).<p>Parser conformance is as good or better than Oxc, Biome, and swc, except negative parser cases (errors), which are unfinished. <a href="https://tsv.fuz.dev/docs/conformance" rel="nofollow">https://tsv.fuz.dev/docs/conformance</a><p>The codebase turns 1 year old at the end of the month. It's my first serious AI-generated project, built with Claude Code. I learned Rust in 2015, built some toys including an arcade action prototype, and followed its development over the years, but this is my first project since. tsv wouldn't exist without LLMs - it requires far too much labor for a side project.<p>tsv leans heavily on Prettier, but doesn't copy it. This is why this production release took almost a year, despite the silly fast coding part. I made some different stylistic choices, more for Svelte than TypeScript, and fixed numerous quirks and bugs and documented them. tsv also takes advantage of Svelte 5's whitespace rules, which further diverged from HTML to trim leading whitespace in tags, fixing longstanding formatting warts - <a href="https://svelte.dev/docs/svelte/v5-migration-guide#Whitespace-handling-changed" rel="nofollow">https://svelte.dev/docs/svelte/v5-migration-guide#Whitespace...</a><p>The formatter takes no style config, and instead is hardcoded to Prettier's style with Svelte's config. (which has the uncommon trailingComma:none, but it's good enough for the Svelte team, and I want to defer the choice to them) Supporting Prettier's config would force significant costs on tsv for JS runtime integration, so instead I'm keeping the formatters simple and non-configurable instead of making all users pay those costs. One example of these costs can be see in the CLI benchmark (which is a fork of Oxc's official bench-formatter) - when tsv's binary is used directly instead of through Node, the single-repo CLI benchmark runs tsv 1.7x faster using less than half the memory.<p>Next I'm exploring rearchitecting to Zig-inspired data-oriented parsing - <a href="https://mitchellh.com/zig/parser" rel="nofollow">https://mitchellh.com/zig/parser</a> - which should get tsv closer to Yuku's speed, measured on the site.<p>The vscode extension is
fuzdev.tsv-format- <a href="https://marketplace.visualstudio.com/items?itemName=fuzdev.tsv-format" rel="nofollow">https://marketplace.visualstudio.com/items?itemName=fuzdev.t...</a> - and Open VSX - <a href="https://open-vsx.org/extension/fuzdev/tsv-format" rel="nofollow">https://open-vsx.org/extension/fuzdev/tsv-format</a><p>Repo: <a href="https://github.com/fuzdev/tsv" rel="nofollow">https://github.com/fuzdev/tsv</a>- 情报分类:商业与市场研究
- 分类依据:内容涉及商业、投资或市场动态
- 信息来源:Hacker News 新项目
- 发布时间:2026/10/14 18:57:04
- 暂无回复