I'm using drand-core in my smart contract based on cosmwasm that has ureq in dependencies and it has rustls-native-certs in the dependencies.
It compile successfully on running cargo test but after compile the project with this command:
docker run --rm -v "$(pwd)":/code --network="host" \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.15.1
I get this error:
error[E0433]: failed to resolve: use of undeclared crate or module `platform`
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-native-certs-0.7.0/src/lib.rs:58:42
|
58 | load_certs_from_env().unwrap_or_else(platform::load_native_certs)
| ^^^^^^^^ use of undeclared crate or module `platform`
In the description of this repo, I found wasm32 compatible library but I found that ureq used in dependencies not support wasm based on this issue and rustls-native-certs not support wasm based on this issue.
What should I do for this issue, It seems platform not clear in workspace-optimizer?
To reproduce the problem, do the following:
- run this to create project from template:
$ cargo generate --git https://github.com/CosmWasm/cw-template.git --branch 1.0 --name project
$ cd project
- Add
drand_core = { version = "0.0.16" } to dependency of Cargo.toml
- run this:
$ docker run --rm -v "$(pwd)":/code --network="host" \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.15.1
Or
I'm using
drand-corein my smart contract based on cosmwasm that hasureqin dependencies and it hasrustls-native-certsin the dependencies.It compile successfully on running
cargo testbut after compile the project with this command:I get this error:
In the description of this repo, I found
wasm32 compatible librarybut I found thatureqused in dependencies not supportwasmbased on this issue andrustls-native-certsnot supportwasmbased on this issue.What should I do for this issue, It seems platform not clear in workspace-optimizer?
To reproduce the problem, do the following:
$ cargo generate --git https://github.com/CosmWasm/cw-template.git --branch 1.0 --name project $ cd projectdrand_core = { version = "0.0.16" }to dependency ofCargo.tomlOr