With the parse_transform, we can encode each certificate as a
binary with a single element which is a list. This reduces the
size of the beam file in more than 50%, going from 620Kb to
250kb. It also has the benefit of no longer requiring a Makefile,
which improves the compatibility with Windows and removes the need
to generate stray .erl files.
We can only do this trick in a parse transform which is also the mechanism
we use to dynamically generate the cacerts contents.
With the parse_transform, we can encode each certificate as a binary with a single element which is a list. This reduces the size of the beam file in more than 50%, going from 620Kb to 250kb. It also has the benefit of no longer requiring a Makefile, which improves the compatibility with Windows and removes the need to generate stray .erl files.
We can only do this trick in a parse transform which is also the mechanism we use to dynamically generate the cacerts contents.