2 ms·
> Shameless plug for my syntax highlighting library in Rust was this really necessary?
by hnbroseph 9y ago
> Shameless plug for my syntax highlighting library in Rust
was this really necessary?
- graysonk 9y agoIt's a time-honored tradition to respond to any post with your rust port of it.
- trishume 9y agoI mean, it wasn't, but no comment is. Judging by all the upvotes people seemed to get value from it. I think it's interesting to compare syntax highlighting approaches. If syntect was literally the same thing, but only usable in Rust, I wouldn't have commented. But syntect uses a different approach that's better for some use cases, and as demonstrated by Sourcegraph, is useable from a Go program (albeit with a cost), so is a plausible alternative to consider. The tradeoff is of course that it isn't directly in Go, and so may be slower, and also it supports fewer languages out of the box (although you could probably exceed Pygments with all online tmLanguage and sublime-syntax files).