Browse thread
PIC
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] PIC |
On Tue, 2006-01-03 at 15:27 -0800, Nathaniel Gray wrote: > Who wants to write an app without plugins these days? Who is willing to write applications that are unsound? Once Ocaml generates -fPIC it can be linked with a C wrapper to make a shared library, and your mainline (or another wrapped library) can embed a function that loads such libraries with dlopen() and retrieves a record of functions, then casts it to the expected type .. voila, you have native code plugins. Note even bytecode cannot *unload* plugins .. which is needed to execute user scripts in web pages with long running server side scripting support. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net