- Notifications
You must be signed in to change notification settings - Fork3
DSL for C APIs to aid consistency of naming schemes and comments.
License
TokTok/apidsl
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ADSL forC API'sto add consistency of naming schemes and comments.
You will needOCaml (>= 4.03; older versions may not work) andOPAM (atleast 1.2). Instructions on how to installOCaml andOPAM can be foundhere.
Formake coverage you also needoasis andbisect_ppx. The coverage scriptwill attempt to install these if they are not yet installed.
Make sure to configureOPAM by runningopam init. (Depending on yourconfiguration you might also need to runeval `opam config env`). Runningopam install ocamlfind ppx_deriving menhir should install all dependenciesrequired for APIDSL.
Just runmake in APIDSL's root directory. The apidsl binary can be foundunder./_build/apigen.native
Alternatively, you can use Docker to build APIDSL. This is useful when yourLinux distribution doesn't have the versions of dependencies required for APIDSLor you don't want to pollute your system by installing all those dependencies.
Get Docker on your system.Note that some versions ofDebianandUbuntuhave it in their package repository.
Run the following. It takes about 4 minutes to run on my machine, so you cangrab a cup of coffee/tea in the meantime.
# Clone this repositorygit clone https://github.com/TokTok/apidslcd apidsl# Build "apidsl" Docker image based on Dockerfile instructionsdocker build -t apidsl.# Run the image, i.e. execute the CMD part of the Dockerfile, mounting the# current directory (the APIDSL repository) as /apidsl inside the imagedocker run --rm -v$PWD:/apidsl apidsl# Make sure apigen.native has appeared in the current directoryls -lbh apigen.native# Copy it over to /usr/local/binsudo cp ./apigen.native /usr/local/bin/# Optional Cleanup# Delete the image we have builtdocker rmi apidsl ocaml/opam:alpine-3.15-ocaml-4.13-flambda-fp# Make sure no related containers or images are left.# They may use a lot of disk space.docker ps -adocker images -a
You should now have/usr/local/bin/apigen.native.
TODO, but you can check some examples in tests directory.
About
DSL for C APIs to aid consistency of naming schemes and comments.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.