OCamlPro / drom

drom is a wrapper over opam/dune in an attempt to provide a cargo-like user experience. It can be used to create full OCaml projects with sphinx and odoc documentation. It has specific knowledge of Github and will generate files for Github Actions CI and Github pages.

Home Page:https://ocamlpro.github.io/drom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Help] How to create a native shared library using drom?

abhi18av opened this issue · comments

Hi team,

I was wondering how can I use drom to create a shared_object?

I tried the following steps to achieve this goal.

  • I created a project
drom new drom_program_1 --skeleton program
  • Updated the dune file for the src/drom_program_1/dune
; generated by drom from package skeleton 'driver'
(executable
  (name main)
  (public_name drom_program_1)
  (package drom_program_1)
  (libraries drom_program_1_lib )
  (modes native shared_object)
  
  )


(documentation
  (package drom_program_1))


Thanks for your help!

You can use dune-stanzas in the [fields] part of package.toml:

[fields]
dune-stanzas = "(modes native shared_object)"

Does it work ?

Hi @lefessan ,

Thanks for reverting back on this - since at the time I wasn't able to continue with this pet project and had to move on to more pressing things at work.

I'll close the issue as it's not a bug/feature-request and will circle back here once I have any updates.