PHP to rust FFI example

This commit is contained in:
Nicolas Far
2019-05-17 19:14:20 -04:00
parent 0d944bd327
commit 21390884d1
5 changed files with 41 additions and 0 deletions

14
php-to-rust/Makefile Normal file
View File

@@ -0,0 +1,14 @@
ifeq ($(shell uname),Darwin)
EXT := dylib
else
EXT := so
endif
all: target/debug/libdouble_input.$(EXT)
php src/ffi.php
target/debug/libdouble_input.$(EXT): src/lib.rs Cargo.toml
cargo build
clean:
rm -rf target