pub fn from(prj_path: String, target: Target, action: Action) -> Bind {
        let root = PathBuf::from(&prj_path);

        // ./_gen/ast
        let ast_path = root.join(GEN_DIR_NAME).join(AST_DIR);

        // ./_gen/bin/
        let bin_path = root.join(GEN_DIR_NAME).join(BIN_DIR);

        // ./_gen/header/
        let header_path = root.join(GEN_DIR_NAME).join(HEADER_NAME);

        // ./_gen/ios_dest/
        let ios_dest_path = root.join(GEN_DIR_NAME).join(IOS_PROJ);

        // ./_gen/ios_bridge
        let ios_bridge_path = root.join(GEN_DIR_NAME).join(IOS_BRIDGE_PROJ);

        let android_bridge_path = root.join(GEN_DIR_NAME).join(ANDROID_BRIDGE_PROJ);

        let android_dest_path = root.join(GEN_DIR_NAME).join(ANDROID_PROJ);

        return Bind {
            prj_path: root,
            ios_dest_path,
            ios_bridge_path,
            android_bridge_path,
            android_dest_path,
            header_path,
            ast_path,
            bin_path,
            target,
            action,
        };
    }
///
/// crate the object for binding.
/// * prject_path: the rust project we need to bind
/// * target: which target we want to generate, android or iOS
///
crate the object for binding.
prject_path: the rust project we need to bind
target: which target we want to generate, android or iOS
crate the object for binding . prject_path : the rust project we need to bind target : which target we want to generate android or iOS
pub fn from(prj_path: String, target: Target, action: Action) -> Bind {
        let root = PathBuf::from(&prj_path);
        // ./_gen/ast
        let ast_path = root.join(GEN_DIR_NAME).join(AST_DIR);
        // ./_gen/bin/
        let bin_path = root.join(GEN_DIR_NAME).join(BIN_DIR);
        // ./_gen/header/
        let header_path = root.join(GEN_DIR_NAME).join(HEADER_NAME);
        // ./_gen/ios_dest/
        let ios_dest_path = root.join(GEN_DIR_NAME).join(IOS_PROJ);
        // ./_gen/ios_bridge
        let ios_bridge_path = root.join(GEN_DIR_NAME).join(IOS_BRIDGE_PROJ);
        let android_bridge_path = root.join(GEN_DIR_NAME).join(ANDROID_BRIDGE_PROJ);
        let android_dest_path = root.join(GEN_DIR_NAME).join(ANDROID_PROJ);
        return Bind {
            prj_path: root,
            ios_dest_path,
            ios_bridge_path,
            android_bridge_path,
            android_dest_path,
            header_path,
            ast_path,
            bin_path,
            target,
            action,
        };
    }
pub fn from ( prj_path : String , target : Target , action : Action ) -> Bind { let root = PathBuf :: from ( & prj_path ) ; // ./_gen/ast let ast_path = root . join ( GEN_DIR_NAME ) . join ( AST_DIR ) ; // ./_gen/bin/ let bin_path = root . join ( GEN_DIR_NAME ) . join ( BIN_DIR ) ; // ./_gen/header/ let header_path = root . join ( GEN_DIR_NAME ) . join ( HEADER_NAME ) ; // ./_gen/ios_dest/ let ios_dest_path = root . join ( GEN_DIR_NAME ) . join ( IOS_PROJ ) ; // ./_gen/ios_bridge let ios_bridge_path = root . join ( GEN_DIR_NAME ) . join ( IOS_BRIDGE_PROJ ) ; let android_bridge_path = root . join ( GEN_DIR_NAME ) . join ( ANDROID_BRIDGE_PROJ ) ; let android_dest_path = root . join ( GEN_DIR_NAME ) . join ( ANDROID_PROJ ) ; return Bind { prj_path : root , ios_dest_path , ios_bridge_path , android_bridge_path , android_dest_path , header_path , ast_path , bin_path , target , action , } ; }
crate the object for binding.
crate the object for binding .
prj_path
String
target
Target
action
Action