pub fn gen_all(&self) -> Result<()> {
        let config = config::parse(&self.prj_path);
        println!("rsbind config in {:?} is {:?}", &self.prj_path, config);

        let crate_name = self.parse_crate_name()?;

        match self.action {
            Action::GenAst => {
                self.parse_ast(crate_name.clone())?;
                return Ok(());
            }
            _ => (),
        }

        Ok(match self.target {
            Target::Ios => {
                let ast = &self.get_ast_if_need(crate_name.clone())?;
                self.gen_for_ios(&crate_name, ast, config.clone())?;
            }
            Target::Android => {
                let ast = &self.get_ast_if_need(crate_name.clone())?;
                self.gen_for_android(&crate_name, ast, config.clone())?;
            }
            Target::All => {
                let ast_result = self.get_ast_if_need(crate_name.clone())?;
                self.gen_for_ios(&crate_name, &ast_result, config.clone())?;
                self.gen_for_android(&crate_name, &ast_result, config.clone())?;
            }
        })
    }
///
/// generate the ios framework and android aar as per the target config
///
generate the ios framework and android aar as per the target config
generate the ios framework and android aar as per the target config
pub fn gen_all(&self) -> Result<()> {
        let config = config::parse(&self.prj_path);
        println!("rsbind config in {:?} is {:?}", &self.prj_path, config);
        let crate_name = self.parse_crate_name()?;
        match self.action {
            Action::GenAst => {
                self.parse_ast(crate_name.clone())?;
                return Ok(());
            }
            _ => (),
        }
        Ok(match self.target {
            Target::Ios => {
                let ast = &self.get_ast_if_need(crate_name.clone())?;
                self.gen_for_ios(&crate_name, ast, config.clone())?;
            }
            Target::Android => {
                let ast = &self.get_ast_if_need(crate_name.clone())?;
                self.gen_for_android(&crate_name, ast, config.clone())?;
            }
            Target::All => {
                let ast_result = self.get_ast_if_need(crate_name.clone())?;
                self.gen_for_ios(&crate_name, &ast_result, config.clone())?;
                self.gen_for_android(&crate_name, &ast_result, config.clone())?;
            }
        })
    }
pub fn gen_all ( & self ) -> Result < ( ) > { let config = config :: parse ( & self . prj_path ) ; println ! ( " " self prj_path config ) ; let crate_name = self . parse_crate_name ( ) ? ; match self . action { Action :: GenAst => { self . parse_ast ( crate_name . clone ( ) ) ? ; return Ok ( ( ) ) ; } _ => ( ) , } Ok ( match self . target { Target :: Ios => { let ast = & self . get_ast_if_need ( crate_name . clone ( ) ) ? ; self . gen_for_ios ( & crate_name , ast , config . clone ( ) ) ? ; } Target :: Android => { let ast = & self . get_ast_if_need ( crate_name . clone ( ) ) ? ; self . gen_for_android ( & crate_name , ast , config . clone ( ) ) ? ; } Target :: All => { let ast_result = self . get_ast_if_need ( crate_name . clone ( ) ) ? ; self . gen_for_ios ( & crate_name , & ast_result , config . clone ( ) ) ? ; self . gen_for_android ( & crate_name , & ast_result , config . clone ( ) ) ? ; } } ) }
generate the ios framework and android aar as per the target config
generate the ios framework and android aar as per the target config
&self