diff --git a/.cargo/config.toml b/.cargo/config.toml index 3fb67a6..6ffb6c4 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,12 @@ [target.aarch64-apple-darwin] linker = "rust-lld" +# NOTE: `rustdoc` doesn't currently respect the `linker` setting — keep an eye +# on this issue: https://github.com/rust-lang/rust/issues/125657 +rustdocflags = ["-Clink-arg=-fuse-ld=lld"] + +# NOTE: Also annoyingly, `target.` doesn't let you set `rustdocflags`, so +# something like `[target.'cfg(target_os = "macos")']` doesn't work here and +# this repetition is needed... +[target.x86_64-apple-darwin] +linker = "rust-lld" +rustdocflags = ["-Clink-arg=-fuse-ld=lld"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 325cb83..3c2c902 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] # macos-latest + os: [ubuntu-latest, macos-latest, windows-latest] toolchain: [stable, beta, nightly] steps: - uses: actions/checkout@v4 @@ -26,6 +26,13 @@ jobs: with: toolchain: ${{ matrix.toolchain }} + # NOTE: `rustdoc` doesn't currently respect the `linker` setting — keep + # an eye on this issue: https://github.com/rust-lang/rust/issues/125657. + # In the meantime, we can't use `rust-lld` and will need to manually + # install `lld` on macOS (#14) + - if: runner.os == 'macOS' + run: brew install lld + - run: just test check_wasm_build: