I couldn't find in the API anything that would allow me to execute a shell command, something on the line of what system or exec do. Is using the Foreign Function Interface the only way to achieve this at the moment?
Asked
Active
Viewed 319 times
2 Answers
2
You can add this in your code:
exec = %%bslSys.process.exec%% : string, string -> string
This function was added in Stdlib.System (import stdlib.system
) from the build 739

Cédrics
- 1,974
- 11
- 13
1
Yes and that's a design choice, not a limitation. Executing shell commands can be very dangerous from a security standpoint; in Opa security is paramount and therefore we decided not to expose it to the users. If you really need it (and know what you're doing) then it should be very easy to expose one of Ocaml's Sys functions to your program via FFI.

akoprowski
- 3,297
- 1
- 18
- 26