Hi, I would like some advice on tracking down a runtime error message. It's literally just Encountered error: unsupported platform
.
This is from compiling Ruff to wasi-p1. I've tried its verbose logging option, that didn't help. I've tried RUST_BACKTRACE=1
but since it's not a panic that doesn't help.
In languages with exceptions this is a lot easier since you can pretty much just start a debugger and break on throw (as long as the code isn't badly written and uses exceptions in normal operation).
But Rust doesn't have that and anyway I'm not sure how to attach a debugger to wasm (I'm running it with the wasmtime
CLI).
The best I've got so far is to search grep.app, which leads me to suspect it's coming from the ignore
crate (which is a shame since I don't see why that couldn't support WASI).
However that doesn't tell me where the error happens in the Rust code. Ruff is a huge codebase so it's not easy to narrow down. My current best option is printf debugging but since Ruff takes about 10s to compile that's quite painful too.
Is there a better option?
One thing that would really help would be a way to search the source code of all of Ruff's dependencies, and then I could do "find all usages" or something to work back. Is that possible? It seems like the source code for crates is probably not stored in target
? Can I force it to do that?