antirez / sds

Simple Dynamic Strings library for C
BSD 2-Clause "Simplified" License
4.89k stars 473 forks source link

Using sds in embedded environment, even on Arduino? #98

Open psprint opened 6 years ago

psprint commented 6 years ago

Google doesn't indicate any connection between sds and Arduino, Stm32, etc. And it seems that lightweight and comfortable sds is a welcomed proportion between string.h and C++ string and it could be used even with 2 kB RAM arduino (or 528 kB stm32). Are there any pitfalls in this claim?

2 long fields stored before string data instead of 1 might be significant obstacle for 2 kB RAM, so that's one example pitfall.

Has anyone seen sds use in embedded environment?

DBJDBJ commented 2 years ago

There is only one pitty_fall, heap can not be used. Most of the time.

nathanrpage97 commented 2 years ago

I'm working on a buffer version SBS (no heap usage), still in early stages. I'm not as familiar on how embedable it is, but it should definitely be easier to embed than SDS.