1- use crate :: utils:: { make_path_absolute, parse_wit } ;
1+ use crate :: utils:: make_path_absolute;
22use anyhow:: Result ;
33use std:: path:: { Path , PathBuf } ;
4+ use wit_parser:: { Resolve , WorldId } ;
45
56#[ allow( clippy:: too_many_arguments) ]
67pub fn generate_bindings (
7- paths : & [ impl AsRef < Path > ] ,
8- worlds : & [ String ] ,
9- ignore_toml_files : bool ,
10- features : & [ String ] ,
11- all_features : bool ,
8+ resolve : & mut Resolve ,
9+ world : WorldId ,
1210 generate_stubs : bool ,
1311 should_format : bool ,
1412 output : Option < & Path > ,
1513 pkg_name : Option < String > ,
14+ export_pkg_name : Option < String > ,
15+ include_versions : bool ,
1616) -> Result < ( ) > {
17- let ( mut resolve, world) = parse_wit ( paths, worlds, ignore_toml_files, features, all_features) ?;
1817 let mut files = Default :: default ( ) ;
1918
2019 let format = if should_format {
@@ -37,13 +36,15 @@ pub fn generate_bindings(
3736 generate_stubs,
3837 format,
3938 pkg_name,
39+ export_pkg_name,
40+ include_versions,
4041 ..Default :: default ( )
4142 }
4243 . build ( )
43- . generate ( & mut resolve, world, & mut files) ?;
44+ . generate ( resolve, world, & mut files) ?;
4445
4546 let output_path = match output {
46- Some ( p) => make_path_absolute ( & p . to_path_buf ( ) ) ?,
47+ Some ( p) => make_path_absolute ( p ) ?,
4748 None => PathBuf :: from ( "." ) ,
4849 } ;
4950
0 commit comments