@tishlang/tish-format 3.15.0 → 3.15.2
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 +0 -0
- package/crates/tish_fmt/Cargo.toml +1 -1
- package/crates/tish_native/src/build.rs +19 -8
- package/package.json +1 -1
- package/platform/darwin-arm64/tish-fmt +0 -0
- package/platform/darwin-x64/tish-fmt +0 -0
- package/platform/linux-arm64/tish-fmt +0 -0
- package/platform/linux-x64/tish-fmt +0 -0
- package/platform/win32-x64/tish-fmt.exe +0 -0
package/bin/tish-format
CHANGED
|
Binary file
|
|
@@ -236,14 +236,7 @@ pub fn build_via_cargo_with_config(
|
|
|
236
236
|
.as_deref()
|
|
237
237
|
.map_or(true, |t| cfg!(target_os = "macos") && t.ends_with("-apple-darwin"));
|
|
238
238
|
if build_config.artifact == NativeArtifact::FfiModule {
|
|
239
|
-
|
|
240
|
-
.parent()
|
|
241
|
-
.map(|crates| crates.join("tish_ffi_guest"))
|
|
242
|
-
.ok_or_else(|| format!("Cannot locate tish_ffi_guest next to {}", runtime_path))?;
|
|
243
|
-
more_deps.push_str(&format!(
|
|
244
|
-
"\ntishlang_ffi_guest = {{ path = {:?} }}\n",
|
|
245
|
-
guest_path.display().to_string().replace('\\', "/")
|
|
246
|
-
));
|
|
239
|
+
more_deps.push_str(&ffi_guest_dep_toml(&runtime_path)?);
|
|
247
240
|
}
|
|
248
241
|
if use_fast_alloc {
|
|
249
242
|
more_deps.push_str("\nmimalloc = \"0.1\"\n");
|
|
@@ -518,6 +511,24 @@ fn runtime_dep_toml(runtime_path: &str, features_str: &str) -> String {
|
|
|
518
511
|
}
|
|
519
512
|
}
|
|
520
513
|
|
|
514
|
+
/// The `tishlang_ffi_guest` dependency line for an FFI module (same source policy as the runtime).
|
|
515
|
+
/// A released compiler's module must take it from the registry: as a path it would bring its own
|
|
516
|
+
/// path-built `tishlang_core` next to the registry one the runtime uses, and the two `Value` types
|
|
517
|
+
/// don't match.
|
|
518
|
+
fn ffi_guest_dep_toml(runtime_path: &str) -> Result<String, String> {
|
|
519
|
+
if let Some(v) = released_compiler_version() {
|
|
520
|
+
return Ok(format!("\ntishlang_ffi_guest = {{ version = {:?} }}\n", v));
|
|
521
|
+
}
|
|
522
|
+
let guest_path = Path::new(runtime_path)
|
|
523
|
+
.parent()
|
|
524
|
+
.map(|crates| crates.join("tish_ffi_guest"))
|
|
525
|
+
.ok_or_else(|| format!("Cannot locate tish_ffi_guest next to {}", runtime_path))?;
|
|
526
|
+
Ok(format!(
|
|
527
|
+
"\ntishlang_ffi_guest = {{ path = {:?} }}\n",
|
|
528
|
+
guest_path.display().to_string().replace('\\', "/")
|
|
529
|
+
))
|
|
530
|
+
}
|
|
531
|
+
|
|
521
532
|
/// The optional `tishlang_ui` dependency line (same source policy as the runtime).
|
|
522
533
|
fn ui_dep_toml(runtime_path: &str, rust_code: &str) -> String {
|
|
523
534
|
if !rust_code.contains("tishlang_ui") {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|