Skip to content
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

slh-dsa: no_std broken due to use of concat() #854

Closed
erdnaxe opened this issue Sep 4, 2024 · 1 comment
Closed

slh-dsa: no_std broken due to use of concat() #854

erdnaxe opened this issue Sep 4, 2024 · 1 comment

Comments

@erdnaxe
Copy link
Contributor

erdnaxe commented Sep 4, 2024

When building a project for thumbv7em-none-eabihf target, cargo fails with the following error:

   Compiling slh-dsa v0.1.0
error[E0599]: no method named `concat` found for array `[&[u8]; 4]` in the current scope
   --> /home/redacted/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slh-dsa-0.1.0/src/signing_key.rs:146:56
    |
146 |         let ctx_msg = [&[0], &ctx_len_bytes, ctx, msg].concat();
    |                                                        ^^^^^^ method not found in `[&[u8]; 4]`

error[E0599]: no method named `concat` found for array `[&[u8]; 4]` in the current scope
  --> /home/redacted/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slh-dsa-0.1.0/src/verifying_key.rs:83:56
   |
83 |         let ctx_msg = [&[0], &ctx_len_bytes, ctx, msg].concat();
   |                                                        ^^^^^^ method not found in `[&[u8]; 4]`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `slh-dsa` (lib) due to 2 previous errors

It would be nice to build all crates in no_std mode in CI to detect such breakage.
Maybe we should add cargo check --no-default-features --target thumbv7em-none-eabihf in GitHub Actions to force no_std?

@tarcieri
Copy link
Member

Fixed in #860

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants