Skip to content

Add WASI build support - #10

Open
DiscontentDino wants to merge 2 commits into
mlua-rs:mainfrom
DiscontentDino:feat/wasi
Open

DiscontentDino wants to merge 2 commits into
mlua-rs:mainfrom
DiscontentDino:feat/wasi

Conversation

@DiscontentDino

Copy link
Copy Markdown

Summary

Add WASI build support.

Changes

  • Add extra_lib_dirs and extra_libs to the Artifacts struct for WASI link items.
  • Panic when enable_codegen is true for any WASM target.
  • Remove unnecessary vec![] macro.
  • Set cpp_stdlib to None when using wasi.
  • Set extra_lib_dirs to include $WASI_SYSROOT/lib/<triple>/eh (exception handling) and $WASI_SYSROOT/lib/<triple> (WASI libraries) when using WASI.
  • Set extra_libs to include c++, c++abi, unwind, and wasi-emulated-process-clocks (c is linked only when the target is wasm32-unknown-unknown).
  • Add extra_lib_dirs to the library search paths.
  • Link extra_libs in addition to Luau's libs.
  • Disable the codegen compilation setting for any WASM target in testcrate.
  • Disable codegen function declarations and calls for WASM targets in testcrate.
  • Document WASI requirements and initialization for wasm32-unknown-unknown.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant