Skip to content

ci: add no-std job to check floresta-common#825

Merged
Davidson-Souza merged 1 commit intogetfloresta:masterfrom
JoseSK999:ci-no-std
Feb 5, 2026
Merged

ci: add no-std job to check floresta-common#825
Davidson-Souza merged 1 commit intogetfloresta:masterfrom
JoseSK999:ci-no-std

Conversation

@JoseSK999
Copy link
Member

Description and Notes

This ensures we don't link std by mistake, as our no-default-feature floresta-common wouldn't be able to compile for a no_std target.

If we ever link the std lib, we will get this error:

error[E0463]: can't find crate for `std`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crypto-common-0.1.7/src/lib.rs:13:1
   |
13 | extern crate std;
   | ^^^^^^^^^^^^^^^^^ can't find crate
   |
   = note: the `thumbv7em-none-eabihf` target may not support the standard library

For more information about this error, try `rustc --explain E0463`.
error: could not compile `crypto-common` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

@JoseSK999 JoseSK999 added the CI A change or issue related to CI label Feb 4, 2026
@JoseSK999
Copy link
Member Author

To verify, see how this commit triggered a failure in the two jobs: JoseSK999@e231f01

@Davidson-Souza
Copy link
Member

What about something similar for floresta-chain? I'm pretty sure there's some problems there, because FlatChainstore is std only

@moisesPompilio
Copy link
Collaborator

I am removing that part of the descriptor from floresta-common in this PR: #821. I centralized the business rules involving descriptors in floresta-watch-only, so the descriptors-no-std feature will no longer exist.

@JoseSK999
Copy link
Member Author

What about something similar for floresta-chain? I'm pretty sure there's some problems there, because FlatChainstore is std only

Yes, this CI job can be extended by adding floresta-chain in the matrix list. Haven’t checked it but pretty sure we will need to do some changes for it to support no_std.

@JoseSK999
Copy link
Member Author

I am removing that part of the descriptor from floresta-common in this PR: #821. I centralized the business rules involving descriptors in floresta-watch-only, so the descriptors-no-std feature will no longer exist.

Sounds nice. If this gets merged first you would just have to remove these two lines:

          - crate: floresta-common
            feature_args: "--features descriptors-no-std"

@Davidson-Souza
Copy link
Member

Yes, this CI job can be extended by adding floresta-chain in the matrix list. Haven’t checked it but pretty sure we will need to do some changes for it to support no_std.

Do you think it would be better to do this as a follow-up?

@JoseSK999
Copy link
Member Author

Do you think it would be better to do this as a follow-up?

We can't do it right now actually, rustreexo is using bitcoin_hashes and hex-conservative with the default features only.

https://github.com/JoseSK999/Floresta/actions/runs/21690035145/job/62547127016

@Davidson-Souza
Copy link
Member

Do you think it would be better to do this as a follow-up?

We can't do it right now actually, rustreexo is using bitcoin_hashes and hex-conservative with the default features only.

https://github.com/JoseSK999/Floresta/actions/runs/21690035145/job/62547127016

Shoot! Need to update upstream to allow no-std :(

Davidson-Souza
Davidson-Souza previously approved these changes Feb 4, 2026
Copy link
Member

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e7d6f9c

@JoseSK999
Copy link
Member Author

Okay I have switched from thumbv7em-none-eabihf to thumbv7em-none-eabi since @jaoleal asked, and apparently it's a bit cleaner for our purpose (just check bare-metal compilation).

This ensures we don't link `std` by mistake, as our no-default-feature `floresta-common` wouldn't be able to compile for a `no_std` target.
Copy link
Member

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK e6d6a00

@JoseSK999
Copy link
Member Author

JoseSK999 commented Feb 4, 2026

Do you think it would be better to do this as a follow-up?

We can't do it right now actually, rustreexo is using bitcoin_hashes and hex-conservative with the default features only.
https://github.com/JoseSK999/Floresta/actions/runs/21690035145/job/62547127016

Shoot! Need to update upstream to allow no-std :(

Taking a look at it 😈
EDIT: plenty of things broke
EDIT^2: it worked mit-dci/rustreexo#93

@moisesPompilio
Copy link
Collaborator

ACK e6d6a00

@Davidson-Souza Davidson-Souza merged commit e1797ea into getfloresta:master Feb 5, 2026
11 checks passed
@JoseSK999 JoseSK999 deleted the ci-no-std branch February 5, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI A change or issue related to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants