loro/crates/loro-ffi
Zixuan Chen 1e736df133
Refactor: rm legacy code (#97)
* refactor: rm legacy code

* chore: rm dead code

* refactor: mv refactored files outside

* refactor: rename files & methods

* chore: rm unused deps

* fix: compact bytes err

* chore: fix ci
2023-07-31 11:49:55 +08:00
..
examples feat: add java bindgen 2023-01-29 17:48:37 +08:00
src Refactor: rm legacy code (#97) 2023-07-31 11:49:55 +08:00
.gitignore feat: add go bindgen 2023-01-29 17:48:37 +08:00
build.rs refactor: seal change exp impl 2023-07-05 14:43:58 +08:00
Cargo.toml feat: add java bindgen 2023-01-29 17:48:37 +08:00
cbindgen.toml feat: impl C ffi 2023-01-29 17:48:37 +08:00
README.md feat: add java bindgen 2023-01-29 17:48:37 +08:00

loro-ffi

  • cargo build --release
  • move libloro.a and loro_ffi.h to directory examples/lib
  • run

C++

Read more: cbindgen

g++ loro.cpp -Bstatic -framework Security -L. -lloro -o loro

Go

Read more: cgo

go run main.go

Python

Java

Candidates:

Panama

install panama-jdk and jextract

jextract -I /Library/Developer/CommandLineTools/usr/include/c++/v1 -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -d loro_java -t org.loro -l loro -- lib/loro_ffi.h

JNR

move libloro.dylib into jnr/app

gradle run