ppx_blob

Include a file as a string at compile time
README

OCaml ppx to include a binary blob from a file as a string. Writing [%blob "filename"] will replace the string with the contents of the file at
compile time. This allows the inclusion of arbitrary, possibly compressed, data,
without the need to respect OCaml's lexical conventions.

The filename can be relative to either the source file where [%blob] appears, or relative to the current working directory. If both files exist, the former takes precedence.

To build

Requires OCaml 4.02 or above.

Run make in the top directory. Then run make in the examples directory.
Now run the quine executable.

To install

Run make install in the top directory once make has been run.

Integration with build systems

dune

Add (preprocessor_deps filename) to your filename stanza. See https://github.com/johnwhitington/ppx_blob/tree/master/test for an example. This will make sure the file is copied to the build directory and therefore visible to ppx_blob.

Install
Published
24 Nov 2020
Sources
ppx_blob-0.7.2.tbz
sha256=bcb9dcab18a3b40b5d6d9656575001c6379abf29461aa87d9263d25b59f80a02
sha512=d1701f640ce3dda2e2f0dce7d3f4a6b33ddfdaf793a9beab73e4f9ac93b2912adb7bb3b7fd1800bab258302aef0f0cdefb1e20ee62e6d882b25f0a64eae390a3
Dependencies
Reverse Dependencies
electrod
< "0.1.6"
ketrew
< "2.0.0"
key-parsers
>= "0.3.0" & < "0.8.1"
ogen
>= "0.1.2"
stog
>= "0.15.0"