package ppx_blob
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=1434847560cd17ecc2971dc52d1dd847e8261b91a6f2082f755cd5696236c154
sha512=846a94447c4ccae106bf88062fe15574e82c6a20707f33756cfb6c35439d7807e4558d4bc522bdaf8695816d1d660933841f9c124f4a26225b0ef4bd498cdc48
Description
ppx_blob allows you 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 arbitary, possibly compressed, data, without the need to respect OCaml's lexical conventions.
Published: 17 Sep 2020
README
ppx_blob
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
.
Dependencies (3)
-
ocaml-migrate-parsetree
>= "1.7.0" & < "2.0.0"
- dune
- ocaml
Dev Dependencies (1)
-
alcotest
with-test
Used by (13)
-
electrod
< "0.1.6"
-
goblint
>= "2.0.0" & < "2.2.1"
- hacl_x25519
- jsoo-react
-
ketrew
< "2.0.0"
-
key-parsers
>= "0.3.0" & < "0.8.1"
- memgraph_kitty
-
ogen
>= "0.1.2"
- passmaker
-
stog
>= "0.15.0" & < "0.19.0"
- u2f
- webauthn
- zanuda
Conflicts
None