You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I build, watch & serve a Rust WASM app with cryptoki, its dependency cryptoki-sys raise a compilation error.
The error is:
# cargo check --target wasm32-unknown-unknown
Checking ...
Checking cryptoki-sys v0.1.7(registry `custom-regsitry`)
error[E0433]: failed to resolve: could not find `Library` in `libloading`
--> /root/.cargo/registry/src/custom-regsitry-url/cryptoki-sys-0.1.7/src/bindings/generic.rs:2164:37
|
2164 | let library = ::libloading::Library::new(path)?;
| ^^^^^^^ could not find `Library` in `libloading`
error[E0412]: cannot find type `Library` incrate `libloading`
--> /root/.cargo/registry/src/custom-regsitry-url/cryptoki-sys-0.1.7/src/bindings/generic.rs:1634:30
|
1634 | __library:::libloading::Library,
| ^^^^^^^ not found in `libloading`
error[E0412]: cannot find type `Library` incrate `libloading`
--> /root/.cargo/registry/src/custom-regsitry-url/cryptoki-sys-0.1.7/src/bindings/generic.rs:2169:31
|
2169 | L:Into<::libloading::Library>,
| ^^^^^^^ not found in `libloading`
Some errors have detailed explanations:E0412,E0433.For more information about an error, try `rustc --explain E0412`.error: could not compile `cryptoki-sys` (lib) due to 3 previous errors
Steps To Reproduce
Make sure the wasm32-unknown-unknown target for rust is installed
rustup target add wasm32-unknown-unknown
(if you are using a custom Rust toolchain, add the wasm32 component into your rust/toolchains/$custom-toolchain/components/ folder
Install the dioxus command line allowing you to compile your rust app to wasm target
cargo install dioxus-cli
dx --help
Create a rust application using the default dioxus template: dx create, and select the following options:
run instead: dx create --template dioxus-template-main
If $USER not found -> export USER=any, the value do not matter
# dx create --template dioxus-template-main
[WARN]You appear to be creating a Dioxus project from scratch; we will use the default config
[WARN]Favorite `dioxus-template-main` not found in config, using it as a local path:dioxus-template-main
...
✔ What platform are you targeting? · web
✔ Should the application use the dioxus router? · true
✔ How do you want to create CSS? · Vanilla
...
I'm working on a Docker Container, offline, with a custom Rust toolchain and a custom registry. I've been working with them for 3 months and have never had a problem so far, so I want to remove these two from the possible error case.
With my toolchain and registry: I have two full Rust apps working. One with an Axum server and Dioxus client, communicating with REST and WebSockets. Another with cryptoki (RSA PKCS#11), without any issue so far.
Dioxus version: v0.4.0
Dioxus cli version: v0.4.1
Cryptoki version: v0.6.1
Rust version: 1.70.0, stable
OS info: Docker container: Debian GNU/Linux 11 (bullseye)
Questionnaire
I'm interested in fixing this myself but don't know where to start
The text was updated successfully, but these errors were encountered:
Just out of curiosity what would be the use case? Cryptoki frequently needs PKCS11 driver anyway and you'd have to be able to access the device somehow (eg. via pcsclite).
Cannot compile
cryptoki-sys
to wasm targetRelated to: Cannot compile dependency: could not find
Library
inlibloading
#1641When I build, watch & serve a Rust WASM app with
cryptoki
, its dependencycryptoki-sys
raise a compilation error.The error is:
Steps To Reproduce
wasm32-unknown-unknown
target for rust is installedrustup target add wasm32-unknown-unknown
rust/toolchains/$custom-toolchain/components/
foldercargo install dioxus-cli
dx --help
dx create
, and select the following options:download/unzip
the dioxus-templatedx create --template dioxus-template-main
$USER
not found ->export USER=any
, the value do not matterExpected behavior
Being able to compile after running
dx serve
:Environment:
I'm working on a Docker Container, offline, with a custom Rust toolchain and a custom registry. I've been working with them for 3 months and have never had a problem so far, so I want to remove these two from the possible error case.
With my toolchain and registry: I have two full Rust apps working. One with an Axum server and Dioxus client, communicating with REST and WebSockets. Another with cryptoki (RSA PKCS#11), without any issue so far.
v0.4.0
v0.4.1
v0.6.1
1.70.0
,stable
Docker container
:Debian GNU/Linux 11 (bullseye)
Questionnaire
The text was updated successfully, but these errors were encountered: