Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Sandboxing in ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] Sandboxing in ocaml
From: Christian Szegedy <>
> >This is the intent of Dynlink.allow_only.
> >Not however that allowing is done on a unit base, so if you want to
> >allow only some functions in a unit, you must create a new one
> >containing only those, and compile your file against those (otherwise you
> >won't be able to load it).
> >This is the way MMM applets are made safe.

> Excellent! This sounds exactly what I want. Can I forbid
> the Pervasives unit while linking the applet?

Sure: just omit it from the allowed units.
The applet should then be compiled with the -nopervasives option.

Jacques Garrigue