eclipse / kuksa.val

kuksa.val
Apache License 2.0
95 stars 51 forks source link

Rust client library and plugable databroker cli #675

Closed lukasmittag closed 10 months ago

lukasmittag commented 1 year ago

This PR addresses the need of a client library for rust for the new API (kuksa.val.v1) and makes the databroker-cli plugable.

To try this PR you need to know that per default it will be built with the old API client lib. If you want to use the new one use

cargo run --bin databroker-cli 

or

cargo run --bin databroker-cli --protocol kuksa-val-v1
erikbosch commented 1 year ago

How does Rust compiler handle features? Does it ignore features not included (like old fashioned #ifdef) or does it anyway compile them even if it does not include them in result.

If it ignore it totally - would it then be an idea to extend our CI so that it also builds the "feature_kuksa" variant, to make sure that we do not introduce any regressions that can be detected at compile time, i.e. that all code is compiled by CI.

lukasmittag commented 1 year ago

How does Rust compiler handle features? Does it ignore features not included (like old fashioned #ifdef) or does it anyway compile them even if it does not include them in result.

If it ignore it totally - would it then be an idea to extend our CI so that it also builds the "feature_kuksa" variant, to make sure that we do not introduce any regressions that can be detected at compile time, i.e. that all code is compiled by CI.

Yes that needs to be added. Good point!

lukasmittag commented 1 year ago
cargo clippy --all-targets --no-default-features --features feature_kuksa -- -W warnings -D warnings

would this be enough or would you actually fully build it