paritytech / paritytech/subxt

Cargo check gives error for wasm build

Open
#2,048 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
489
Forks
293
Avg merge
18h 35m
Merged PRs (30d)
3

Description

Cargo check gives following error, its a old problem that's not been solved.

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `jsonrpsee_helpers`
  --> /home/amiya/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/subxt-rpcs-0.43.0/src/client/rpc_client.rs:35:22
   |
35 |         let client = jsonrpsee_helpers::client(url.as_ref())
   |                      ^^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `jsonrpsee_helpers`
   |
   = help: if you wanted to use a crate named `jsonrpsee_helpers`, use `cargo add jsonrpsee_helpers` to add it to your `Cargo.toml`

But error disappears with adding .cargo/config.toml

[build]
target = "wasm32-unknown-unknown"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Cargo check failure and compare it with the behavior when .cargo/config.toml sets the wasm32-unknown-unknown target. Read the reported subxt-rpcs-0.43.0 client/rpc_client.rs location and inspect how jsonrpsee_helpers is resolved. Done means Cargo check works for the wasm build without requiring the configuration workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.