I have the 'rust' and 'rust-src' packages installed (not rustup). I understand that it's possible to target wasm32-unknown-unknown just using the 'rustc' command. I think that I need to use the '-L' path option to be able to point to the right directories. It's the standard library that's important here, right?
I have the 'rust-src' package which is the "source code for the Rust standard library". Also, 'rust-src' is a dependency for the 'rust-analyzer' package which requires the standard library, I believe. Wouldn't that have the needed directories for the '-L' option when using 'rustc'?
Rustc doesn't have builtin knowledge on how to build the standard library from source. It expects a pre-compiled version in it's sysroot. Cargo has support for building the standard library behind the -Zbuild-std flag, but this is only available on nightly rustc due to being unstable.
Assuming you installed rustc from using ArchLinux's pacman, you can install the rust-wasm package for a precompiled standard library for both wasm32-unknown-unknown and wasm32-wasi.