There exists tooling already to compile for wasm from static languages (rust, C++, and so on) and there exists tooling to run this WASM on a raspberry pi (wasmer, etc).
That makes me feel the end goal here is not what's described ("make wasm so it can run on a raspberry"), but rather "make wasm run in micropython".
Curious if you've seen the WAMR runtime which is explicitly designed to be lightweight enough for freestanding embedded systems on some higher end microcontrollers (Cortex-M4F).