-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling ppx_deriving with +musl+static
#212
Comments
Just chiming in as I thought about this in the past. Removing However, it seems to me that it would be easy to make |
Out of curiosity, how does ppxlib solve this? does it support the toplevel at all? |
Well, it doesn't really solve it. When using ppx packages via
One solution would be to do like we were doing at the Camlp4 times and simply do the preprocessing in the toplevel process directly. Then we wouldn't need anything special for the toplevel. Thinking about this again, now that the vast majority of ppx rewriters are compatible with the static driver model and in particular based on The only tedious part is the handling of findlib predicates. But with a bit of work on Dune and the toplevel, it should be manageable at least for Dune based ppx rewriters. |
Thanks for your input, @diml and @emillon. As I understand it this is something that's possible but hard to do without at least some amount of work. My follow-up to that is: should this be a goal for ppx_deriving given the amount of work involved? I can certainly not gauge the amount of work so I'll trust your opinions. |
Well, there is not much Regarding whether it is worth doing this work, I personally think it is as it would make the system technically simpler overall (less code paths). However, it's not urgent given that things mostly work right now. |
(Quick note in case others like me end up here looking to build static binaries but without actually needing a statically-linked compiler: I found out today that to compile static binaries, one only needs to use a |
I wanted to revive the conversation started in #187 wrt compiling ppx_deriving in a switch that has a statically linked OCaml compiler.
I understand this is not currently possible given that
ppx_deriving
uses Dynlink, which is not available in a statically linked compiler. Is there a way forward that removes the dynlink dependency fromppx_deriving
, or is that out of the question / would entail significant re-architecting?The text was updated successfully, but these errors were encountered: