This commit is contained in:
nora 2023-02-11 23:03:45 +01:00
parent fb0b512991
commit 03a4287bee
4 changed files with 228 additions and 31 deletions

View file

@ -5,4 +5,9 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
for rust_file in $SCRIPT_DIR/*.rs; do
# Use -Cprefer-dynamic to keep the binary small
rustc --edition 2021 "$rust_file" -Cprefer-dynamic -Copt-level=3 --out-dir="$SCRIPT_DIR/out"
done
done
for c_obj_file in $SCRIPT_DIR/*_obj.c; do
echo $c_obj_file
cc "$c_obj_file" -c -o "$SCRIPT_DIR/out/$(basename $c_obj_file .c)"
done

View file

@ -0,0 +1,6 @@
#include<stdio.h>
int main(int argc, char **argv) {
puts("Hello, World!");
return 0;
}