3 ms·
Libraries for a lot of this stuff exist (albeit in many cases not very mature yet): - https://github.com/pop-os/cosmic-text https://github.com/pop-os/cosmic-te
by nicoburns 4y ago
Libraries for a lot of this stuff exist (albeit in many cases not very mature yet):
- https://github.com/pop-os/cosmic-text https://github.com/pop-os/cosmic-text does text layout (which Taffy explicitly considers out of scope)
- https://github.com/AccessKit/accesskit https://github.com/AccessKit/accesskit does accessibility
- https://github.com/servo/rust-cssparser https://github.com/servo/rust-cssparser does value-agnostic CSS parsing (it will parse the general syntax but leaves value parsing up to the user, meaning you can easily add support for whatever properties you what). Libraries like https://github.com/parcel-bundler/lightningcss https://github.com/parcel-bundler/lightningcss implement parsing for the standard css properties.
- There are crates like https://github.com/BurntSushi/bstr https://github.com/BurntSushi/bstr and https://docs.rs/wtf8/latest/wtf8/ https://docs.rs/wtf8/latest/wtf8/ for working with non-unicode text
We are planning to add a C API to Taffy, but tbh I feel like C is not very good for this kind of modularised approach. You really want to be able to expose complex APIs with enforced type safety and this isn't possible with C.