Add go-to-rust via cgo. Dynamic and static variants.

This commit is contained in:
Andrey Voronkov
2019-08-16 02:06:23 +02:00
parent 12f8d239f8
commit 931889571a
8 changed files with 76 additions and 0 deletions

View File

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