Skip to content

Commit

Permalink
port solana-ffi from multichain
Browse files Browse the repository at this point in the history
  • Loading branch information
roynalnaruto committed Mar 10, 2021
0 parents commit 64ae1d0
Show file tree
Hide file tree
Showing 13 changed files with 4,911 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.exe
*.exe~
*.dll
*.so
*.dylib
**/.install-solana-ffi
**/*.a
**/*.h
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DEPS:=solana-ffi.h libsolana-ffi.a

all: $(DEPS)
.PHONY: all

$(DEPS): .install-solana-ffi ;

.install-solana-ffi: rust
cd rust && cargo build --release --all; cd ..
find ./rust/target/release -type f -name "solana-ffi.h" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/solana-ffi.h
find ./rust/target/release -type f -name "libsolana_ffi.a" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/libsolana_ffi.a
c-for-go --ccincl solana-ffi.yml
@touch $@

clean:
rm -rf $(DEPS) .install-solana-ffi
rm -rf cgo/*.go
rm -rf cgo/*.h
rm -rf cgo/*.a
.PHONY: clean
143 changes: 143 additions & 0 deletions cgo/cgo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 158 additions & 0 deletions cgo/cgo_helpers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/renproject/solana-ffi

go 1.14
1 change: 1 addition & 0 deletions rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
Loading

0 comments on commit 64ae1d0

Please sign in to comment.