Skip to content

no_std compatibility for subxt-signer#1477

Merged
tadeohepperle merged 6 commits intomasterfrom
tadeohepperle/subxt-signer-no-std
Mar 14, 2024
Merged

no_std compatibility for subxt-signer#1477
tadeohepperle merged 6 commits intomasterfrom
tadeohepperle/subxt-signer-no-std

Conversation

@tadeohepperle
Copy link
Copy Markdown
Contributor

This PR makes subxt-signer no-std compatible. This was factored out into a seperate PR because thesubxt-core PR got a bit big. For this reason, this PR might already make more changes than necessary to the dependency structure, but it is all to make the integration with the main subxt-core PR a smooth experience.

@tadeohepperle tadeohepperle marked this pull request as ready for review March 13, 2024 14:13
@tadeohepperle tadeohepperle requested a review from a team as a code owner March 13, 2024 14:13
Copy link
Copy Markdown
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

Looks good; just some minor comments :)

Copy link
Copy Markdown
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

LGTM, nice one!


/// This is returned if `FromStr` cannot parse a string into a `SecretUri`.
#[derive(Debug, Copy, Clone, PartialEq, thiserror::Error)]
#[derive(Debug, Copy, Clone, PartialEq, Display)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

impl std::error::Error for this one? I saw that James commented on it but I can't find the impl :)


[dependencies]
subxt-metadata = { path = "../../metadata", default-features = false }
subxt-signer = { path = "../../signer", default-features = false, features = ["sr25519"] } # Note: feature "ecdsa" does not compile to `no-std` right now
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's probably a good idea to document it somewhere or raise an issue for it

let _signature = keypair.sign(message);
let _public_key = keypair.public_key();

// Note: `ecdsa` is not compiling for the `thumbv7em-none-eabi` target.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here would be nice to have an issue for the ecdsa no-std stuff

@tadeohepperle tadeohepperle merged commit 4831f81 into master Mar 14, 2024
@tadeohepperle tadeohepperle deleted the tadeohepperle/subxt-signer-no-std branch March 14, 2024 10:04
@jsdw jsdw mentioned this pull request Mar 21, 2024
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

Successfully merging this pull request may close these issues.

3 participants