plugin_test_plugins/
lib.rs

1extern crate plugin_test_api as plugin_api;
2//extern crate nom;
3//extern crate french;
4
5mod english;
6mod french;
7
8// should we do that?
9pub use english::*;
10pub use french::*;
11
12use plugin_api::PluginInformation;
13use std::collections::hash_map::HashMap;
14
15
16pub struct Plugins {
17  pub list: HashMap<String, Box<PluginInformation> >,
18}
19
20///FIXME: should return a static list of plugins
21///FIXME: the plugin tool must know about  the traits
22///PluginInfo and the PluginMetadata from each plugin
23/// do we import them by predefined name or declare them somewhere?
24pub fn plugins() -> Plugins {
25  let mut h:  HashMap<String, Box<PluginInformation> > = HashMap::new();
26  h.insert("english".to_string(), Box::new(english::PLUGIN_METADATA));
27  h.insert("french".to_string(), Box::new(french::PLUGIN_METADATA));
28
29  Plugins {
30    list: h
31  }
32}
33