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

Serialization with no_std #66

Open
KyleKotowick opened this issue Sep 13, 2024 · 0 comments · May be fixed by #70
Open

Serialization with no_std #66

KyleKotowick opened this issue Sep 13, 2024 · 0 comments · May be fixed by #70

Comments

@KyleKotowick
Copy link

KyleKotowick commented Sep 13, 2024

When the serialization feature is enabled, pqcrypto will include the serde crate. The serde crate includes std as a default feature. This means that it's not possible to use pqcrypto with serialization in a no_std environment.

Would it be possible disable standard features in the serde dependency? i.e. serde = { version = "1.0", default-features = false, features = ["derive"] }?

Edit: I tried this with a fork and it's throwing a number of errors. Looking for any alternative on how to achieve serialization/deserialization in a no_std environment.

Compilation error with
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }

The following warnings were emitted during compilation:

warning: ar: '/home/.../target/debug/build/pqcrypto-dilithium-918f739615645239/out/libdilithium2_clean.a': No such file

error: failed to run custom build command for `pqcrypto-dilithium v0.5.0 (/home/.../pqcrypto/pqcrypto-dilithium)`

Caused by:
  process didn't exit successfully: `/home/.../target/debug/build/pqcrypto-dilithium-192d2ee7428ca425/build-script-build` (exit status: 1)
  --- stdout
  OUT_DIR = Some(/home/.../target/debug/build/pqcrypto-dilithium-918f739615645239/out)
  TARGET = Some(x86_64-unknown-linux-gnu)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=ar: '/home/.../target/debug/build/pqcrypto-dilithium-918f739615645239/out/libdilithium2_clean.a': No such file

  --- stderr


  error occurred: Command "ar" "s" "/home/.../target/debug/build/pqcrypto-dilithium-918f739615645239/out/libdilithium2_clean.a" with args ar did not execute successfully (status code exit status: 1).
@thomwiggers thomwiggers linked a pull request Nov 11, 2024 that will close this issue
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 a pull request may close this issue.

1 participant