ed25519-dalek icon indicating copy to clipboard operation
ed25519-dalek copied to clipboard

Serde no_std compatibility

Open semenov-vladyslav opened this issue 1 year ago • 4 comments

This PR addresses issue #287. Tests pass with different combinations of features: "serde", "serde alloc", "serde std", "alloc".

semenov-vladyslav avatar Mar 07 '23 22:03 semenov-vladyslav

Weird failure in the MSRV test. Wonder if it's a nightly bug in the unused import diagnostic.

@semenov-vladyslav maybe try pinning a slightly older nightly?

tarcieri avatar Mar 07 '23 22:03 tarcieri

Looks like clippy failed on unused imports. Forgot to update cfg pragma to a few other imports. Essentially, "serde" feature requires one of "std" or "alloc". Fixed that, now it should work.

semenov-vladyslav avatar Mar 08 '23 05:03 semenov-vladyslav

Looks like we didn't use thumbv7em-none-eabihf in CI that tests the target with no std avail.

We should probably add that: https://github.com/dalek-cryptography/curve25519-dalek/blob/main/.github/workflows/rust.yml#L45-56

Adding a test here to CI: https://github.com/dalek-cryptography/ed25519-dalek/pull/289 - checking that this fails as expected.

pinkforest avatar Mar 12 '23 00:03 pinkforest

Confirming no_std build works in main without serde: https://github.com/dalek-cryptography/ed25519-dalek/actions/runs/4394998670/jobs/7696444822

However with serde it fails as expected: https://github.com/dalek-cryptography/ed25519-dalek/actions/runs/4395018249/jobs/7696481185

Can we re-base this when the test PR in CI so we ensure in CI it's fixed.

pinkforest avatar Mar 12 '23 01:03 pinkforest