English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocaml, llvm and generating code at runtime
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-01-01 (16:45)
From: Joel Reymont <joelr1@g...>
Subject: ocaml, llvm and generating code at runtime
Does anybody have example code that shows how to generate OCaml bindings at runtime with LLVM?

My goal is to compile an AST into code that uses OCaml functions within the same binary that's doing the compiling.

I don't think it can be done with OCaml since it requires a standalone assembler, linker, etc. Correct me if I'm wrong, though. Mine is a web-based compiler with potentially many concurrent sessions. Running gas, ld, etc. seems a much heavier and less scalable approach that generating code at runtime.

	Thanks and Happy New Year, Joel