Quantcast
Channel: OCaml - Topics tagged dune
Browsing all 517 articles
Browse latest View live

build dune doesn't work

install **dune** 3.11.1 <><> **Processing actions**...

View Article


Compiling ocaml dune project dynamically with 3rd party code

Hello, I am writing a project that is using another ocaml project (let’s say GitHub - mirleft/ocaml-tls: TLS in pure OCaml). I am able to compile my code, but looks like it is compiled statically. And...

View Article


Is there an easy way to tell opam or dune that a library dependency is...

Hello, I am thinking about opam packages which rely on some system-wide installation of a dependency. E.g. nlopt-ocaml relies on nlopt being installed in the right place. Is there a way to support...

View Article

Is it possible open a module for all files in a dune library or dune project?

Let’s say I want to open Base for all files in a dune library or a dune project. Do I have to say open Base in every file or can I tell dune somehow to open Base automatically for all files? 2 posts -...

View Article

Installing Developer Tools with Dune

Dune can install and run developer tools in the context of a project. This feature is available in the Dune Developer Preview and in the upcoming release of Dune 3.17. As with all of Dune’s package...

View Article


I am looking for an example project with dune and ctype

I am considering learning OCaml, but the quality of the documentation is disappointing. So, I am looking for an example project—it may be Gtk or Ncurses—that demonstrates success in working with C...

View Article

Improved Toplevel Workflow in Dune

I’d like to highlight a new toplevel feature introduced in the recently released dune 3.6.0. We have the new top-module subcommand for loading modules without hiding their interface behind their mli....

View Article

Why does clarifying the namespace lead to unbound error but not adding the...

let file = "example.dat" let message = "Hello!" let () = (* Write message to file *) let oc = open_out file in (* create or truncate file, return channel *) Printf.fprintf oc "%s\n" message; (* write...

View Article


Inconsistencies in dune Warnings

I have my dune-workspace configured with (dev (flags (:standard -warn-error +A-26-27-K-58)) It seems like dune is caching module builds with warnings so subsequent rebuilds aren’t showing warnings...

View Article


Error: unbound module for local import of dune package

Hi, I have written a library “ocaml_component_framework” with dune intended to be used locally (in another repo that does not use dune but a legacy makefile). When I run “opam pin add .” it runs, I...

View Article

Is opam using the dune cache when building packages?

I can’t seem to figure this out. I have enabled the dune cache in ~/.cache/dune. This directory grows in size when I do dune build, so it seems to be working. However, if I nuke the cache and install...

View Article

Image may be NSFW.
Clik here to view.

[ANN] Dune 3.17

The Dune team is happy to announce the release of Dune 3.17.0! Among the list of changes, this minor release enables the Dune cache by default for known-safe operations, adds out-of-the-box support...

View Article

Image may be NSFW.
Clik here to view.

Preprocess causes "Multiple rules generated for...

Hi everyone, when I write two executable stanza in dune file for “hello world” program, dune build is ok. This error occures when preprocess are added to both exectables below. Any ideas how to let...

View Article


Foreign_archives in dune really seem to want a dll

I’m trying to include my self-built library (let’s call it libx.a), but when I include it in a “foreign_archives” stanza (foreign_archives ../my-library/x), dune really wants a dynamic library...

View Article

Image may be NSFW.
Clik here to view.

Hi, I wrote 2 blog posts about cram tests and It’s a good idea to share them together. Cram tests: a hidden gem of dune I’m a strong advocate of unit tests, I can confidently say that it has saved me...

View Article


Dune, emacs compilation error, and setting the directory in actions

Hello, TL/DR: compiling a file using an action in dune seem to run directly in the directory where the dependency lives, breaking error reporting in emacs. When compiling an OCaml file for a project,...

View Article

Enabling and disabling preprocessors with dune

Is it possible to enable and disable preprocessors with dune actions, profiles, or dune-workspace? My use case is that I would like to use a preprocessor when I compile with dune build...

View Article


[Real world Ocaml] How do I import core_unix time?

So, I’ve been following Real World OCaml, the 2nd edition and I hit a block I’m afraid I cannot overcome with google, documentation or AI help. The code in question: open Core let () =...

View Article

Incr_dom installing dependencies?

Hey all, I’m currently a sophomore in college and am completely new to OCaml trying to run the helloworld example with incr_dom from here. I’m currently in the helloworld working directory, am running...

View Article

Linking problem in compiling my binding of Allegro 5

Hello. I am working on a binding of Allegro 5, a C library similar to SDL, aimed at video games. It compiles well with my default switch which uses OCaml 5.2, but I can’t have it to compile with OCaml...

View Article
Browsing all 517 articles
Browse latest View live