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
rust bindings fail to build #92
Comments
Hi @brayniac, I'm not familiar with rust, but it is complaining cachelib/rust/src/cachelib.h not found. The file does exist, so can you try to build in the root directory (CacheLib/) instead of rust directory? |
@leozzx - unfortunately that won't work because the repo root is not a crate or workspace root.
|
Can you try and teach the |
cc @agordon for advice. |
@therealgymmy @agordon @farnz - any updates on this? |
@farnz resolves the first issue,
when removing the admin (a private facebook header file), the build fails on lack of rust bindings for folly string type. i removed the references to std::chrono::timestamp & folly::String types, replacing them with primitives i64 & std::string respectively in order to achieve a successful compilation by example all in all => need to have the folly rust bindings in order to compile cachelib - otherwise, the community can not implement Cxx Extern Type for ffi. more than happy to help if a contributor wants to hop on a video call so that we can consume cachelib in rust/c. thank u for a great library. the only high quality, multi threaded caching library for ssd we've found. twitter pelikan single threaded & does not support 10TB ssd drives. |
@vitruvvius: thanks for figuring out a fix! Could you send out a PR? |
i'd rather see folly & std::chrono::timestamp resolved w/ FFI bindings than the strategy provided |
what are we doing about this, if at all? |
one thing that might be interesting is to move away from hand-writing the FFI & integrating autocxx from google https://github.com/google/autocxx |
Even with the change proposed by @journaux, the Rust bindings still fail to build.
|
@nickamorim that seems a folly version / include path bug, nonetheless a lot of adjustments needed circa 8 months ago to compile properly (watch out for stack smashing in rust :: c++ ffi). anecdotally, somebody informed me facebook never released their internal cache eviction policy for cachelib, implying the public implementation does not match the private deployment. |
Describe the bug
Rust bindings fail to build.
To Reproduce
Steps to reproduce the behavior:
cachelib/rust
within this repo (crate root)cargo build
Expected behavior
Expected the crate to build
Output
Desktop (please complete the following information):
Additional context
Rust crate is currently not tested in CI. Adding to CI would help make sure it builds and continues to build as changes are made.
The text was updated successfully, but these errors were encountered: