[WASI] Importing namespaced 3rd party C extensions (with import cycles)

We have a customer who says they want to use it, but I have to admit, for a user-defined function being called on every row in a database, pandas DataFrames are probably not a great idea. I haven’t seen their actual use-case yet, but I thought I would keep trying to get these packages working while the process was fresh in my mind.

1 Like

Sorry, I did enter it but figured it might get routed to you. You can link this one.

https://github.com/python/cpython/issues/102700

We’re dealing with eventual consistency, so it did, but about an hour after I opened my issue. :sweat_smile: But it’s all good regardless.

Is this documented or being done in the open anywhere about the steps you had to take to make this work?

Nothing is documented yet. It’s all still very hacked together. Numpy actually isn’t that bad. We do need a #if defined(__wasi__) in one spot in a header file, but for the most part it didn’t need much help. Pandas is taking quite a bit more work. In fact, trying to link a final library with pandas is crashing wasm-ld right now. I think I know what the problem is, but I’m still working through it. I’m hoping by the end of the day today I’ll have that fixed and can start cleaning things up to make it public.

1 Like

Was there an update already for getting Pandas to work with WASI?

Not yet. Now that WASI preview 2 is out, I’m hoping we can make some headway into compiling Python packages using the component model.