[LAD] Lightweight LV2 implementation (Was: RDF libraries)
d at drobilla.net
Thu Sep 29 05:48:17 UTC 2011
On Mon, 2011-02-28 at 17:24 +0100, Olivier Guilyardi wrote:
> Once you remove the glib dep, I should be able to tell you what size I get when
> compiling with the Android NDK. I have checked again, and 100Kb is good in my
> case. FYI, APK packaging uses zip compression.
I just released serd-0.5.0, sord-0.5.0, and lilv-0.5.0 which
all have zero dependencies except each other and the C standard library.
All work on at least GNU/Linux (Debian Testing), Mac OS X (10.6), and
Windows 7 (under MingW), but I havn't tried any cross compiling yet.
You should be able to easily get less than 100Kb. Compiling static
libraries for 32-bit i386 with -Os I get:
Which is 80k total. It compresses well:
Which is 36k total.
The code is not really optimized for binary size (e.g. there are many
more functions than there could be), but this seems good enough for any
reasonable application (certainly a dramatic improvement over the
several megs of Redland or GLib, anyway). Quite a bit of this code is
unused in a typical LV2 host (e.g. SerdWriter), so if you're building a
static app you can probably coax GCC into culling it down even
further... if not, I could add a --read-only compile option to omit
the writing stuff which should save a bit more.
Let me know how it goes with the Android NDK, I havn't tried.
More information about the Linux-audio-dev