You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moving the discussion to a separate issue since this question is quite complex =)
For context, chemfiles is written in C++, and exposes a C API. This repository contains the Rust FFI binding to the C API.
The C++ code can be compiled to WASM using emscripten, this is the basis for the (unreleased) JS bindings to chemfiles in https://github.com/chemfiles/chemfiles.js.
Unfortunately, there are some difference between the emscripten WASM target and the Rust wasm32-unknown-unknown target, so I don't know if we can use the resulting WASM code together with Rust.
The alternative would be to compile the C++ code without emscripten, maybe using LLVM facilities directly trying to make it as compatible with rustcwasm32-unknown-unknown target as possible. The issue here is that emscripten provides a lot of functionalities (mainly a virtual filesystem giving access to pseudo-files in a browser context), which would have to be replicated with the new compiler
Overall, this is something I would like to enable, but will require a lot of work & knowledge about both WASM & FFI.
Is there any possibility of
wasm32-unknown-unknown
support at any point down the line?Originally posted by @Yoshanuikabundi in #22 (comment)
The text was updated successfully, but these errors were encountered: