package ppx_blob
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=f115e90a5f1075cedc9d930ab91271f8670ece4dee10dc1147ab39b8afb570e4
sha512=bad11f8ffbec82a04bb5f90e7548a7ad9ac4bf7e9b733815f6c956d7e0002fb258c52783ded847ab09fe3cd60e5eac2901fccaefd4fd4f885f20942d0ef66fea
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: 30 Jul 2024
README
ppx_blob
This is an 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.
Integration with build systems
Dune
Add (preprocessor_deps (file path/to/file))
to your library or executable stanza. See test/dune for an example. This will make sure the file is copied to the build directory and therefore visible to ppx_blob
.
Development
Requirements:
OCaml 4.08+
Packages: see ppx_blob.opam.
Run make
and make test
.
Dev Dependencies (1)
-
alcotest
with-test
Used by (23)
- activitypub
-
alt-ergo-lib
>= "2.5.0"
-
chamo
>= "4.0"
-
electrod
< "0.1.6"
-
goblint
>= "2.0.0" & < "2.2.1"
- hacl_x25519
-
irmin-cli
>= "3.9.0"
- irmin-server
- jsoo-react
-
ketrew
< "2.0.0"
-
key-parsers
>= "0.3.0" & < "0.8.1"
- mazeppa
- memgraph_kitty
-
ogen
>= "0.1.2"
- passmaker
- sherlodoc
- slipshow
- solid_server
- stk
-
stog
>= "0.15.0"
- u2f
- webauthn
- zanuda
Conflicts
None