Add rust experiment example

This commit is contained in:
Alex Hultman
2022-01-07 05:51:23 +01:00
parent 937afd1669
commit 40742a7c63
3 changed files with 118 additions and 3 deletions
+5 -2
View File
@@ -1,4 +1,7 @@
default:
rm -f *.o
make -C ../uSockets
g++ -O3 -std=c++17 -flto -DUWS_NO_ZLIB -I ../src -I ../uSockets/src App.cpp -c
gcc -O3 -flto example.c *.o -lstdc++ ../uSockets/uSockets.a -o example
g++ -c -O3 -std=c++17 -flto -DUWS_NO_ZLIB -I ../src -I ../uSockets/src App.cpp
$(AR) rvs uWebSockets.a App.o ../uSockets/*.o
gcc -O3 -flto example.c *.o -lstdc++ ../uSockets/uSockets.a -o c_example
rustc -C link-arg=uWebSockets.a -C link-arg=-lstdc++ -C opt-level=3 -C lto -L all=. example.rs -o rust_example