tree: 86d6b8046406fcdb1f407e6754e288e88c8a961b
  1. .cargo/
  2. .gitignore
  3. build.sh
  4. Cargo.toml
  5. lib.rs
  6. README.md
pyrefly_wasm/README.md

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.