feat: add rust link a
This commit is contained in:
21
__ffi/rust_link_a/justfile
Normal file
21
__ffi/rust_link_a/justfile
Normal file
@@ -0,0 +1,21 @@
|
||||
_:
|
||||
@just --list
|
||||
|
||||
# generage .rs
|
||||
create-rs:
|
||||
bindgen hello.h -o src/hello.rs
|
||||
|
||||
# create .a file
|
||||
create-ar:
|
||||
gcc -c -o hello.o hello.c
|
||||
ar -cr libhello.a hello.o
|
||||
|
||||
# re-run
|
||||
re-run:
|
||||
rm hello.o || true
|
||||
rm libhello.a || true
|
||||
rm -rf target/ || true
|
||||
@just create-ar
|
||||
@just create-rs
|
||||
cargo r
|
||||
|
||||
Reference in New Issue
Block a user