[cairo] Splitting the cairo backends up so they can be in separate packages?

Uli Schlachter psychon at znc.in
Sat Dec 7 08:07:00 UTC 2019


Hi,

On 06.12.19 18:13, Stuart Axon wrote:
[...]>  I was wondering how hard it would be to split up cairo by
backend, would it be feasible to build it so there instead of
libcairo.so, there is libcairo-${backend}.so, e.g.
> libcairo-image.so
> libcairo-xcb.solibcairo-pdf.so
> etc..?

something like this was already proposed before, but I do not remember
the details. The proposal "back then" was to have one libcairo.so
containing "cairo core" and the backends in extra files. The problem
with this idea is the interface between libcairo.so and the backends: It
would need to be public. And thus, it would need to be (semi-)stable.

This idea basically turns all of cairo's internals into public ABI (and
perhaps even public API, but that is avoidable).


Alternatively, you could compile cairo with just the image backend and
call this one libcairo-image.so etc. This would mean that the different
cairo backends are not interoperable, I think.

> Any idea what I would need to change to make it build like this ?

If you want to go down that route, you would have to change the build
system to note give all symbols hidden visibility by default and make
the "slim_hidden_def" not do whatever it does. Afterwards, I think you
could just split the source into multiple .so files as you prefer.

Cheers,
Uli
-- 
- He wants the impossible...!
- That's the short definition of 'captain'.


More information about the cairo mailing list