forked from utensils/claudette
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
43 lines (40 loc) · 2.54 KB
/
Copy pathmise.toml
File metadata and controls
43 lines (40 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Contributor environment for non-Nix builds.
#
# The Nix devshell (flake.nix) is still the recommended path; this file is
# for contributors who use `mise` instead. It pins the toolchain assumed by
# the README's fresh-clone steps and, on macOS, points the linker at the
# active SDK so transitive crate build scripts that link `-liconv`/`-lSystem`
# actually find them. Without that, `nix-darwin`-style setups (where `cc`
# resolves to a wrapper that doesn't auto-inject the SDK lib path) trip
# `ld: library not found for -liconv` inside e.g. `objc2-exception-helper`'s
# build script. No `cargo:rustc-link-search` from any one crate's build.rs
# can reach a transitive build script — the fix has to be at the env layer.
[tools]
rust = "1.94"
bun = "latest"
# tauri-cli pinned to the same ^2.9 line the Nix devshell ships
# (`pkgs.cargo-tauri`). The npm package ships a prebuilt binary,
# sidestepping `cargo install tauri-cli` (which itself needs the SDK
# linker fix below). `src-tauri/Info.plist` is picked up automatically
# from its conventional location — no `bundle.macOS.infoPlist` config
# field exists in the Tauri 2 schema, and stricter validators (e.g.
# nixpkgs' cargo-tauri 2.9.6) reject it as an unknown property.
"npm:@tauri-apps/cli" = "^2.9"
[env]
# macOS only. `xcrun --show-sdk-path` resolves whichever SDK is active —
# Xcode or just the Command Line Tools. On non-macOS the conditional
# renders as an empty string, which mise treats as unset for these vars.
SDKROOT = "{% if os() == 'macos' %}{{ exec(command='xcrun --show-sdk-path') | trim }}{% endif %}"
LIBRARY_PATH = "{% if os() == 'macos' %}{{ exec(command='xcrun --show-sdk-path') | trim }}/usr/lib{% endif %}"
# Force Apple's clang as the C compiler and linker on macOS, regardless of
# PATH order. Setting `LIBRARY_PATH` alone isn't enough on nix-darwin: nix's
# bundled `ld` doesn't resolve Apple's `.tbd` text-based stubs the same way
# `ld64` does, so links fail with "Undefined symbols for arch arm64" on
# `-lSystem` even when libSystem.tbd is on the search path. /usr/bin/cc and
# /usr/bin/c++ are present on every Mac with Xcode or the Command Line Tools.
CC = "{% if os() == 'macos' %}/usr/bin/cc{% endif %}"
CXX = "{% if os() == 'macos' %}/usr/bin/c++{% endif %}"
# Cargo's per-target linker overrides — both arches set so universal-binary
# builds and either-host machines pick up Apple's clang as the linker driver.
CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER = "{% if os() == 'macos' %}/usr/bin/cc{% endif %}"
CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER = "{% if os() == 'macos' %}/usr/bin/cc{% endif %}"