Ad hoc use of a NIF
Ali Sabil
ali.sabil@REDACTED
Tue Mar 24 16:14:07 CET 2020
On Tue, 24 Mar 2020 at 11:33, Harris, Robert <robert.harris@REDACTED>
wrote:
> Hi,
>
> For the sake of example, I have a library with two files: a.erl and
> b.erl, where a.erl is accompanied by a NIF. I am constrained by the
> need to construct b.erl using the output of a function contained in the
> NIF.
>
> I was planning to have the make process (called from rebar) for a's NIF
> use an escript to load it in order to generate b.erl. This doesn't work
> because, as far as I can tell, I can't load a NIF from the shell.
>
> Could anyone recommend a clean solution?
>
Did you consider generating the `b' module at runtime, without in fact ever
creating a `b.erl' file?
> Robert
> Confidentiality Notice | This email and any included attachments may be
> privileged, confidential and/or otherwise protected from disclosure. Access
> to this email by anyone other than the intended recipient is unauthorized.
> If you believe you have received this email in error, please contact the
> sender immediately and delete all copies. If you are not the intended
> recipient, you are notified that disclosing, copying, distributing or
> taking any action in reliance on the contents of this information is
> strictly prohibited
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200324/029bbf7b/attachment.htm>
More information about the erlang-questions
mailing list