@tishlang/tish-format 3.14.0 → 3.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/tish-format CHANGED
Binary file
@@ -1090,6 +1090,16 @@ fn build_file(
1090
1090
  } else {
1091
1091
  tishlang_native::NativeBuildConfig::desktop()
1092
1092
  };
1093
+ // Release builds name the triple so the binary targets the platform baseline instead of the
1094
+ // build machine's CPU, and so one host can build each slice of a universal binary.
1095
+ let mut build_config = build_config;
1096
+ if build_config.cargo_target.is_none() {
1097
+ if let Ok(triple) = std::env::var("TISH_NATIVE_CARGO_TARGET") {
1098
+ if !triple.is_empty() {
1099
+ build_config.cargo_target = Some(triple);
1100
+ }
1101
+ }
1102
+ }
1093
1103
 
1094
1104
  if is_js {
1095
1105
  let source = fs::read_to_string(&input_path).map_err(|e| format!("{}", e))?;
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "tishlang_fmt"
3
- version = "3.14.0"
3
+ version = "3.15.1"
4
4
  edition = "2021"
5
5
  description = "Opinionated formatter for Tish source (parse → pretty-print)"
6
6
  license-file = { workspace = true }
@@ -225,12 +225,16 @@ pub fn build_via_cargo_with_config(
225
225
  };
226
226
 
227
227
  // mimalloc as the program's global allocator — binary output only (a staticlib does not own the
228
- // allocator), native only (don't cross-compile mimalloc's C). Adds one cached dep + a global_alloc
228
+ // allocator), native or another macOS slice only (the host clang builds mimalloc's C for both
229
+ // Mac architectures; other cross targets are skipped). Adds one cached dep + a global_alloc
229
230
  // statement; semantically transparent. `TISH_NATIVE_FAST_ALLOC=0` opts out.
230
231
  let use_fast_alloc = fast_alloc_enabled()
231
232
  && build_config.artifact != NativeArtifact::StaticLib
232
233
  && build_config.artifact != NativeArtifact::FfiModule
233
- && build_config.cargo_target.is_none();
234
+ && build_config
235
+ .cargo_target
236
+ .as_deref()
237
+ .map_or(true, |t| cfg!(target_os = "macos") && t.ends_with("-apple-darwin"));
234
238
  if build_config.artifact == NativeArtifact::FfiModule {
235
239
  let guest_path = Path::new(&runtime_path)
236
240
  .parent()
@@ -107,7 +107,12 @@ pub fn compile_to_native_with_config(
107
107
  ios_runtime_features(f)
108
108
  }
109
109
  };
110
- let cross_cap = build_config.cargo_target.as_ref().map(|_| {
110
+ // A desktop triple (one slice of a universal macOS build) is not a restricted target.
111
+ let capped = build_config
112
+ .cargo_target
113
+ .as_deref()
114
+ .filter(|t| is_gba || !t.ends_with("-apple-darwin"));
115
+ let cross_cap = capped.map(|_| {
111
116
  cap(features)
112
117
  .into_iter()
113
118
  .collect::<std::collections::HashSet<_>>()
@@ -130,7 +135,7 @@ pub fn compile_to_native_with_config(
130
135
  message: e.to_string(),
131
136
  })?;
132
137
 
133
- let features_for_cargo = if build_config.cargo_target.is_some() {
138
+ let features_for_cargo = if capped.is_some() {
134
139
  cap(&effective_features)
135
140
  } else {
136
141
  effective_features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tishlang/tish-format",
3
- "version": "3.14.0",
3
+ "version": "3.15.1",
4
4
  "description": "Tish code formatter",
5
5
  "license": "PIF",
6
6
  "repository": {
Binary file
Binary file
Binary file
Binary file
Binary file