You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice to support special libraries whose implementation would be generated at link time. Here are several uses cases:
Build info
moduleDune_build_info : sig(** If inside git, this is the output of [git describe ...] *)valvcs_head : stringoption(** Project version *)valversion : string(** For things that dynamically load libraries *)vallinked_in_libraries : stringlistend
Ocaml config
This could be used for all configurator scripts:
moduleDune_ocaml_config : sigvalversion : int*int*intvalstandard_library : string
...
end
all you'd have to do is add dune.ocaml_config in the libraries field and we'd get this library with the values instantiated with the current build context configuration.
The text was updated successfully, but these errors were encountered:
Will there be a way for a user to add their own variables? I'm thinking of the configurator use case where a user wants to pass custom arguments. We could add either add a function to fetch such arguments into the module. Or just generate a binding for every argument.
I'm also for the feature btw. I'm also wondering if we could implement this feature in terms of variants as well. I'm thinking of generating a single library for the link time library, and a variant implementation for every context.
It'd be nice to support special libraries whose implementation would be generated at link time. Here are several uses cases:
Build info
Ocaml config
This could be used for all configurator scripts:
all you'd have to do is add
dune.ocaml_config
in thelibraries
field and we'd get this library with the values instantiated with the current build context configuration.The text was updated successfully, but these errors were encountered: