loro/crates/loro-ffi
2024-04-09 16:23:48 +08:00
..
examples feat: add java bindgen 2023-01-29 17:48:37 +08:00
src Feat-rust-api (#193) 2023-11-28 16:22:43 +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 chore(rs): bump versions of rust crates 2024-04-09 16:23:48 +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