Knit, component definition and linking

Good paper

Knit: Component Composition for Systems Software

I want something better than what is currently available, at least to people writing system software or “shrinkwrap” desktop software. The problems with libraries and object files are numerous. Some of the things I’ve struggled with:

I want to override something in a library. For example, and for good reasons, I want to replace the global new function in C++ with myown function; there is no way to override this in a sane and error-free fashion. There are some tricks that work, but they are tricks. But this is true for any function. I really do want to replace malloc, because the ones given to me are crap.

Get out of my namespace! Namespaces are global, and namespace pollution becomes an ever bigger problem as programs get bigger.

Ten versions of Zlib. There are many libraries that link to specific versions of other libraries. When you compose all those together into one program, likely results include at the least bloat, and more often broken behavior, because library revisions change interfaces or add or remove bugs.

Configuration is a nightmare. I have to physically locate specific versions of libraries, which means either building them myself, or revisiting builds as I add libraries or change versions of libraries.

Library boundaries are very granular, meaning significant fractions of the code are involved with building up and tearing down passed parameters.

I want to insert stuff in the middle. If library A calls library C, but I want it to call library B which calls library C, I can’t do that. You could design library A to allow it, but then it’s slower and more complicated to use, especially when it’s a minority use case.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>