Closed xobs closed 3 years ago
rustybuzz
is mostly zero-allocation. So technically, if you provide large enough buffers (instead of internal one), it should work fine. But it will require some substantial changes.
So mainly it's two shaping buffers (input code points + output glyphs), GSUB/GPOS data cache and complex shapers context (can be stack-allocated).
PS: not sure what you meant by "track memory consumption".
By "track memory consumption" I mostly meant a way to determine how much data is used. I suspect the answer is to use valgrind, or use a tracing memory allocator in Rust.
I'm glad to hear it's at least within the scope of possibilities! I'll close this issue for now and will look into what it would take and roughly how much memory would be required on my own.
I'm looking to do advanced text shaping on an embedded platform. I've found that rusttype can operate in an embedded environment with
no_std
support, and I've recently addedrustybuzz
support to advanced features such as Arabic rendering.rusttype
seems like it doesn't use much memory, even when doing actual rendering.How difficult would it be to track memory consumption and/or add support for
no_std
?