I was thinking about writing glue to integrate the MozJPEG encoding library with Pike. I already figured it should live in src/post_modules/_Image_MozJPEG. The question remains what to do about the library itself?
- The library itself is a JPEG encoding-only library. - It usually is not system provided (because it's encoding only). - The library itself is available at https://github.com/mozilla/mozjpeg - The library is about 1.5MB xz compressed and about 9MB uncompressed.
The options are:
a. Make it pluggable, so that if you manually provide the library source tree in the correct src/post_modules/_Image_MozJPEG/mozjpeg location it will automatically detect and compile it in.
b. Make it fetch the library using git during the configure run, and then jump to option a.
c. Include the library in the Pike source tar.
d. Create a package for that library that I submit to all (Linux) distributions. (Not really an option, too much work).
I'd think that option b) might be the most prudent one. What do you think?
This sounds like a prime candidate for an external module rather than something included in the core, given its somewhat specialist nature and the fact that most systems won't be able to use it without downloading souce code. You could bundle the library source and not increase the size of the Pike tarballs or time of builds that likely won't have the lib. The build infrastructue is the same, so if in the future it were desirable to shift to the core, the effort would be very minimal.
Bill
On Wed, 19 Jun 2019, Stephen R. van den Berg wrote:
I was thinking about writing glue to integrate the MozJPEG encoding library with Pike. I already figured it should live in src/post_modules/_Image_MozJPEG. The question remains what to do about the library itself?
- The library itself is a JPEG encoding-only library.
- It usually is not system provided (because it's encoding only).
- The library itself is available at https://github.com/mozilla/mozjpeg
- The library is about 1.5MB xz compressed and about 9MB uncompressed.
The options are:
a. Make it pluggable, so that if you manually provide the library source tree in the correct src/post_modules/_Image_MozJPEG/mozjpeg location it will automatically detect and compile it in.
b. Make it fetch the library using git during the configure run, and then jump to option a.
c. Include the library in the Pike source tar.
d. Create a package for that library that I submit to all (Linux) distributions. (Not really an option, too much work).
I'd think that option b) might be the most prudent one. What do you think?
Stephen.
William Welliver wrote:
This sounds like a prime candidate for an external module rather than something included in the core, given its somewhat specialist nature and the fact that most systems won't be able to use it without downloading souce code. You could bundle the library source and not increase the size of the Pike tarballs or time of builds that likely won't have the lib. The build infrastructue is the same, so if in the future it were desirable to shift to the core, the effort would be very minimal.
Do external modules support cmod compilation?
Yes, they are identical to modules bundled with pike in every way, except that they're not bundled with pike. They can be registered on modules.gotpike.org and installed automatically using pike -x monger.
Bill
On Wed, 19 Jun 2019, Stephen R. van den Berg wrote:
William Welliver wrote:
This sounds like a prime candidate for an external module rather than something included in the core, given its somewhat specialist nature and the fact that most systems won't be able to use it without downloading souce code. You could bundle the library source and not increase the size of the Pike tarballs or time of builds that likely won't have the lib. The build infrastructue is the same, so if in the future it were desirable to shift to the core, the effort would be very minimal.
Do external modules support cmod compilation?
Stephen.
pike-devel@lists.lysator.liu.se