fish: '-i' option automatically handles whole-disk encryption.
[libguestfs.git] / generator / README
1 This program generates a large amount of code and documentation for
2 all the daemon actions.
3
4 To add a new action there are only two files you need to change,
5 'generator_actions.ml' to describe the interface, and
6 daemon/<somefile>.c to write the implementation.
7
8 After editing these files, build it (make -C generator) to regenerate
9 all the output files.  'make' will rerun this automatically when
10 necessary.
11
12 IMPORTANT: This program should NOT print any warnings at compile time
13 or run time.  If it prints warnings, you should treat them as errors.
14
15 OCaml tips:
16
17 (1) In emacs, install tuareg-mode to display and format OCaml code
18 correctly.  'vim' comes with a good OCaml editing mode by default.
19
20 (2) Read the resources at http://ocaml-tutorial.org/
21
22 (3) A module called 'Generator_foo' is defined in one or two files
23 called 'generator_foo.mli' and 'generator_foo.ml' (NB: lowercase first
24 letter).  The *.mli file, if present, defines the public interface for
25 the module.  The *.ml file is the implementation.  If the *.mli file
26 is missing then everything is exported.
27
28 Some notable files in this directory:
29
30 generator_actions.ml          The libguestfs API.
31 generator_structs.ml          Structures returned by the API.
32 generator_c.ml                Generate C API.
33 generator_<lang>.ml           Generate bindings for <lang>.
34 generator_main.ml             The main generator program.