MathCAT icon indicating copy to clipboard operation
MathCAT copied to clipboard

Invoke Web Assembly-specific dependencies when building for Wasm.

Open jasonjgw opened this issue 3 years ago • 2 comments

The purpose of the proposed change is to allow MatCAT to be compiled to Web Assembly without modification.

This isn't compiling yet. Changes may be necessary before it can be merged.

On my system, at least, compiling dependencies that include C code fails, as Clang can't find the Standard C library (specifically, a file not found error is returned when opening stdlib.h).

The command line was: cargo build --target wasm32-unknown-unknown

jasonjgw avatar Feb 17 '22 23:02 jasonjgw

Sorry -- missed this PR for some reason.

A prior commit changed the zip compression algorithm to avoid the need to use Clang. Between that and publishing MathCAT, I believe MathCATDemo should build MathCAT without a problem now.

@jasonjgw: is your proposed change still useful?

NSoiffer avatar Apr 08 '22 18:04 NSoiffer

I wasn't able to complete the compilation process for WebAssembly even with this change, but that was prior to the revision you mentioned regarding zip compression.

If it builds for WebAssembly without modification, then I'd leave this change out for the moment and close the pull request, but if you think it would be better to include those dependencies conditionally (in WebAssembly only) for the future then the approach taken is this PR could be a good starting point.

jasonjgw avatar Apr 08 '22 18:04 jasonjgw