mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
use rust-c pre-compiler instead
This commit is contained in:
parent
4cfd10889f
commit
94f6d7c016
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user