On Dec 14, 2011, at 17:55 , Alain Frisch wrote: >> I'm quite interested in the ability to create .cmxs files without a C >> compiler and can already picture me using it. I've also noticed Benedikt's >> ocamlnat work. Would it be usable to script native-code applications? >> Maybe with less requirements? > > Benedikt's work on ocamlnat also includes a similar direct code generator as > ours(to avoid the external assembler); I don't think it comes with a COFF > file emitter, though. But yes, ocamlnat can be used to script native-code > applications.
ocamlnat does that already yes, although I doubt that it works on Windows out of the box (it did initially but I haven't tested for quite a while). We also did some prototype work on ELF and Mach-O emitters for ocamlopt earlier this year, which would remove the dependency on the toolchain assembler, but we found it easier to avoid the external stuff altogether and do everything in process (as implemented by ocamlnat now). Object Code emitters (ELF, Mach-O, PECOFF, etc.) would certainly be possible and with some restructuring in the compiler backend, they would even fit into the whole picture, and it would make life easier for OCaml cross-compilers and OCaml on Windows. But with the recent statements regarding the maintenance of the OCaml compiler toolchain and the fruitless discussion wrt. my initial proposal, I'm currently not willing to waste my time on this. > Alain Benedikt -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
