-
Notifications
You must be signed in to change notification settings - Fork 32
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
[#21963] YSQL: Add build definition for AWS clockbound FFI. #280
Conversation
1c084e3
to
0392100
Compare
@@ -175,3 +175,6 @@ def copy_include_files( | |||
rel_src_include_path: str, | |||
dest_include_path: str) -> None: | |||
raise NotImplementedError() | |||
|
|||
def prepare_for_build_tool_invocation(self, dep: 'Dependency') -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this def is for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an already implemented function and it does the following things
- There is a skip_build_invocations command line option. And if this is set, then we should return immediately without building.
- It also checks that we are in the correct directory for building the library.
I simply added an interface here since no other library uses the rust compiler. I need to invoke the rust compiler myself because there is no API to do so. But I need to call this function similar to what C++ builds do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Orthogonal question: Do we want to lock the version of cargo/rust that we are using or does not matter? For ex, I think we use specific versions of pip, clang etc.
The rust is pinned at version 1.78.0 in the build machines. We are not installing rust here. |
https://github.com/aws/clock-bound lets us retrieve clock accuracies. This is accurate as long as the reference clock is accurate. This information helps us improve transaction performance.
Compiling clock-bound-ffi using rust generates a C library for use in YugabyteDB. This source code is licensed Apache 2.0.
As a part of this change, build clock-bound-ffi using rust. We package only the header file and the static library (not the shared library. Using static library consistently across all the build types reduces surprises).
clock-bound-ffi is a C library and not built with sanitizer support.
The option
--toolchain=llvm17
has no bearing in how clock-bound-ffi is built.Also, replace ubuntu 23.04 with ubuntu 24.04 since (1) 24.04 is the newer and stable version and (2) yugabyte's 23.04 docker image does not have rust installed.