wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

`crates/jit/src/unwind/winx32.rs` doesn’t compile

Open kadiwa4 opened this issue 3 years ago • 3 comments

Currently, the file crates/jit/src/unwind/winx32.rs serves no purpose. In #3180 the other two unwind implementations (winx64.rs and systemv.rs) were rewritten, but the stub in winx32.rs was left unchanged. This means that the crate doesn't compile on 32-bit Windows. The file could be replaced with a new stub or removed entirely, I don't know.

Log
error[E0433]: failed to resolve: use of undeclared crate or module `cranelift_codegen`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-jit-0.32.0\src\unwind\winx32.rs:4:5
  |
4 | use cranelift_codegen::isa::{unwind::UnwindInfo, TargetIsa};
  |     ^^^^^^^^^^^^^^^^^ use of undeclared crate or module `cranelift_codegen`

error[E0432]: unresolved import `crate::unwind::UnwindRegistration`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-jit-0.32.0\src\code_memory.rs:3:5
  |
3 | use crate::unwind::UnwindRegistration;
  |     ^^^^^^^^^^^^^^^------------------
  |     |              |
  |     |              help: a similar name exists in the module: `UnwindRegistry`
  |     no `UnwindRegistration` in `unwind`

error[E0412]: cannot find type `UnwindInfo` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-jit-0.32.0\src\unwind\winx32.rs:13:74
   |
13 |     pub fn register(&mut self, _func_start: u32, _func_len: u32, _info: &UnwindInfo) -> Result<()> {
   |                                                                          ^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `TargetIsa` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-jit-0.32.0\src\unwind\winx32.rs:17:42
   |
17 |     pub fn publish(&mut self, _isa: &dyn TargetIsa) -> Result<()> {
   |                                          ^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0405, E0412, E0432, E0433.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `wasmtime-jit` due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Process completed with exit code 1.

kadiwa4 avatar Jan 02 '22 15:01 kadiwa4

Cranelift currently doesn't have an 32bit x86 backend. Only x86_64 and AArch64 are currently supported. See https://github.com/bytecodealliance/wasmtime/issues/1980.

bjorn3 avatar Jan 02 '22 17:01 bjorn3

Then I guess it would make sense to remove the file so it shows the unsupported-platform error when trying to compile.

kadiwa4 avatar Jan 02 '22 18:01 kadiwa4

Yes I think this code is historical and may have worked at one point but no longer does. I think it would be fine to move it to an unsupported platform as you've found.

alexcrichton avatar Jan 04 '22 15:01 alexcrichton

Closed by #5226.

kadiwa4 avatar Nov 11 '22 09:11 kadiwa4