@calcit/procs 0.13.48 → 0.13.50

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.
Binary file
package/build.rs CHANGED
@@ -5,6 +5,7 @@ use std::collections::HashMap;
5
5
  use std::env;
6
6
  use std::fs;
7
7
  use std::path::Path;
8
+ use std::process::Command;
8
9
 
9
10
  #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
10
11
  #[serde(rename_all = "lowercase")]
@@ -558,8 +559,39 @@ fn parse_files(edn: Edn) -> Result<HashMap<String, FileInSnapShot>, String> {
558
559
  }
559
560
  }
560
561
 
562
+ fn rustc_verbose_field<'a>(output: &'a str, name: &str) -> &'a str {
563
+ output
564
+ .lines()
565
+ .find_map(|line| line.strip_prefix(name).map(str::trim))
566
+ .unwrap_or_else(|| panic!("`rustc --version --verbose` did not report `{name}`"))
567
+ }
568
+
569
+ fn ffi_build_id() -> String {
570
+ let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".to_owned());
571
+ let output = Command::new(&rustc)
572
+ .args(["--version", "--verbose"])
573
+ .output()
574
+ .unwrap_or_else(|error| panic!("failed to run `{rustc} --version --verbose`: {error}"));
575
+ if !output.status.success() {
576
+ panic!("`{rustc} --version --verbose` failed with {}", output.status);
577
+ }
578
+ let verbose = String::from_utf8(output.stdout).expect("rustc verbose version must be UTF-8");
579
+ let release = rustc_verbose_field(&verbose, "release:");
580
+ let commit = rustc_verbose_field(&verbose, "commit-hash:");
581
+ let target = env::var("TARGET").expect("Cargo must provide TARGET to build scripts");
582
+ let debug_assertions = env::var_os("CARGO_CFG_DEBUG_ASSERTIONS").is_some();
583
+ let panic_strategy = env::var("CARGO_CFG_PANIC").expect("Cargo must provide CARGO_CFG_PANIC to build scripts");
584
+
585
+ format!("rustc={release}:{commit};target={target};debug-assertions={debug_assertions};panic={panic_strategy}")
586
+ }
587
+
561
588
  fn main() {
562
589
  println!("cargo:rerun-if-changed=src/cirru/calcit-core.cirru");
590
+ println!("cargo:rerun-if-env-changed=RUSTC");
591
+ println!("cargo:rerun-if-env-changed=TARGET");
592
+ println!("cargo:rerun-if-env-changed=CARGO_CFG_DEBUG_ASSERTIONS");
593
+ println!("cargo:rerun-if-env-changed=CARGO_CFG_PANIC");
594
+ println!("cargo:rustc-env=CALCIT_FFI_BUILD_ID={}", ffi_build_id());
563
595
 
564
596
  let out_dir = env::var_os("OUT_DIR").unwrap();
565
597
  let dest_path = Path::new(&out_dir).join("calcit-core.rmp");
@@ -0,0 +1,8 @@
1
+ # Reject retired compact.cirru snapshots
2
+
3
+ - Reject `compact.cirru` before deserialization instead of silently running it
4
+ as a default or module fallback.
5
+ - Point users to the canonical copy/rename, format, and check-only sequence.
6
+ - Record 0.13.48 as the final compatibility release for the old filename.
7
+ - Remove the obsolete formatter warning because formatting a retired filename
8
+ is no longer an accepted operation.
@@ -0,0 +1,6 @@
1
+ # Resolve compact snapshot migration review
2
+
3
+ - Keep retired `compact.cirru` files out of normal module candidate resolution.
4
+ - Detect compact-only modules separately so they retain actionable migration guidance.
5
+ - Preserve nested module directories in the canonical destination and validation commands.
6
+ - Correct the remaining singular snapshot wording in the agent guide.
@@ -0,0 +1,15 @@
1
+ # Guard transitional Rust-native FFI with a C-safe build handshake
2
+
3
+ - Embed the exact rustc release/commit, target, debug-assertion mode, and panic
4
+ strategy in the Calcit host build.
5
+ - Read an optional static C string from dylibs before invoking legacy Rust ABI
6
+ version or business symbols.
7
+ - Reject mismatched identities deterministically; require identity metadata for
8
+ debug hosts while retaining a warned release-only migration path.
9
+ - Apply the same check to runtime calls and `caps` native verification, and
10
+ include the identity in native realization receipts and cache keys.
11
+ - Add `calcit --ffi-build-id` and document the extension-side build script and
12
+ export.
13
+ - Reproduce the former debug-host/release-dylib abort with calcit_wasmtime: the
14
+ guarded host now rejects before `abi_version`; matching release builds still
15
+ return `27`.
@@ -0,0 +1,5 @@
1
+ # FFI build handshake review follow-up
2
+
3
+ - Updated the introductory Rust FFI examples to use Rust 2024-compatible `#[unsafe(no_mangle)]` attributes.
4
+ - Included the required `build.rs` identity generator in the documented upgrade staging command.
5
+ - Kept the original `202608270214` history timestamp because it records Asia/Shanghai local time, matching the repository workflow and actual commit time.
@@ -0,0 +1,5 @@
1
+ # Release 0.13.49
2
+
3
+ - Published the strict `compact.cirru` filename cutoff merged in #475.
4
+ - Published the transitional Rust-native FFI build-identity handshake merged in #476.
5
+ - Kept Cargo and npm package versions synchronized and refreshed the workspace lockfile.
@@ -0,0 +1,6 @@
1
+ # Add the synchronous FFI byte-buffer protocol
2
+
3
+ - Added a versioned C ABI for synchronous FFI calls using owned UTF-8 Cirru EDN buffers.
4
+ - Made method migration incremental by preferring `<method>_calcit_ffi_v1` and retaining the build-ID-guarded Rust ABI as a fallback.
5
+ - Kept output ownership in the dylib through `calcit_ffi_buffer_free`, with host-side invariant and size checks before decoding.
6
+ - Added focused tests for protocol versioning, symbol derivation, and request encoding; callback migration remains a separate phase.
@@ -0,0 +1,6 @@
1
+ # FFI buffer protocol review follow-up
2
+
3
+ - Corrected the FFI documentation heading hierarchy.
4
+ - Made nonzero-status payloads obey the same strict UTF-8 contract as successful EDN responses.
5
+ - Added a focused regression test that rejects malformed error bytes rather than replacing them lossily.
6
+ - Kept the original 03:16 history timestamp because it records the actual Asia/Shanghai commit time.
@@ -0,0 +1,5 @@
1
+ # Release 0.13.50
2
+
3
+ - Published synchronous C-safe FFI buffer protocol v1 merged in #477.
4
+ - Retained per-method fallback to the build-ID-guarded Rust ABI for incremental ecosystem migration.
5
+ - Kept Cargo and npm package versions synchronized and refreshed the workspace lockfile.
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.48",
3
+ "version": "0.13.50",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.48",
3
+ "version": "0.13.50",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",