Inconsistent JS–Python FFI behavior between Pyodide and MicroPython runtimes
0 reputation · 18 Aug 2023, 19:06 UTC
When testing a PyScript integration that relies on the JS–Python FFI, the objective is to confirm that Python code can import a stub JavaScript module and invoke its functions without using production credentials, while ensuring the test passes regardless of whether the underlying runtime is Pyodide or MicroPython.
The two runtimes differ in standard‑library size, startup latency, and WebAssembly package support, which may affect the availability of the js module and the performance of asynchronous mocks. It remains unclear whether the FFI behaves identically across these runtimes or if additional configuration is required to achieve parity. Which runtime should be chosen as the default for reliable integration tests, and what configuration adjustments, if any, are needed to make the FFI behavior consistent between Pyodide and MicroPython?