-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add build framework #282
Add build framework #282
Conversation
Adding components for creating an FFI wrapper and protobuf code, a Cargo feature, and a Docker image. Signed-off-by: Ionut Mihalcea <ionut.mihalcea@arm.com>
// TODO: Remove once we can use the full TS stack and this isn't needed | ||
println!("cargo:rustc-link-search=native=/usr/lib"); | ||
println!("cargo:rustc-link-lib=dylib=c++"); | ||
|
||
println!("cargo:rustc-link-search=native=/usr/local/lib"); | ||
println!("cargo:rustc-link-lib=static=ts-lib"); | ||
// TODO: Remove once we can use the full TS stack and this isn't needed | ||
println!("cargo:rustc-link-lib=static=mbedcrypto"); | ||
println!("cargo:rustc-link-lib=static=protobuf-nanopb"); |
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.
I'll need to figure out how to make these more sensible
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.
Actually, I think I'll leave them as they are - we'll need to remove them before we properly release this provider anyway so they'll only be used for testing
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.
Thanks for this early work! I know that this is going to change as we go, but I put some comments
@@ -49,6 +49,10 @@ anyhow = "1.0.32" | |||
[dev-dependencies] | |||
rand = { version = "0.7.3", features = ["small_rng"] } | |||
|
|||
[build-dependencies] | |||
bindgen = "0.54.0" |
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.
Has the header a stable ABI? If so, I think it would be better to generate the bindings once and for all to save some compile time and avoid the bindgen
dependency
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.
I could replace both this and the protobuf stuff with hardcoded dependencies once the whole thing stabilizes - which I'm not sure is guaranteed for a while
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.
Yeah, ok makes sense!
@@ -49,6 +49,10 @@ anyhow = "1.0.32" | |||
[dev-dependencies] | |||
rand = { version = "0.7.3", features = ["small_rng"] } | |||
|
|||
[build-dependencies] | |||
bindgen = "0.54.0" | |||
prost-build = "0.6.1" |
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.
Similar question here, but maybe protobuf files also have stable ABIs and it's not necessary to generate them everytime?
@@ -58,3 +62,4 @@ mbed-crypto-provider = ["psa-crypto"] | |||
pkcs11-provider = ["pkcs11", "picky-asn1-der", "picky-asn1", "picky-asn1-x509", "psa-crypto", "rand"] | |||
tpm-provider = ["tss-esapi", "picky-asn1-der", "picky-asn1", "picky-asn1-x509", "hex"] | |||
all-providers = ["tpm-provider", "pkcs11-provider", "mbed-crypto-provider"] | |||
trusted-service-provider = ["psa-crypto"] |
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.
Generic question: is this trusted service (singular) or trusted serviceS?
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.
Don't know if I have to call it Trusted Services
- to me it makes no sense to call it that because we only use one of them.
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.
Asked Julian, he said it's a bit premature so I might leave as is and come back and change things once things settle.
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.
ah ok I don't really mind. I thought this was like a whole project name as opposed as a particular thing
Adding components for creating an FFI wrapper and protobuf code, a
Cargo feature, and a Docker image.
Signed-off-by: Ionut Mihalcea ionut.mihalcea@arm.com