Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bindgen to auto generate FFI #381

Open
Connor1996 opened this issue Nov 11, 2019 · 4 comments
Open

Use bindgen to auto generate FFI #381

Connor1996 opened this issue Nov 11, 2019 · 4 comments
Assignees

Comments

@Connor1996
Copy link
Member

See https://github.com/rust-lang/rust-bindgen
Also, notice that https://github.com/rust-rocksdb/rust-rocksdb is already using bindgen, maybe we can rebase to it and add what we need.

@fredchenbj
Copy link
Member

I would like to try it ~

@yiwu-arbug
Copy link
Collaborator

Please mind that the upstream c.cc has an issue where it will return incorrect bloom filter:facebook/rocksdb#6129 The issue was fixed in our c.cc. I'm not sure if our fork has more fixes not included upstream. cc @Connor1996 @fredchenbj

@Connor1996
Copy link
Member Author

Oh, seems we should take a careful look at the difference when updating c.cc @fredchenbj

@fredchenbj
Copy link
Member

I make some general illustrations about this task here:

  • the migration plan has three steps:
  1. make some change in c.h & c.c to make bindgen work in pr change c.h and c.cc for bindgen ffi #401. Then use the old crocksdb's c.h and bindgen to generate ffi rust code, and make it work for all dependency code; this step now is in progress in pr use bindgen to auto generate ffi rust code #398.
  2. replace with upstreams's c.h & c.cc, and make all code in c.h conform to rocksdb's style, here we would only include rocksdb's c.h and not change it at all. Here we would fix the problem caused by the difference of c.h & c.cc between here and upstream.
  3. try to use rocksdb cpp api to generate ffi rust code. This step would be some challenging, and i now have not taken too much consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants