Linux is not a library that is bound to your applications. Technically, is it simply the kernel, which provides services to your applications. Most people think of Linux as a (usually) vast collection of applications, tools, and sundry other files, and perhaps this is your view. If so, you can definitely reduce the Linux footprint to a much smaller size than the traditional size of a Linux desktop distro.
I routinely use a Linux configuration the occupies less than 64 MB of memory at runtime, including a significant embedded application, and uses zero bytes of disk/nonvolatile storage. The configuration was heavily modified from MicroCore Linux which no longer exists. The maintainers of MicroCore now distribute Core Linux, a tiny Linux