Back to Pyrefly

Pyrefly WASM Build

pyrefly_wasm/README.md

0.63.1755 B
Original Source

Pyrefly WASM Build

Pyrefly's WASM build is used in browser-based applications like the Pyrefly sandbox.

Prerequisites

  • Ensure you have clang installed:
    • For mac: brew install llvm (source)
    • For CentOS: sudo dnf install clang
  • Install Mercurial: sudo apt install mercurial

Building Pyrefly for WASM

Run ./build.sh

Common issues with the build

Certain features that are allowed in the other builds are unavailable in the wasm build. You might errors like could not find \<>` in the crate root. This can be because we've excluded that package from the wasm build with #[cfg(not(target_arch = "wasm32"))]in thelib.rs/mod.rs` file.