Changeset View
Changeset View
Standalone View
Standalone View
src/lib.rs
Context not available. | |||||
3 | extern crate serde_derive; | 3 | extern crate serde_derive; | ||
---|---|---|---|---|---|
4 | extern crate serde_json; | 4 | extern crate serde_json; | ||
5 | extern crate serde_xml_rs; | 5 | extern crate serde_xml_rs; | ||
6 | extern crate toml; | | |||
7 | 6 | | |||
8 | pub mod build; | 7 | pub mod build; | ||
9 | pub mod configuration; | 8 | pub mod configuration; | ||
Context not available. | |||||
34 | pub fn generate_bindings_from_config_file<P: AsRef<Path>>( | 33 | pub fn generate_bindings_from_config_file<P: AsRef<Path>>( | ||
35 | config_file: P, | 34 | config_file: P, | ||
36 | overwrite_implementation: bool, | 35 | overwrite_implementation: bool, | ||
36 | edition: Option<&str>, | ||||
37 | ) -> Result<(), Box<Error>> { | 37 | ) -> Result<(), Box<Error>> { | ||
38 | let mut config = read_bindings_file(config_file)?; | 38 | let mut config = read_bindings_file(config_file)?; | ||
39 | if overwrite_implementation { | 39 | if overwrite_implementation { | ||
40 | config.overwrite_implementation = true; | 40 | config.overwrite_implementation = true; | ||
41 | } | 41 | } | ||
42 | config.rust_edition = edition.into(); | ||||
42 | generate_bindings(&config) | 43 | generate_bindings(&config) | ||
43 | } | 44 | } | ||
Context not available. |