Added the new `examples' directory to the distribution.
[bpt/guile.git] / examples / safe / README
1 -*- text -*-
2
3 This directory includes examples which show how to create and use safe
4 environments for safe (sand-boxed) execution of Scheme programs.
5
6 *Note* that the files in this directory are only suitable for
7 demonstration purposes, if you have to implement safe evaluation
8 mechanisms in important environments, you will have to do more than
9 shown here -- for example disabling input/output operations.
10
11 The descriptions below assume that you have a working copy of Guile
12 installed and available with the standard installation prefix
13 `/usr/local'.
14
15 safe:
16
17 The main program, which executes the Scheme code in a file given on
18 the command line in a safe environment. The following command will
19 do that with the file `untrusted.scm' (see below.)
20
21 $ ./safe untrusted.scm
22
23 or
24
25 guile -s safe untrusted.scm
26
27 untrusted.scm:
28
29 This file contains some Scheme code, which will be executed in a
30 safe environment by the `safe' script.
31
32 evil.scm
33
34 This file also contains Scheme code, but it tries to do evil things.
35 Evaluating this with the `safe' script will abort on those evil
36 actions.