🚀 shrink code size & now import module can search lib file from local dir and dirs in PATH

This commit is contained in:
ValKmjolnir
2022-07-08 00:42:56 +08:00
parent 86ae3aeee2
commit aea8b317c7
9 changed files with 70 additions and 61 deletions
+1 -1
View File
@@ -31,4 +31,4 @@ var find_all_files=func(path){
append(res,n);
unix.closedir(dd);
return res;
}
}
+2 -1
View File
@@ -412,7 +412,8 @@ var unix=
chdir: func(path){return __builtin_chdir(path);},
environ: func(){return __builtin_environ();},
getcwd: func(){return __builtin_getcwd();},
getenv: func(envvar){return __builtin_getenv(envvar);}
getenv: func(envvar){return __builtin_getenv(envvar);},
getpath: func(){return split(os.platform()=="windows"?";":":",unix.getenv("PATH"));}
};
# dylib is the core hashmap for developers to load their own library.