Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 89 lines (73 sloc) 2.046 kB
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (**
19 Convention of naming for plugins.
20 @author Mathieu Barbin
21 *)
22
23 (**
24 These convention are shared knowledge between opa-plugin-* (bsl{register,browser}) and the OPA compiler,
25 for simplifying plugin inclusion.
26 *)
27
28 module Extension :
29 sig
30 (**
31 Extensions produced for plugins.
32 *)
33
34 type extension = string
35 val bypass : extension
36 val jsconf : extension
37 val plugin : extension
38 end
39
40 module Suffix :
41 sig
42 (**
43 Given the name of the lib and adding these suffix, gives the name of the corresponding file,
44 <!> without the extension.
45 *)
46
47 type suffix = string
48 val jskeys : suffix
49 val loader : suffix
50 val marshalplugin : suffix
51 val mlruntime : suffix
52 val plugin : suffix
53 end
54
55 (**
56 Convention over plugin names
57 *)
58 val plugin_name : string -> string
59
60 (** {6 Inclusions} *)
61
62 (**
63 Regrouping implied options by the inclusion of a plugin
64 *)
65 type inclusion = {
66 extrapath : string ;
67 (**
68 An absolute path name to a directory to include
69 *)
70
71 extralib : string ;
72 (**
73 An absolute filename to the mlruntime to link with
74 *)
75
76 plugin : string ;
77 (**
78 An absolute filename to the marshaled plugin to load
79 *)
80 }
81
82 (**
83 Given the location of an plugin directory (opp), return
84 the list of implied options.
85 If the location is relative, will prefix it by the current
86 working directory.
87 *)
88 val inclusion : cwd:string -> string -> inclusion
Something went wrong with that request. Please try again.