Open
Description
Problem
The home
crate does not build for wasm32-unknown-unknown
. I encountered this through a transitive dependency from another crate.
Steps
$ cargo new bugreport
$ cd bugreport
$ echo 'home = "0.5"' >> Cargo.toml
$ cargo build --target wasm32-unknown-unknown
results in error:
error[E0425]: cannot find function `home_dir_inner` in the crate root
--> .cargo/registry/src/index.crates.io-6f17d22bba15001f/home-0.5.5/src/env.rs:33:16
|
33 | crate::home_dir_inner()
| ^^^^^^^^^^^^^^ not found in the crate root
Possible Solution(s)
Home has no obvious place in wasm, so I suggest adding the following (and I'm happy to add this myself, along with CI test on wasm target)
#[cfg(target_arch = "wasm32")]
fn home_dir_inner() -> Option<PathBuf> {
None
}
Notes
No response
Version
No response
Metadata
Assignees
Labels
Type
Projects
Status
FCP blocked