I don't know anything offhand, but there seem to be a bunch of different barcode styles. If you stuck with just one type I think it would be pretty easy to do from scratch. For instance EAN-13 doesn't look too painful:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I don't know anything offhand, but there seem to be a bunch of different barcode styles. If you stuck with just one type I think it would be pretty easy to do from scratch. For instance EAN-13 doesn't look too painful:
https://en.wikipedia.org/wiki/International_Article_Number#Binary_encoding_of_data_digits_into_EAN-13_barcode
But I guess you might want UPC?