Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Fix wasm32-unknown-emscripten cross-compile#74

Open
kofigumbs wants to merge 1 commit into
ExPixel:masterfrom
kofigumbs:clang-args
Open

Fix wasm32-unknown-emscripten cross-compile#74
kofigumbs wants to merge 1 commit into
ExPixel:masterfrom
kofigumbs:clang-args

Conversation

@kofigumbs

Copy link
Copy Markdown

This PR adds workarounds for two issues that manifest when compiling for WASM with Emscripten:

  --- stderr
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:828:2: error: Unsupported architecture
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
...
   Compiling miniaudio v0.10.0 (/Users/kofi/Documents/miniaudio-rs/miniaudio)
error[E0425]: cannot find function `ma_context_init` in crate `sys`
  --> miniaudio-sys/examples/simple-enumeration-raw.rs:13:13
   |
13 |     if sys::ma_context_init(null(), 0, null(), context.as_mut_ptr()) != sys::MA_SUCCESS as _ {
   |             ^^^^^^^^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `ma_context_get_devices` in crate `sys`
  --> miniaudio-sys/examples/simple-enumeration-raw.rs:25:23
   |
25 |     let result = sys::ma_context_get_devices(
   |                       ^^^^^^^^^^^^^^^^^^^^^^ not found in `sys`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant