How to use Yaml_unix in dune project
Hey, I am trying to load a yaml file from disc in my dune/ocaml project. I have added yaml in the dune file: (library (name mytool) (libraries core yaml)) Now, ocaml lsp recognizes the Yaml module and...
View ArticleGenerating files from ppx with dune
I’m attempting to develop a ppx that consumes code in an extension point (i.e. [%txt "foobar"]) and puts a result in a file somewhere. I’ve written the ppx part which seems to work fine, but I’m...
View ArticleYet another unbound value error
I started with an ocaml file Bataille.ml and finally decided to build a project with dune. The initial set up was as below : Bataille |---> Bataille.ml Then I added the dune project: PS...
View ArticleOcaml project structure and code correctness
binance-ocaml-api I’m new to writing Ocaml code and have some design and code style issues. The main problem is that I don’t think I’m very good at OCaml and I need some advice on how to design a big...
View ArticleUnbound module ANSITerminal
Trying to test the ANSITerminal module and installed it on my windows box. PS H:\Ocaml\Bataille> opam install ANSITerminal Then in Bataille.ml: open ANSITerminal;; within my dune project … followed...
View ArticleAttempting to build Eio code
Hi, Is this the way to use ‘eio’ in ‘dune’ ? (executable (public_name vsr) (name main) (libraries eio_main)) I created a switch and installed eio. File "bin/dune", line 4, characters 13-21: 4 |...
View ArticleCan we run pkg-config commands from a dune file?
cf. doesn't install on a Mac · Issue #15 · mkur/nlopt-ocaml · GitHub and this dune file that I would like to correct: https://github.com/mkur/nlopt-ocaml/blob/master/src/dune 4 posts - 3 participants...
View ArticleBasic problem with Dune and .mli files
Hi, I’m new to Dune and OCaml, and I have the fundamental problem that the content of a .mli file is not visible from the corresponding .ml file. I must be missing something very basic. Minimal...
View ArticleAhrefs is now built with Melange
Hello! Since last September, the Melange, Dune, and Ahrefs development teams have been working to enhance the integration between Dune and Melange. As a company that uses a lot of OCaml in the...
View ArticleInstall C headers for C library
Hello, In my setup, I have Coq extract to OCaml which I then compile as a C library with the following setup: (coq.extraction (prelude bitflip) (extracted_modules bitflip)) (executable (name CAPI)...
View ArticleDune exec + dune build running in the same project (web server + melange)
In a full stack project with both a web server and a melange frontend: dune-project my_server my_react_app it’s nice to start the web server with dune exec -w my_server build the melange project with...
View ArticleDune memory consumption with multiple jobs
Hi everyone, I’m trying to build the OCaml portion of the project at https://github.com/hacspec/hax, to be found here. But unless I force dune to run with a single job my laptop will inevitably run...
View ArticleWhy do I need to specify a NAME when running `dune init proj NAME` instead of...
Fairly new to OCaml still. Reading the quickstart I’ve always just done as they say (as in my title), but it always feel like added friction to not be able to initialize a project in place. So I’m...
View ArticlePackage frama-c not found after opam install
Hi, I tried to install an old version of frama-c (because library cil requires ocaml < 4.06) … opam switch create 4.05-ocaml-cil 4.05.0+rc1 opam install frama-c everything seems fine: opam list |...
View ArticleRunning executable and inline tests in watch mode at them same time for...
Hi folks! I have some problems I want to solve: I am building a little boilerplate project for https://adventofcode.com/ and I’ve stumbled into some problems in regards to dune exec, dune test and...
View ArticleLibrary not found
I have the sequence below which I synthesize as : I have installed the library stdint I have added Stdint in my dune file : (executable (public_name Bataille) (name main) (libraries Bataille...
View ArticleBan/limit a dependency in dune-project
In dune-project you can specify the dependency versions of the project (and generate opam files) Is there any way to ban a specific dependency, so that it can’t be used as a dependency in dune files...
View Article[ANN] dune.3.12.1
The Dune team is pleased to announce the release of Dune 3.12. Note that due to a mistake during the release process, version 3.12.0 was not published to opam and should not be used. So here’s the...
View ArticleInstalling shell completion file in an opam package
I’ve been working on a simple library to automatically generate shell completion files from spec for the Arg module. I’ve been having trouble figuring out how to properly install these completions...
View Article