Embed .cube LUT in .xmp

I use cube LUTs a lot. Using them creates extra dependencies, in a different location, for the edit.

Wouldn’t it be nice if these plain text files could be embedded in the XMP file itself? The G’MIC ones are 132 KB.

Could it be done while still conforming to the XMP standard?

While there seems to be no formal limit on the size of an XML element, in practice there is one: the data is read into a buffer, usually of a pre-defined size. So you will be limited by the program that uses the smallest buffer.
That is why darktable has an option to “store XMP tags in compressed format”.

I’d expect a 132kB LUT to go over the internal limit…

World it be possible to convert the LUTs to the compressed .gmz format?

The compressed format .gmz is only available when GMIC is installed. This format can hold a full library of LUTs, and LUT data loaded from this type of file can be saved to the database and XMP files.
(darktable 4.6 user manual - LUT 3D)