use rust-c pre-compiler instead

This commit is contained in:
lyon 2022-05-06 12:57:33 +08:00
parent 4cfd10889f
commit 94f6d7c016
5 changed files with 10 additions and 8 deletions

View File

@ -1,8 +1,6 @@
ROOT=$PWD
cd ../../tools/pikaCompiler
cargo clean
cargo build
sh build.sh
cd $ROOT
cp ../../tools/pikaCompiler/rust-msc-latest-linux package/pikascript/rust-msc-latest-linux
cp ../../tools/pikaCompiler/target/debug/rust-msc package/pikascript/rust-msc-latest-linux
# cp ../../tools/pikaCompiler/target/debug/rust-msc.exe package/pikascript/rust-msc-latest-win10.exe

View File

@ -9,9 +9,14 @@
PikaObj* __pikaMain;
void pikaCompileFileWithInfo(char* filename){
__platform_printf(" compiling %s...\r\n", filename);
pikaCompileFile(filename);
}
void main() {
/* run pika_binder to bind C modules */
pika_binder();
pikaCompileFile("main.py");
pikaCompileFileWithInfo("main.py");
return;
}

View File

@ -17,4 +17,3 @@ sh cross-win.sh
cp build-win/pikaByteCodeGen.exe $ROOT/rust-msc-latest-win10-dev.exe
cd $ROOT
chmod +x rust-msc-latest-linux

View File

@ -120,9 +120,9 @@ impl Compiler {
/* check if compiled */
if self.compiled_list.contains(&file_name) {
} else if file_name == "main" {
println!(" compiling {}{}.py...", self.source_path, file_name);
println!(" loading {}{}.py...", self.source_path, file_name);
} else {
println!(" compiling {}{}.pyi...", self.source_path, file_name);
println!(" binding {}{}.pyi...", self.source_path, file_name);
}
self.compiled_list.push_back(String::clone(&file_name));
/* solve top package.

View File

@ -32,7 +32,7 @@ pub fn pika_compiler_entry(){
compiler = Compiler::__do_analize_file(compiler, String::from("PikaStdData"), true);
compiler = Compiler::__do_analize_file(compiler, String::from("PikaDebug"), true);
println!();
// println!();
/* write the infomatrion to compiler-info */
let mut compiler_info_file =