-
Notifications
You must be signed in to change notification settings - Fork 96
Introduce formatting infra for Rust and format Rust code #1037
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ rust_library( | |
| name = "com-api-example-lib", | ||
| srcs = glob(["src/**/*.rs"]), | ||
| crate_name = "com_api_example", | ||
| edition = "2024", | ||
| edition = "2021", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we specifying rust edition per target? This is like in C++ we would specify the C++ version per target. If edition is not specified, it defaults to the one used by the toolchain.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair point. @bharatGoswami8 if you do not disagree, I'll do that change.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed as we are going to use default so we can remove this completely - https://github.com/eclipse-score/toolchains_rust/blob/main/toolchains/x86_64-unknown-linux-gnu/BUILD.bazel#L24 |
||
| features = ["link_std_cpp_lib"], | ||
| deps = [ | ||
| "//score/mw/com/example/com-api-example/com-api-gen", | ||
|
|
@@ -35,7 +35,7 @@ rust_binary( | |
| "etc/logging.json", | ||
| "etc/mw_com_config.json", | ||
| ], | ||
| edition = "2024", | ||
| edition = "2021", | ||
| env = { | ||
| "MW_LOG_CONFIG_FILE": "score/mw/com/example/com-api-example/etc/logging.json", | ||
| }, | ||
|
|
@@ -55,7 +55,7 @@ rust_test( | |
| name = "com-api-example-tokio-integration-test", | ||
| srcs = ["tests_using_tokio_runtime.rs"], | ||
| data = ["etc/mw_com_config.json"], | ||
| edition = "2024", | ||
| edition = "2021", | ||
| features = ["link_std_cpp_lib"], | ||
| tags = ["manual"], | ||
| deps = [ | ||
|
|
||
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.
Please update the commit message to link where S-CORE says that Rust 2021 should be used.