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

no_std compatibility for subxt-signer #1477

Merged
merged 6 commits into from Mar 14, 2024

Conversation

tadeohepperle
Copy link
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
signer/src/utils.rs Outdated Show resolved Hide resolved
signer/Cargo.toml Outdated Show resolved Hide resolved
Copy link
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
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!

@@ -115,14 +117,14 @@ impl std::str::FromStr for SecretUri {
}

/// 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
Member

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 :)

@@ -7,6 +7,7 @@ resolver = "2"

[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
Member

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
Member

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
13 checks passed
@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.

None yet

3 participants