mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-02-05 17:28:23 +08:00
build api-bind and codegen together
This commit is contained in:
parent
541b775fd4
commit
7389095b26
@ -5,10 +5,15 @@
|
|||||||
#include "PikaParser.h"
|
#include "PikaParser.h"
|
||||||
#include "dataStrs.h"
|
#include "dataStrs.h"
|
||||||
#include "PikaCompiler.h"
|
#include "PikaCompiler.h"
|
||||||
|
#include "libpikabinder.h"
|
||||||
|
|
||||||
PikaObj* __pikaMain;
|
PikaObj* __pikaMain;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
/* run pika_binder to bind C modules */
|
||||||
|
pika_binder();
|
||||||
|
|
||||||
|
|
||||||
FILE* file_mian_py = fopen("main.py", "rb");
|
FILE* file_mian_py = fopen("main.py", "rb");
|
||||||
if (NULL == file_mian_py) {
|
if (NULL == file_mian_py) {
|
||||||
printf("[error]: main.py no found. \r\n");
|
printf("[error]: main.py no found. \r\n");
|
||||||
|
@ -4,8 +4,6 @@ mkdir libpikabinder
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
cbindgen --config cbindgen.toml --crate rust-msc --output libpikabinder/libpikabinder.h
|
cbindgen --config cbindgen.toml --crate rust-msc --output libpikabinder/libpikabinder.h
|
||||||
cp target/release/libpikabinder.a libpikabinder
|
cp target/release/libpikabinder.a libpikabinder
|
||||||
cp target/release/rust-msc rust-msc-latest-linux
|
|
||||||
chmod +x rust-msc-latest-linux
|
|
||||||
|
|
||||||
cd ../pikaByteCodeGen
|
cd ../pikaByteCodeGen
|
||||||
cp ../pikaCompiler/libpikabinder . -r
|
cp ../pikaCompiler/libpikabinder . -r
|
||||||
@ -15,3 +13,6 @@ mkdir build
|
|||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
make -j
|
make -j
|
||||||
|
cp pikaByteCodeGen $ROOT/rust-msc-latest-linux
|
||||||
|
cd $ROOT
|
||||||
|
chmod +x rust-msc-latest-linux
|
||||||
|
Loading…
x
Reference in New Issue
Block a user