)]}'
{
  "log": [
    {
      "commit": "9574941391996aeb4001a7cdc4088e15fea56aff",
      "tree": "d2bdc45a7e0d9a1b5ee3639473e8966668efb531",
      "parents": [
        "e1ba35fe0c6bcb58548484890f709553d1a3b652"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Mon Nov 16 04:44:24 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 16 17:44:24 2026 +0800"
      },
      "message": "[FEAT] Add typed enum attribute map lookup (#977)\n\nAdd `reflection::EnumAttrMap\u003cEnumClsObj, T\u003e` and\n`GetEnumAttrMap\u003cEnumClsObj\u003e(AttrKey\u003cT\u003e)` alongside `EnumDef`. The\nfactory resolves the enum object type internally and deduces the\nattribute value type from its key.\n\nMaps retain the shared registry dictionary for typed lookup by enum\nsingleton identity. Missing columns throw; missing or None entries\nreturn `std::nullopt`, and `AttrKey::ValueFrom` checks present values.\nLater registrations and attribute updates remain visible."
    },
    {
      "commit": "e1ba35fe0c6bcb58548484890f709553d1a3b652",
      "tree": "20623f66d3caa758e802fb119050487ec6852ec4",
      "parents": [
        "d74a25dc893c969752d622a158f6af47ecb067b3"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Sun Nov 15 22:47:21 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 15 09:47:21 2026 -0500"
      },
      "message": "[PERF] Avoid backtraces for type-key and dtype probes (#975)\n\nType-key and dtype probes can capture expensive error backtraces for\nexpected misses.\n\nQuery type keys without raising, and add `tvm_ffi.dtype.try_parse(text)\n-\u003e dtype | None`. It returns the parsed dtype directly on success and\nNone for an invalid dtype string, avoiding a second parse after a\nsuccessful probe. The registered `ffi.DataTypeTryParse` function returns\n`Optional\u003cDLDataType\u003e`; there is no boolean can-parse API.\n\nDtype parsing reuses ErrorBuilder through a file-local\nTVM_FFI_THROW_NO_BACKTRACE macro. Invalid dtype construction still\nraises ValueError with the existing message, without capturing a parser\nbacktrace. Other errors propagate. No new C API or Cython wrapper is\nrequired.\n\nValidation: editable C++/Cython build succeeded; dtype and object tests:\n161 passed, 1 skipped. Type checking, Ruff, C++ formatting, and\nwhitespace checks passed.\n\nCo-authored-by: Zihao Ye \u003czihaoy@nvidia.com\u003e"
    },
    {
      "commit": "d74a25dc893c969752d622a158f6af47ecb067b3",
      "tree": "49e7eecbd32f58219449ec8c48190fd565fdfe5e",
      "parents": [
        "99a7eddedc76757e84ba0384db05b93c3568fe94"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Sat Nov 14 23:42:49 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 14 10:42:49 2026 -0500"
      },
      "message": "[PERF] Speed up Object instance and subclass checks (#976)\n\nObject instance and subclass checks incur ABCMeta overhead even when no\nvirtual subclasses are registered. Negative subclass checks can\nrecursively traverse large class hierarchies.\n\nUse MRO checks for Object instance and subclass checks, falling back to\nABCMeta when virtual subclasses are registered or a subclass hook is\ndefined. Add coverage for non-Object values, collection ABCs, virtual\nsubclasses, and subclass hooks.\n\n---------\n\nCo-authored-by: Zihao Ye \u003czihaoy@nvidia.com\u003e\nCo-authored-by: tqchen \u003ctianqi.tchen@gmail.com\u003e"
    },
    {
      "commit": "99a7eddedc76757e84ba0384db05b93c3568fe94",
      "tree": "d25b86b749f3b930f1e6f9fbd217f1d879a4b603",
      "parents": [
        "0f8cd9cc82d35ad18d1a6f3aff5436f29a835605"
      ],
      "author": {
        "name": "0z5a",
        "email": "dinadegttyarenko6@gmail.com",
        "time": "Tue Nov 10 15:08:37 2026 +0100"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 10 09:08:37 2026 -0500"
      },
      "message": "[FIX] Use the opt-in shared memory limit in GetKernelWithMaxDynamicSharedMemory (#973)\n\nFixes #971\n\n`GetKernelWithMaxDynamicSharedMemory(name, -1)` should allow the maximum\ndynamic shared memory the device permits, minus the kernel\u0027s static\nshared memory. It computed that limit from device attribute 8\n(`MaxSharedMemoryPerBlock`), the 48 KiB default per-block limit. The\nattribute it set was therefore what a kernel can already use without\nopting in, and launches with more than 48 KiB of dynamic shared memory\nstill failed with `invalid argument`.\n\nThis change queries attribute 97\n(`cudaDevAttrMaxSharedMemoryPerBlockOptin` /\n`CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`) instead. An\nexplicit `dynamic_smem_max` and launches up to 48 KiB behave as before.\n\nThe new `test_cubin_launcher_max_dynamic_smem` loads a kernel with 1 KiB\nof static shared memory through\n`GetKernelWithMaxDynamicSharedMemory(name, -1)`. It checks that\n`maxDynamicSharedSizeBytes \u003d\u003d optin - static`, then launches with that\nmuch dynamic shared memory and checks the result. On GH200 (aarch64,\nsm_90) and B300 (sm_103) it fails on main\n(`maxDynamicSharedSizeBytes\u003d48128, expected 231424`) and passes with\nthis change. The three existing CUBIN tests still pass on both.\n\nThe new test is behind the existing `torch.version.cuda \u003e (13, 0)` gate,\nlike the other CUBIN tests. To run it with a cu130 torch (`\"13.0\"`), the\ngate was relaxed locally; that change is not part of this PR.\n\n---------\n\nSigned-off-by: 0z5a \u003cdezhen.lu@student.uni-tuebingen.de\u003e\nSigned-off-by: tqchen \u003ctqchen.ml@gmail.com\u003e\nCo-authored-by: tqchen \u003ctqchen.ml@gmail.com\u003e"
    },
    {
      "commit": "0f8cd9cc82d35ad18d1a6f3aff5436f29a835605",
      "tree": "ecb2f977a6328456cb0e3f8fcd406b7f37264231",
      "parents": [
        "e2179b2e82d39be91076da07d840720b6e706359"
      ],
      "author": {
        "name": "0z5a",
        "email": "dinadegttyarenko6@gmail.com",
        "time": "Tue Nov 10 15:08:25 2026 +0100"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 10 09:08:25 2026 -0500"
      },
      "message": "[FIX] Honor __tvm_ffi_env_stream__ for the first device argument (#972)\n\nFixes #970\n\n`TVMFFIPyArgSetterDLPack_` handles objects that implement `__dlpack__`\nwithout the C exchange API. It mishandles the stream returned by\n`__tvm_ffi_env_stream__` in two ways:\n\n- It records the stream only when `ctx.device_type !\u003d -1`, i.e. only\nafter an earlier argument has set the call-context device. A wrapper\nthat is the first or only device argument is ignored. A wrapper after\nanother device argument replaces that argument\u0027s stream.\n- `temp_ptr` is not declared. `\u003cTVMFFIStreamHandle\u003etemp_ptr` therefore\nstores the address of the Python int, not the stream handle.\n\nThis change applies the first-device rule of the other setters\n(`ctx.device_type \u003d\u003d -1`) and declares `cdef long long temp_ptr`. These\nare the same two changes the torch fallback setter received in #241.\n\nThe new `test_dlpack_env_stream_protocol` passes a host-allocated tensor\nlabelled `cuda:0`. The stream table is host state, so the test needs no\nGPU and runs in CI. On main it fails with `assert 0 \u003d\u003d 123456789`; with\nthis change it passes. With torch CUDA tensors on GH200 (aarch64, sm_90)\nand B300 (sm_103), `get_stream(w1)`, `get_stream2(w1, w2)` and\n`get_stream2(x, w2)` under `torch.cuda.stream(s1)` all return s1 with\nthis change; on main they return 0, 0 and the Python object address. The\nexisting `test_stream.py` torch cases still pass on both.\n\nSigned-off-by: 0z5a \u003cdezhen.lu@student.uni-tuebingen.de\u003e"
    },
    {
      "commit": "e2179b2e82d39be91076da07d840720b6e706359",
      "tree": "28cfae7be2976f8b8c3c534c1f6d09bd76fdd232",
      "parents": [
        "b2ec7c93a9bb30bb44df537669090f6312cb838a"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 16:50:53 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 16:50:53 2026 -0500"
      },
      "message": "[Stubgen] One grammar for one-line directives: `subject: target(keys)` (#968)\n\nStubgen\u0027s one-line directives each had their own payload syntax (`a -\u003e\nb`, `T.f -\u003e N(i32) { A\u003d0 }`, `x;False;y`, bare `allow`). This replaces\nall of them with one grammar, shared by the Python and Rust generators:\n\n```\n\u003ccomment\u003e tvm-ffi-stubgen(\u003csubject\u003e): \u003ctarget\u003e(\u003ckey\u003e, \u003ckey\u003e \u003d \u003cvalue\u003e, ...)\n```\n\nThe parentheses are omitted when there are no keys. Lines for the same\nsubject and target merge; a repeatable key (`upcast`) collects every\nvalue, and any other key may repeat only with the same value. Commas and\n`\u003d` inside brackets belong to the value, so `pub(crate)` and `Option\u003cA,\nB\u003e` stay whole.\n\n| Before | After |\n|---|---|\n| `ty-map: A -\u003e B` | `object: A(ty_map \u003d B)` |\n| `skip: T` / `opaque: T` / `custom-new: T` / `no-new: T` | `object:\nT(skip)` / `(opaque)` / `(custom_new)` / `(no_new)` |\n| `upcast: T -\u003e V` | `object: T(upcast \u003d V)` |\n| `field: T.f -\u003e Ty` / `nullable: T.f` / `visibility: T.f -\u003e pub(crate)`\n| `field: T.f(type \u003d Ty, nullable, visibility \u003d pub(crate))` |\n| `enum: T.f -\u003e K(i32) closed { A\u003d0, B\u003d1 }` | `enum: K(repr \u003d i32,\nclosed, A \u003d 0, B \u003d 1)` + `field: T.f(type \u003d K)` |\n| `prefix: p` / `missing-docs: allow` | `file: mod(prefix \u003d p,\nmissing_docs \u003d allow)` |\n| `import-object: a.b.C;True;_C` | `import: a.b.C(type_checking_only,\nalias \u003d _C)` |\n\n`begin`/`end` blocks and `skip-file` are unchanged.\n\nA small parser (`stub/directives.py`) checks each key against a\nper-subject table. The pipeline declares `object(skip, ty_map)` and\n`file(prefix)`. Each generator declares its own keys in\n`Generator.directive_keys` and gets the parsed file through\n`new_imports`. In-tree directives, the `rust_stubgen` example, and the\nstubgen docs are updated to the new form."
    },
    {
      "commit": "b2ec7c93a9bb30bb44df537669090f6312cb838a",
      "tree": "4fa6ad74f1d71bce9f50a92e16235ef49a67e0ca",
      "parents": [
        "c512e6dad15b1ba9f9cd91bbee24e6c7fc9d166e"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 16:27:19 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 16:27:19 2026 -0500"
      },
      "message": "[Rust] Structural errors carry only the visit context; enrich at public boundaries (#967)\n\nRust structural traversal errors now carry only the structured visit\ncontext, the same way C++ `detail::UpdateVisitErrorContext` does. This\nPR removes the Rust-only `[native structural {visit,mutate,map}]\nobject|field ...` text traceback frames for both objects and fields. C++\nappends no such frames, they repeat what the visit context already\nrecords, and custom-base engines reported each ancestor twice.\n\nThe public structural entry points (`structural_visit`,\n`structural_walk`, `structural_mutate`, `structural_map`, and the\ncustom-base `StructuralVisitEngine::visit_root` /\n`StructuralMutateEngine::mutate_root`) now pass the error from a failed\ntraversal to the root type\u0027s `__ffi_enrich_visit_error__` hook, the same\nway C++ `VisitErrorContext::EnrichVisitError` does. The hook is called\nonly on error, only for an object root whose error carries a visit\ncontext, and the lookup uses the root\u0027s exact type. The hook is looked\nup on each error, so one registered later is found. If the hook is\nmissing or fails, the original error is kept.\n\n- Removed `with_structural_error_context`,\n`with_structural_field_error_context`, the visit-side\n`with_field_error_context` / `annotate_visit_error`, and\n`with_mutation_error_context`. Callers now call\n`update_visit_error_context` directly.\n- Added the crate-internal `enrich_visit_error`, called from the shared\n`run_visitor` / `run_mutator` roots.\n- Added `tvm_ffi::extra::visit_error_context::find_access_paths(root,\nerror)`, which returns the access paths from `root` to where a failed\ntraversal stopped (as C++ `VisitErrorContext::FindAccessPaths`), so\ncallers can locate an error when the root type has no hook.\n- Tests that checked the text frames now check the visit context.\n\nRust stubgen:\n\n- Added the `tvm-ffi-stubgen(no-new): \u003ctype_key\u003e` directive. It skips\nthe wrapper\u0027s generated allocator, and for a final type also\n`\u003cLeaf\u003eObj::new`, which only that allocator uses. Downstream projects\nuse it for abstract bases whose field-wise `new` builds a bare base\nobject.\n- Generated docs read natively: the wrapper allocator is documented as\n\"Create a `X` from its field values.\", and the layout notes on\n`\u003cLeaf\u003eObj` (`Complete: ...` / `Opaque: ...`) are plain comments, not\ndocs."
    },
    {
      "commit": "c512e6dad15b1ba9f9cd91bbee24e6c7fc9d166e",
      "tree": "48990988a0a72fe9bda3137cb11438b93cbb8a03",
      "parents": [
        "3598d6f84d8604dcf641ddc235340c19a0f74843"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 12:54:46 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 12:54:46 2026 -0500"
      },
      "message": "[Rust] Move to edition 2024; Module::get_function reports a missing function as ValueError (#966)\n\n- `Module::get_function` and `get_function_with_imports` report a\nmissing name as `ValueError: Module has no function \u0027{name}\u0027`, as\n`Function::get_global` does, instead of a `TypeError` from converting\nthe runtime\u0027s `None` that did not name the function.\n- `RValueRef::into_inner` documents its panic when the object was\nalready taken.\n- Move the Rust crates to edition 2024 (no API change).\n- Rename the `match_any!` runtime helpers after their roles\n(`ValuePattern`, `RefPattern`, `JumpTable`, ...) and document them.\n- `match_any!` expands to a flat `if let` chain instead of nested\n`match` expressions."
    },
    {
      "commit": "3598d6f84d8604dcf641ddc235340c19a0f74843",
      "tree": "293c3db680a024d46f245f89c2b5f830480f0949",
      "parents": [
        "82efff9a04f842c6224a1abfaa40b85a5603245f"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 11:18:33 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 11:18:33 2026 -0500"
      },
      "message": "[Rust] Optional Send/Sync, is::\u003cT\u003e(), type_key(), prelude, weak_count as std (#964)\n\n- `Optional\u003cT\u003e` is `Send`/`Sync` when `T` is, like `Array\u003cT\u003e` and\n`Map\u003cK, V\u003e`.\n- `is::\u003cT\u003e()` on `Any`, `AnyView`, `MutationView` and object references:\nthe strict type test of `downcast_ref`, as std `Any::is`, covering every\n`AnyCompatible` type including scalars.\n- `type_key()` on `Any`, `AnyView` and object references, as C++\n`GetTypeKey`.\n- `ObjectArc::weak_count` matches `Arc::weak_count`: the weak reference\nthe strong references share is not counted.\n- `object::unsafe_::inc_ref` is crate-private like `dec_ref`;\n`ObjectDerivesFrom` and `marker`, named only by macro expansions, are\n`doc(hidden)`.\n- `Display for Error` prints `Kind: message`, as C++ `what()`; `Debug`\nkeeps the traceback, without its leading blank line.\n- `format_err!(kind, fmt, args...)` makes an `Error` with the source\nlocation `bail!` records, without returning; `bail!` returns it.\n- `Error::new(kind, message)`; the backtrace, cause and extra context\nare set with `with_backtrace`, `with_cause` and `with_extra_context`,\ncopy-on-write like `with_appended_backtrace`. They replace\n`new_with_cause_and_extra_context`.\n- `ErrorKind` is `Copy` and `Hash`. Callers use `Error::from_panic`\ndirectly; the hidden `function_internal::panic_to_error` is removed.\n- `String` and `Bytes` replace the blanket `From`/`PartialEq` impls over\n`AsRef\u003cstr\u003e`/`AsRef\u003c[u8]\u003e` with concrete ones, as std `String` and\n`Vec\u003cu8\u003e` have. This lets `String` implement `AsRef\u003cstr\u003e` and\n`Borrow\u003cstr\u003e`, and `Bytes` `AsRef\u003c[u8]\u003e` and `Borrow\u003c[u8]\u003e`. Comparisons\nwork in both directions, and both convert into std `String`/`Vec\u003cu8\u003e`.\n- `Debug` for `String` and `Bytes` prints as `str` and `[u8]` do;\n`Bytes` no longer implements `Display`.\n\n- `NDAllocator` is `Send + Sync`: a tensor frees its data through the\nallocator when the last reference drops, which may be on any thread.\n- `FieldGetter::of::\u003cN\u003e(name)` resolves a reflected field against `N`,\nso reads take `\u0026N` without a per-object subtype check;\n`cached_field_getter!(N, \"f\")` caches one per call site, as\n`cached_global_func!` does. The Rust stub generator emits it for field\naccessors, and its enum conversions use the two-argument `Error::new`.\n- `TypeAttrDef::attr`/`native_fn_attr` are renamed\n`set_attr`/`set_native_fn_attr`, as `EnumDef::set_attr`.\n\n- `#[rs_object(type_key \u003d \"...\", ...)]` names the type key, as\n`#[object(type_key \u003d ...)]` does, and takes `crate \u003d path`; a positional\nkey is a compile error that shows the named form.\n- `into_typed_fn!(f, Fn(..) -\u003e R)` accepts only `Fn` in the trait\nposition; any other name is a compile error.\n- `Function::get_global` reports a missing function as `ValueError`, as\nC++ `Function::GetGlobalRequired`.\n- `AsPackedCallable`, the bound of `Function::from_typed` and\n`register_global_typed`, is re-exported and documented under\n`tvm_ffi::function`, with the accepted parameter types.\n\n\n- `MutationView::with_inplace_mode` is renamed `narrow_inplace_mode`: it\nonly restricts the mode, never upgrading it."
    },
    {
      "commit": "82efff9a04f842c6224a1abfaa40b85a5603245f",
      "tree": "66ff319b38dad784ad33de4c9da126a9f0426494",
      "parents": [
        "c3424d0b318a84468c5556ff72b4466067865a82"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 10:29:29 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 10:29:29 2026 -0500"
      },
      "message": "[Rust] match_any: fewer runtime helpers; check the table key once (#965)\n\nSimplify the `match_any!` runtime helpers and make the lookup table pay\nits key check once.\n\n- An owned scrutinee stays in its probe and is matched through\n`ViewSource`; `OwnedSource` is removed.\n- A typed `MutationView` arm aliases the source instead of moving it\nout, so a rejected guard has nothing to restore.\n`MatchPattern::try_match` returns `Option\u003cSelf\u003e`; `Matched`, `Restore`,\nthe `Recovery` type and `DispatchRecovery` are removed.\n- Value arms key the lookup table by their own type, removing\n`StrictLeaf` and the hidden `MATCH_ANY_STRICT_EXACT` constant (it always\nequaled `MATCH_ANY_EXACT`).\n- The table\u0027s key check (one type-index load per arm) runs once when the\ncall site\u0027s table is built rather than on every match.\n- Remove the unused `UnchangedOr::try_map` and `UnchangedOr::try_cast`."
    },
    {
      "commit": "c3424d0b318a84468c5556ff72b4466067865a82",
      "tree": "ea6a03d2eff594a3452b4cb45525d731adf10332",
      "parents": [
        "e9a4ab04944de2a8dc55d554dd7ceda76a76d8e3"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 09:28:40 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 09:28:40 2026 -0500"
      },
      "message": "[Rust] IntoArg, IntoPackedArg(s), Map key lookup by IntoArg (#963)\n\n- `IntoArg\u003cT\u003e` replaces `IntoObjectRef\u003cT\u003e`: a `T`, a `\u0026T` or a subtype\nwhere a `T` is expected, for every container element rather than object\nreferences only, plus `\u0026str` -\u003e `String` and `\u0026[u8]` -\u003e `Bytes`.\n`into_arg` returns `T` or `\u0026T`; `into_owned` moves or clones as\n`Cow::into_owned`. The stub generator emits `impl IntoArg\u003cT\u003e` /\n`.into_owned()`.\n- The packed-call argument traits (`IntoArgHolder`,\n`IntoArgHolderTuple`, `ArgIntoRef`, `PackedArg`, `TupleAsPackedArgs`)\ncollapse into `function::PackedCallArg` and `function::PackedCallArgs`.\n`call_tuple` and `into_typed_fn!` share one path, so `call_tuple` also\ntakes `\u0026str` and `\u0026[u8]`; `call_tuple_with_len` is removed.\n- `Map::get` and `Map::contains_key` take `impl IntoArg\u003cK\u003e`: `get(\u0026k)`,\n`get(k)`, `get(\u0026sub)` and `get(\"key\")` all work.\n- `type_traits.rs` orders its traits by dependency, each followed by its\nimpls, and the trait docs are tightened."
    },
    {
      "commit": "e9a4ab04944de2a8dc55d554dd7ceda76a76d8e3",
      "tree": "94c766b12dd7fa41a8f9b83785e2cb04116370ad",
      "parents": [
        "f052069318165cb60f3fc7dd0d3252db9eddffee"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 08 09:07:15 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 08 09:07:15 2026 -0500"
      },
      "message": "[Rust] Group Object derive attributes under #[object(...)]; std-shaped Array/List accessors (#962)\n\nThis PR makes two Rust API consistency changes.\n\n**`#[derive(Object)]` options grouped under `#[object(...)]`.** The ten\nflat `#[type_*]` helper attributes become one attribute, parsed like\n`#[object_ref(...)]`:\n\n```rust\n#[object(type_key \u003d \"my_ext.Point\", register, final, immutable, child_slots \u003d 4)]\n#[object(type_key \u003d \"ffi.String\", unsafe type_index \u003d TypeIndex::kTVMFFIStr)]\n```\n\n- `type_key` and `type_index` keep their names. The other options drop\nthe `type_` prefix: `final`, `immutable`, `register`, `rs_parent`,\n`child_slots`, `child_slots_can_overflow`, `s_eq_hash_kind`,\n`reflection`.\n- `unsafe` is allowed only before `type_index`. An unknown option is an\nerror that lists the valid ones.\n- The flat attributes are removed. `#[rs_object]`, the Rust stub\ngenerator, the in-tree users and the `derive::Object` docs now use the\nnew form.\n\n**`Array` and `List` accessors follow std shapes.** A method that can\ngenuinely fail returns `Result`: a type mismatch, an FFI call or growth.\nOut-of-range is then an `IndexError` inside it. A method that can fail\nonly on its bounds follows std instead.\n\n- `Array::get` returns `Option\u003cT\u003e`, since elements are checked when the\narray is built.\n- `Array::set`, `Array::insert` and `List::set` return `()` and panic on\nan out-of-range index, as `Vec` does.\n- `List::remove_range` takes `impl RangeBounds\u003cusize\u003e`, returns `()` and\npanics on an out-of-range or inverted range, as `Vec::drain` does."
    },
    {
      "commit": "f052069318165cb60f3fc7dd0d3252db9eddffee",
      "tree": "47cc67d66669944e5f03f5bda1f3c01a5ebf3b8c",
      "parents": [
        "c244bc5fcbaac54bbc6f0563fccf302cb570388a"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Nov 07 16:54:52 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 07 16:54:52 2026 -0500"
      },
      "message": "[Rust] Stubgen: cache each accessor\u0027s FieldGetter (#961)\n\nA generated Rust field accessor resolved its field on every call: a\nregistry check plus a scan of the type\u0027s field names. The stub generator\nnow keeps each accessor\u0027s `FieldGetter` in a fn-local\n`ColdInitLazyLock`, so the lookup runs once and later calls go straight\nto the C ABI getter:\n\n```rust\npub fn dom(\u0026self) -\u003e Result\u003cOption\u003cRange\u003e\u003e {\n    static GETTER: ColdInitLazyLock\u003cResult\u003cFieldGetter\u003e\u003e \u003d\n        ColdInitLazyLock::new(|| FieldGetter::new(IterVarObj::type_index(), \"dom\"));\n    GETTER.clone()?.get(self)\n}\n```\n\n- Applies to every accessor form (typed, `enum` directive, `Any`).\n- A fn-local static cannot name `Self`, so the generator spells the\nowning object type.\n- The emitted text wraps the way rustfmt does, so formatted crates stay\nbyte-identical to the generator output.\n- The stubgen expectations that pin accessor text are updated."
    },
    {
      "commit": "c244bc5fcbaac54bbc6f0563fccf302cb570388a",
      "tree": "d1a27474049916f5dda5032fa1994ee618f3850e",
      "parents": [
        "3718ae5bfae64fd38e1258f8c7305bde827a7e43"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Nov 07 15:28:42 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 07 15:28:42 2026 -0500"
      },
      "message": "[Rust] Final-audit fixes: allocation overflow, immutable subtypes, dtype naming, API follow-ups (#960)\n\nFollow-up fixes to the Rust bindings after #959.\n\nSoundness:\n- `List::reserve` and list growth reject a capacity whose byte size\nexceeds `isize::MAX` with a `ValueError` (the check sits in the cold\ngrow path).\n- Trailing-item layouts (`Array`, `Shape`, `Tensor`) are built with\n`Layout::array`/`Layout::extend` and panic with \"capacity overflow\", as\n`Vec` does; `ObjectArc::new_with_extra_items` leaks rather than drops\nthe object on that panic.\n- The object derive rejects at compile time a subtype of an\n`ImmutableObject` type that is not itself immutable, and an immutable\ntype that inherits a `#[reflect(writable)]` field. The Rust stub\ngenerator marks a subtype with no registered mutability immutable when\nits parent binding is.\n- `Tensor::from_nd_alloc` and `Tensor::from_env_alloc` panic when the\nshape length does not fit the `i32` ndim, instead of truncating it and\noverflowing the trailing shape buffer.\n- `Tensor::from_nd_alloc` computes row-major strides with wrapping\nproducts, as C++ does, so a zero-element tensor with large extents no\nlonger panics in debug builds while the object is half built.\n\nCorrectness:\n- The `Module` binding is no longer `final` (`ffi.Module` has subtypes).\n- `DLDataTypeExt::to_string` falls back to `dtype(code\u003d.., bits\u003d..,\nlanes\u003d..)` for a type the runtime cannot name, so\n`Tensor::data_as_slice` returns its `TypeError` instead of panicking.\n- Generated `type_index_available` calls `::core::mem::drop`.\n\nAPI:\n- `DefRegionKind`, `InplaceMode`, `StructuralVisitorView` and\n`StructuralMutatorView` are re-exported at the crate root (module paths\nstay).\n- `Debug` for `Any` and `AnyView`: the type key and the repr, such as\n`Any(int: 1)`.\n\nDocs: `structural_mutate`/`structural_map` state that a panicking\ncallback aborts; the crate-level FFI contracts list the structural hook\ncontract; `rs_object` states that structural equality and hashing see\nthe fields only under an `s_eq_hash_kind`.\n\nSource-breaking:\n- A binding or `rs_object` type whose parent is immutable must be marked\n`#[type_immutable]` / `immutable`, for example an enum type under\n`ffi.Enum`, or a Rust-defined type under an immutable IR node."
    },
    {
      "commit": "3718ae5bfae64fd38e1258f8c7305bde827a7e43",
      "tree": "a62e67828636f11d6a2366356b27ab3ce6d06052",
      "parents": [
        "c1a64424ae4f7f66f2879e4f23e0563416b58f9e"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Nov 07 13:51:47 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 07 13:51:47 2026 -0500"
      },
      "message": "[Rust] Follow-up: downstream unblockers, registration fixes and API lock (#959)\n\nFollow-up to #958: unblocks downstream bindings, fixes registration and\nconversion gaps, locks the Rust API before release (the crate root keeps\nthe user-facing API, generated and hand-written bindings stop needing\n`unsafe` for checkable facts), and closes soundness gaps from the latest\naudits.\n\nFixes and conversions:\n\n- `NativeFunction::into_any` is public and `unsafe`, so that registries\nother than type and enum attributes, such as operator attribute tables,\ncan store native hooks. The caller vouches for the slot\u0027s readers, as\n`TypeAttrDef::native_fn_attr` requires.\n- The Rust stub generator emits builtin-ancestor stand-ins (such as\n`FfiStructuralVisitorObj`) as `#[doc(hidden)] pub struct`s, so a public\ngenerated object can derive from one.\n- `packed_args` takes a cold branch on a non-positive argument count\ninstead of a select, which made the argument loads of typed calls wait\non `num_args`.\n- A `#[type_register]` type whose parent is a binding not loaded yet\nstays lazy at load instead of forcing the parent\u0027s `type_index()`, which\npanicked and poisoned the type. It registers on its first `type_index()`\nafter the parent\u0027s library loads; the lookup leaves no raised error\nbehind.\n- Reflection registration fails on a type whose metadata lacks\n`__ffi_type_final__` (left by an earlier failed registration, or by\nanother language that does not publish it), instead of treating every\nstep as done. Python `py_class` now publishes `__ffi_type_final__`, as\nC++ `ObjectDef` does.\n- `run_static_init_blocks` keeps its library loaded, as the load-time\nconstructor does.\n- Conversions follow C++: a device string such as `\"cuda:1\"` converts\ninto `DLDevice`, and an `Array` or `List` of integers converts into\n`Shape`.\n- `reflection::get_method` reports an unknown type key as a `TypeError`,\nas `get_method_by_index` does for an unknown index.\n- py_class `__ffi_shallow_copy__` dispatches on the field storage kind.\nA C++ parent field stored as a compact `Optional\u003cObjectRef\u003e` reports\nstatic type index Any but is 8 bytes wide; copying it as a 16-byte Any\nread past the field and took a reference on garbage.\n- Docs: Rust guide examples that did not compile, a non-existent\n`StructuralVisitor::new`, the `*_with_imports` wording, the upcast\nexample, `init_off` and constructor wording, the testing library behind\n`testing.*` types and the published version pin; the registration\nconstraints of `#[type_reflection]` functions (no attribute registration\nor `TypeAttrColumn::ensure`); `derive(Object)` documented on its\n`tvm_ffi::derive` re-export, including lazy registration under a late\nbinding parent and its threading rule; static init block identities and\n`panic \u003d \"abort\"`; the `AnyCompatible::is_undefined` safety contract;\n`compile_fail` examples name their error codes; the README example path\nand the `tvm-ffi-macros` reference entry.\n\nAPI and soundness:\n\n- `impl_object_ref_upcast!(A \u003d\u003e B)` checks at compile time that `A`\u0027s\nobject derives from `B`\u0027s and that `B` accepts every object of its type;\n`impl_object_ref_upcast!(unsafe A \u003d\u003e B)` stays for refined targets.\n- `#[rs_object(..., immutable)]` and `#[type_immutable]` on\n`derive(Object)` implement `ImmutableObject` and reject\n`#[reflect(writable)]` fields.\n- `#[type_rs_parent]` on `derive(Object)` implements `ShallowCopy` and\n`UnsafeInit`, which an `rs_object` needs of its parent\u0027s object.\n- `rs_object` is documented as the way to define a type;\n`derive(Object)` binds a type another library registers.\n- `tvm_ffi::String` displays its text; `Error` displays `Kind: message`\nwhen it has no backtrace.\n- The crate root keeps the user-facing API and adds `ObjectRef`;\nadvanced items are public in their modules only, one path each.\n- `DowncastRefFromAny` is documented as a public bound.\n- `List::first`, `last` and `pop` return `Ok(None)` for an empty list;\niterators are `list::Iter` and `map::{Iter, Keys, Values}`.\n- `DLDeviceType`, `DLDataTypeCode`, `TVMFFITypeIndex`, `AccessKind` and\n`SEqHashKind` are `#[non_exhaustive]`.\n- `DLTensorExt::numel` is `unsafe`; `Tensor::numel` and\n`TensorView::numel` stay safe.\n- Extra items (String, Bytes, Shape, Tensor, Array, BigInt) are reached\nthrough a pointer to the whole allocation;\n`ObjectArc::new_with_extra_items` is `unsafe`.\n- `List::remove` restores the list before the removed element drops; the\ncontracts for hooks and callbacks that could modify a list or dict being\nread are stated.\n- A structural mutate or map handler that returns an `Error` as its\nvalue fails with a `TypeError`.\n- `EnumDef::new` requires a plain reference; `TVMFFIFunctionCell` no\nlonger claims `Send` and `Sync`.\n- tvm-ffi-stubgen emits the checked upcast, `#[type_immutable]` (only\nwithout writable fields along the chain) and `#[type_rs_parent]`; it\nmirrors a field only when its reflected size and alignment match the\nmirror, keeps STL fields and integers narrower than 64 bits opaque\nunless a directive types them, and requires a 0 member in a `closed`\nenum.\n\nSource-breaking changes:\n\n- `DLTensorExt::item_size` is removed; it disagreed with the packed data\nsize of sub-byte dtypes.\n- `NativeFunction::into_any` is now public and `unsafe`.\n- Generated Rust bindings change: builtin-ancestor stand-ins are\n`#[doc(hidden)] pub struct`s instead of private structs.\n- Paths: `StructuralMutateEngine`, `StructuralMutatorBase`,\n`StructuralMutatorObj`, `StructuralMutatorView`, `InplaceMode` -\u003e\n`tvm_ffi::extra::structural_mutate`; `StructuralVisitEngine`,\n`StructuralVisitorBase`, `StructuralVisitorObj`,\n`StructuralVisitorView`, `VisitInterruptObj`, `DefRegionKind` -\u003e\n`tvm_ffi::extra::structural_visit`; `TVMFFIAny`, `TVMFFIObject`,\n`TVMFFIStreamHandle` -\u003e `tvm_ffi::tvm_ffi_sys`;\n`ObjectCoreWithExtraItems`, `ObjectIdentity`, `ImmutableObject`,\n`ObjectRefAnyCompatible` -\u003e `tvm_ffi::object`; `CPUNDAlloc`,\n`NDAllocator` -\u003e `tvm_ffi::collections::tensor`; `OptionalCompatible` -\u003e\n`tvm_ffi::optional`; `RValueRef` -\u003e `tvm_ffi::rvalue_ref`; `EnumObj` -\u003e\n`tvm_ffi::enum_ref`; `TypeSubsumes` -\u003e `tvm_ffi::type_traits`;\n`current_stream`, `with_stream` -\u003e `tvm_ffi::device`.\n`structural_mutate`/`structural_visit` no longer re-export\n`structural_map`, `structural_walk`, `Unchanged` and `UnchangedOr`.\n- `List::first`/`last`/`pop` return `Result\u003cOption\u003cT\u003e\u003e`; `ListIterator`\n-\u003e `list::Iter`; `MapItems`/`MapKeys`/`MapValues` -\u003e\n`map::Iter`/`Keys`/`Values`.\n- `DLTensorExt::numel` and `ObjectArc::new_with_extra_items` are\n`unsafe`; `ObjectCoreWithExtraItems::extra_items_mut` is replaced by\n`extra_items_ptr`, and `extra_items` takes a raw pointer.\n- Matches on the `#[non_exhaustive]` enums outside the crate need a\nwildcard arm.\n- `reflection::drop_if_defined` is private; regenerate stubs, which use\n`#[type_rs_parent]`.\n- `tvm_ffi::String`\u0027s `Display` no longer quotes the text."
    },
    {
      "commit": "c1a64424ae4f7f66f2879e4f23e0563416b58f9e",
      "tree": "6790ad1ee5c1525abaffe22238efd48e86ab71bb",
      "parents": [
        "ee81cc80f609c4fc83c5b69cd0120e462d987706"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Nov 07 10:48:14 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 07 10:48:14 2026 -0500"
      },
      "message": "[Rust] Soundness fixes and API cleanup (#958)\n\nCloses soundness holes in the Rust bindings, where safe code could reach\nundefined behavior or abort the process, and cleans up the public API.\n\nRegistry and object macros:\n\n- **Native hooks are stored only through `unsafe`.** Native callers of a\ntype or enum attribute call an opaque pointer they find there as a\nfunction of the column\u0027s signature, unchecked. `TypeAttrDef::attr` and\n`EnumDef::set_attr` now refuse an opaque pointer with a `TypeError`, and\nthe new `unsafe fn TypeAttrDef::native_fn_attr` / `unsafe fn\nEnumDef::set_native_fn_attr` (named as C++ `native_fn_attr` /\n`set_native_fn_attr`) store a `NativeFunction`, the caller vouching for\nevery reader\u0027s signature.\n- **`#[object_ref(parent \u003d X)]` is checked at compile time.**\n`ObjectCore` gains `type Parent` (the `base_` field\u0027s type, recorded by\n`#[derive(Object)]`), and `ObjectDerivesFrom\u003cA, Depth\u003e` holds when an\nobject type is `A` or reaches it through its chain of parents, at an\ninferred depth (`object::marker::Itself`,\n`object::marker::Parent\u003c...\u003e`). A wrong parent no longer compiles; the\nobject\u0027s own type and any ancestor are accepted. A missing `ObjectCore`\nnow reports \"`T` is not an object type\". Since the check covers the\nobject type only, a parent reference that promises more, a generic one\n(`Array\u003cT\u003e`, `Map\u003cK, V\u003e`) or one with a custom `ObjectRefAnyCompatible`,\nis written `#[object_ref(unsafe parent \u003d X)]`; plain `parent \u003d X`\naccepts only references the derive marks as plain (non-generic, default\nchecks).\n- **A static type index is declared with `unsafe`:**\n`#[type_index(unsafe TypeIndex::kTVMFFIArray)]`, the caller vouching\nthat the runtime gives that index to the type.\n- **`#[derive(Object)]` requires `#[repr(C)]`** and asserts the parent\nfield sits at offset zero, since upcasts read an object through a\npointer to its parent. `#[rs_object]` adds it, and the tensor that owns\nan `NDAllocator` declares it.\n- **A registered type key is checked against its Rust type:** a\n`#[type_register]` type that takes an existing key\u0027s index, and a\nbinding of a key another library registered, panic on first\n`type_index()` unless the entry has the same parent and depth and, when\nthe type table records an object size, the same size (for a binding, no\nlarger, since an opaque binding declares only its parent).\n- **Rust-defined types register when their library loads.**\n`#[derive(Object)]` with `#[type_register]` (and so `#[rs_object]`) adds\na `static_init_block!` that calls the type\u0027s `type_index()`, so the type\nand its reflection are in the type table at load, as a C++ type\nregistered through `refl::ObjectDef` in a static init block is. Bindings\nof keys another library registers stay lazy; `type_index()` is\nunchanged.\n- **The load-time registration block of a type carries its type key**,\nso two libraries built from the same crate name, version and source\nlayout with different keys each register their type instead of the\nsecond skipping its block as already run.\n- **Every type-table write from Rust takes the registration lock**,\nincluding `TypeAttrDef` and `EnumDef`. Readers stay unlocked, as in C++;\nthe docs of `TypeAttrDef`, `EnumDef` and `#[derive(Object)]` state that\nregistration happens during static initialization.\n- **Values every thread reads are `Send + Sync`.** `TypeAttrDef::attr`\nand `EnumDef::set_attr` take `impl Into\u003cAny\u003e + Send + Sync`, and\n`Error::new_with_cause_and_extra_context` takes its context as\n`Option\u003c\u0026T\u003e` with `T: ObjectRefCore + Send + Sync`, so a `List` stored\nthere can no longer be mutated from two threads.\n- **`get_method_by_index` and `FieldGetter::new` return a `TypeError`**\nfor an unregistered index instead of passing it to `TVMFFIGetTypeInfo`,\nwhich aborts.\n- **A static `__ffi_init__` is also the type\u0027s `__ffi_init__`\nattribute.** `ObjectDef::def_static(\"__ffi_init__\", ...)` stores it in\nthe `__ffi_init__` type-attribute column too, as the generated\nconstructor and C++ `ObjectDef::def(init)` do, so other languages\nconstruct the type through it.\n- **Macro-generated code names std items by full path**\n(`::core::result::Result::Ok`, `::core::panic!`,\n`$crate::type_traits::AnyCompatible`, ...), so the derives,\n`#[rs_object]`, `static_init_block!` and the exported macros compile in\na crate that defines its own `Result` or otherwise shadows a prelude\nname.\n\nCore:\n\n- `Tensor::data_as_slice` and `data_as_slice_mut` start `byte_offset`\nbytes into the data and return a `RuntimeError` when that address is not\naligned for `T`.\n- A typed function called with the wrong number of arguments raises a\n`TypeError`, as C++ does, instead of a `ValueError`.\n- Registering a reflected `Option` field of a non-object value\n(`Option\u003ci64\u003e`, `Option\u003cbool\u003e`, `Option\u003cString\u003e`, ...) fails with a\n`TypeError` pointing to `tvm_ffi::Optional\u003cT\u003e`: such an `Option` is\nneither the nullable object pointer nor the `TVMFFIAny` cell readers\ntake an `Optional` field as.\n- `Optional\u003cT\u003e` is `AnyCompatible`, converting as `Option\u003cT\u003e` does, and\ncan be a reflected field, laid out as C++ `ffi::Optional\u003cT\u003e`.\n- `TVMFFIObject` is `#[repr(C, align(8))]` without the duplicate 32-bit\n`__padding`, matching the C header (24 bytes, 8-byte aligned) on every\ntarget. `TVMFFITraceback` is declared by its exported name\n`TVMFFIBacktrace`, and `TVMFFITestingDummyTarget` only under the\n`testing` feature of `tvm-ffi-sys`.\n- Dispatch closure handlers and `MutationView::downcast` match only\nvalues that fit their type, as `match_any!` and `#[dispatch]` do: an\n`i8` handler no longer catches 300.\n- Tensor data is sized as C++ `GetDataSize` does, packing sub-byte types\n(int4, fp4) instead of rounding each element up to a byte.\n- `EnumDef::new` returns a `ValueError` for an empty name.\n- `Map::get` makes one runtime call (`ffi.MapGetItemOrMissing`) instead\nof two.\n- Docs: a crate-level list of the FFI contracts Rust cannot check (UTF-8\n`ffi.String`, static-init registration, one type per key, `TensorView`\narguments and an `Any` holding their `DLTensor*` valid only during the\ncall); `Any` from an `AnyView` keeps a `DLTensor*` borrowed, as in C++;\nre-registered keys are checked by parent, depth and size, not fields;\n`writable` fields can be replaced through reflection while shared; the\n`RValueRef` panic of `From\u003cAnyView\u003e for Any`; a structural mutate/visit\nhook uses the mutator or visitor only through its arguments, during the\ncall; every `ImmutableObject` subclass is immutable while shared;\n`Error::backtrace` may be rewritten when the error is re-raised through\nanother language; `Error::extra_context` must be safe to share;\n`NDAllocator::free_data` may see a null `data` after a panicking\n`alloc_data`; a binding that declares only part of its object must not\nbe constructed.\n\nAPI:\n\n- Doc-hidden: `Function::call_tuple_with_len`,\n`Any`/`AnyView::debug_strong_count`, `extra::dispatch::marker`,\n`BigInt::words`/`from_words`.\n- Removed: `ObjectArc::is_null` (crate-private; use\n`AnyCompatible::is_undefined`), the root re-export of\n`AsPackedCallable`, the `object::TypeIndex` re-export\n(`tvm_ffi::TypeIndex` stays).\n- `TypeAttrColumn::new(name)` is `TypeAttrColumn::lookup(name)`.\n- `TypeAttrColumn::ensure(name)` creates the column if no type\nregistered it yet, as C++ `EnsureTypeAttrColumn`; call it during static\ninitialization, like any registration.\n- `ObjectArc::is_unique` is public: whether the handle is the only\nreference, strong and with no weak one, so the object may be mutated in\nplace.\n- `Any::into_raw_ffi_any` and `Error::with_appended_backtrace` take\n`self`; `Error::set_raised`/`from_raised` stay associated functions, now\ndocumented why.\n- `Tensor::data_ptr` returns `*mut c_void`, as `TensorView::data_ptr`\nand C++ do; `Tensor::data_ptr_mut` is removed.\n- `Any::is_none` and `AnyView::is_none`.\n- `Array::pop` returns `Option\u003cT\u003e`, as `Vec::pop`.\n- `ErrorKind::as_str` returns the `\u0026\u0027a str` it holds.\n\nSource-breaking changes:\n\n- `impl From\u003cNativeFunction\u003cArgs, R\u003e\u003e for Any` is removed;\n`TypeAttrDef::attr(name, hook)` becomes `unsafe {\nTypeAttrDef::native_fn_attr(name, hook) }`, and `attr`/`set_attr` reject\nopaque pointers.\n- `ObjectCore` has a new required associated type `Parent`; hand-written\nimpls add `type Parent \u003d ParentObj;`. A public object type\u0027s parent must\nbe at least as visible as the type.\n- `#[derive(Object)]` rejects a struct without `#[repr(C)]`.\n- `#[object_ref(parent \u003d X)]` with a generic or refined `X` (`Array\u003cT\u003e`,\na custom `ObjectRefAnyCompatible`) becomes `#[object_ref(unsafe parent \u003d\nX)]`.\n- `#[type_index(TypeIndex::...)]` becomes `#[type_index(unsafe\nTypeIndex::...)]`.\n- `TypeAttrDef::attr`, `EnumDef::set_attr` and\n`Error::new_with_cause_and_extra_context` require `Send + Sync` values;\nan `ObjectRef` or `List` there no longer compiles.\n- `tvm_ffi_sys::TVMFFITraceback` -\u003e `TVMFFIBacktrace`;\n`TVMFFITestingDummyTarget` requires the `testing` feature.\n- `unsafe_impl_object_ref_upcast!` and\n`unsafe_impl_object_ref_downcast_ref!` become `impl_object_ref_upcast!`\nand `impl_object_ref_downcast_ref!`, with a required leading `unsafe`:\n`impl_object_ref_upcast!(unsafe Add \u003d\u003e Expr)`. Stubgen emits the new\nspelling.\n- `Optional\u003cOption\u003cT\u003e\u003e` is removed: it stored `Some(None)` as `None`.\n- A reflected `Option\u003cT\u003e` field of a non-object `T` now fails\nregistration; use `Optional\u003cT\u003e`.\n- `TypeAttrColumn::new` -\u003e `TypeAttrColumn::lookup`.\n- A wrong argument count to a typed function is a `TypeError` (was\n`ValueError`).\n- `Tensor::data_ptr_mut` -\u003e `Tensor::data_ptr` (now `*mut`).\n- `Array::pop` returns `Option\u003cT\u003e` instead of `Result\u003cT\u003e`.\n- `tvm_ffi::AsPackedCallable`, `tvm_ffi::object::TypeIndex` and\n`ObjectArc::is_null` are no longer public paths.\n- `Any::into_raw_ffi_any(x)` and `Error::with_appended_backtrace(e, bt)`\nstill compile; the method forms `x.into_raw_ffi_any()` and\n`e.with_appended_backtrace(bt)` are now available."
    },
    {
      "commit": "ee81cc80f609c4fc83c5b69cd0120e462d987706",
      "tree": "3d739fb085e018fa896c0cf9fcc5396d6c1899cc",
      "parents": [
        "ab87e91655f172b16d888f84b2c16c40fddbab7d"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Sat Nov 07 08:05:06 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 07 08:05:06 2026 -0500"
      },
      "message": "[Rust] Generated constructors take object references as `impl IntoObjectRef\u003cT\u003e` (#956)\n\n## Summary\n\nThis PR makes the constructors that `tvm-ffi-stubgen` generates take an\nobject reference as\n`impl IntoObjectRef\u003cT\u003e` instead of `impl Into\u003cT\u003e`. This covers the\nwrapper\u0027s `new`, and\n`from_fields` under `custom-new`. Values keep `impl Into\u003cT\u003e`, and\nscalars stay their own type,\nso the rule depends only on the type and is the same for generated and\nhand-written APIs:\n\n- An object reference is `impl IntoObjectRef\u003cT\u003e`.\n- A value is `impl Into\u003cT\u003e`.\n- A scalar is itself.\n\n```rust\n// Before\npub fn new(span: impl Into\u003cOption\u003cSpan\u003e\u003e, ty: impl Into\u003cPrimType\u003e,\n           a: impl Into\u003cPrimExpr\u003e, b: impl Into\u003cPrimExpr\u003e) -\u003e Self\n\n// After\npub fn new(span: impl Into\u003cOption\u003cSpan\u003e\u003e, ty: impl IntoObjectRef\u003cPrimType\u003e,\n           a: impl IntoObjectRef\u003cPrimExpr\u003e, b: impl IntoObjectRef\u003cPrimExpr\u003e) -\u003e Self\n```\n\n`IntoObjectRef\u003cT\u003e` is the conversion that knows about borrowing. `\u0026x` is\na borrow that does not\nchange a reference count. `into_owned_object_ref()` moves an owned value\nand clones only a\nborrowed one. A stored argument therefore costs what it cost with\n`Into`. Before this change,\na type with a generated `from_fields` and a hand-written `new` used two\ntraits for the same\narguments."
    },
    {
      "commit": "ab87e91655f172b16d888f84b2c16c40fddbab7d",
      "tree": "c1abf49ca3801330bae077f7a2def2a370ab4440",
      "parents": [
        "f3096d8db5341b1af3786e360ef07d06f8631966"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Nov 07 08:04:37 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 07 08:04:37 2026 -0500"
      },
      "message": "[Rust] Data and ABI soundness fixes: open DLDeviceType, checked tensor sizes, unsafe AsDLDataType (#957)\n\nThis PR fixes data and ABI soundness issues in the Rust bindings, where\nsafe code could create invalid values or read out of bounds.\n\n- **`DLDevice::device_type` is an `i32`.** Device type codes are an open\nset, so a code read from a foreign `DLDevice` may not be a\n`DLDeviceType` variant. The field is now an `i32`, as `DLDataType::code`\nis a `u8`, and `DLDeviceType` stays the enum of known codes.\n- **Checked tensor sizes.** The element count and byte size of a tensor\nwrapped on overflow, and a negative extent became a huge count, so\n`Tensor::from_nd_alloc(CPUNDAlloc, \u0026[(1 \u003c\u003c 61) + 1], f64, cpu)`\nallocated 8 bytes behind a 2^61-element slice. Both now use checked\narithmetic: `from_nd_alloc` panics on such a shape before allocating, as\n`Vec::with_capacity` does on capacity overflow, and `Tensor::from_slice`\nreturns a `ValueError`.\n- **`AsDLDataType` is an `unsafe trait`.** `Tensor::data_as_slice::\u003cT\u003e`\nreads data of dtype `T::DL_DATA_TYPE` as `T`, so a safe implementation\nnaming the dtype of an unrelated type let safe code read arbitrary bits\nas `T`. The trait now states the layout contract that `data_as_slice`\nrelies on.\n- **`TVMFFIByteArray::as_str` is `unsafe`.** It views a raw pointer and\nlength as text. Converting a raw C string argument that is not UTF-8 to\na `String` now fails as a type mismatch instead of panicking.\n`String::as_str` stays unchecked, since an `ffi.String` holds UTF-8 text\nby the ABI.\n- **Null pointers with zero length.** C passes an empty array as a null\npointer with length zero, which a slice cannot hold. A crate-internal\n`util::slice_from_nullable_raw_parts` allows that case and replaces the\nhand-written checks for packed call arguments, tensor shapes and data,\n`Shape`, `List` cells, `Bytes` from a byte array, and type field tables.\n- **`Map` accepts an `ffi.Dict`.** As C++ `Map\u003cK, V\u003e` does, converting\nan `ffi.Dict` to a `Map` copies its entries into a new map, converting\neach to `K` and `V`.\n\nSource-breaking changes:\n\n- `DLDevice::device_type` is an `i32`: compare it with\n`DLDeviceType::kDLCPU as i32`, and drop `as i32` where it is passed on\nas a code.\n- Implementations of `AsDLDataType` need `unsafe impl`.\n- Calls to `TVMFFIByteArray::as_str` need an `unsafe` block."
    },
    {
      "commit": "f3096d8db5341b1af3786e360ef07d06f8631966",
      "tree": "d2e4c3686ee46566596f14a55723de62d42581e4",
      "parents": [
        "fc6835de6da9876841448337f55a5abc4e791888"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 22:31:39 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 22:31:39 2026 -0500"
      },
      "message": "[Rust] Display honors width and alignment (#955)\n\n`Display` for `Any`, `AnyView`, containers and derived object refs now\nwrites through `Formatter::pad`, so width, fill, alignment and precision\napply as they do for `str` (for example `format!(\"{:\u003e10}\", any)`).\nPreviously the printed text was written directly and those format\noptions were ignored."
    },
    {
      "commit": "fc6835de6da9876841448337f55a5abc4e791888",
      "tree": "3ad2044278ef22836f2df9fdaa3929e404b50055",
      "parents": [
        "d711f44f0be3e21f6e3858a2af25c155ead3ff55"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 22:23:28 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 22:23:28 2026 -0500"
      },
      "message": "[Rust] NativeFunction typed hooks, Display through the runtime printer, reflection::type_key, EnumDef size check (#954)\n\nRegistries hold typed hooks (operator validators, type inference, type\nattributes) as either an opaque pointer to a native C ABI function or a\npacked `Function` registered in its place.\n`tvm_ffi::reflection::NativeFunction\u003cArgs, R\u003e` is such a hook.\n\n- Reading: `unsafe fn from_any(Any)`. A native function carries its\nsignature only by declaration, so the caller vouches that it takes\n`Args` and returns `R`, as its registering code declares. A value that\nis neither an opaque pointer nor a `Function` is a `TypeError`.\n- Calling is safe: `call` takes a tuple of borrowed objects, managed\nreferences or `Any` values and returns `Result\u003cR\u003e`; a native function is\ncalled directly with the argument addresses and a packed one through\n`call_packed`, and an error returned by either becomes `Err`.\n- Building: `From\u003cF\u003e` for a function item or a closure that captures\nnothing, `Fn(A0, ...) -\u003e Result\u003cR\u003e`, generates the C ABI adapter\n(zero-sized and `Copy`, checked at compile time). As with C++ `noexcept`\nhooks, failure is reported through the `Result`; a panic aborts rather\nthan unwind into C++.\n- Storing: `Any::from(hook)` gives the opaque pointer (or the\n`Function`) for a registry slot such as `TypeAttrDef::attr`; store it\nonly in a slot whose callers use exactly this signature.\n\n`Any`, `AnyView`, `Array`, `List`, `Map` and every\n`#[derive(ObjectRef)]` type now implement `Display` as their runtime\n`repr` (`ffi.ReprPrint`), so values format with `{}`. `Debug` is\nunchanged. This is a source-breaking change: a downstream\n`#[derive(ObjectRef)]` type that already implements `Display` must add\n`#[object_ref(skip_display)]` to keep its own implementation, as `Error`\ndoes.\n\n`reflection::type_key(type_index)` returns the registered type key of an\nindex, or `None` when no type has it.\n\n`reflection::field_default::\u003cT\u003e(name)` returns the default value `T`\nregisters for its own field `name`, or `None` when the field is missing,\nhas no default, or its default comes from a factory.\n\n`EnumDef::new` allocates each value as an `EnumObj`; it now also checks\nthe registered object size of the enum type, so an opaque Rust mirror of\na type whose objects have fields beyond `EnumObj` is a `TypeError`\ninstead of an undersized allocation."
    },
    {
      "commit": "d711f44f0be3e21f6e3858a2af25c155ead3ff55",
      "tree": "74f86ccb25a5f2ccba63a010e3ae2067dedae6b5",
      "parents": [
        "ecf09bdbd72ee4f8bc2bfea77c49e8e5544973ff"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 21:44:43 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 21:44:43 2026 -0500"
      },
      "message": "[Rust] EnumRef for FFI enums (#953)\n\nGeneric support for FFI enums in the Rust crate, plus the registration\nbuilders it needs.\n\n- `reflection` is split into files like the C++ headers (`access_path`,\n`accessor`, `registry`, `enum_def`); public paths are unchanged.\n- `#[derive(Object)]` registers through one hidden entry point,\n`reflection::register_object`, so `ObjectDef::finish` and the other\nregistration steps are private.\n- `EnumObj` (the `ffi.Enum` object) and the `EnumRef` trait: `get(name)`\nlooks a value up in the enum type\u0027s `__ffi_enum__` registry, `name()`\nborrows its name, and `attr_map::\u003cV\u003e(name)` returns an `EnumAttrMap` to\nread an attribute. Values are singletons, compared with `same_as`; the\ninteger index stays private.\n- `reflection::EnumDef\u003cE\u003e` registers a value eagerly (`new(name)`), sets\nits attributes (`set_attr`) and returns it (`value()`), for enum types\nwithout fields beyond `EnumObj`, as C++ `EnumDef` does. It updates the\nshared registry through the existing `ffi.Dict*` globals.\n- `reflection::TypeAttrDef\u003cT\u003e` registers type attributes, as C++\n`TypeAttrDef` does.\n- Stubgen: a type under `ffi.Enum` embeds `tvm_ffi::EnumObj` (complete,\nno allocator) and implements `tvm_ffi::EnumRef`;\n`ffi.IntEnum`/`ffi.StrEnum` stand-ins now sit on `EnumObj`.\n- Reflection items (`FieldFlags`, `FieldGetter`, `ObjectDef`,\n`SEqHashKind`, `ShallowCopy`, `TypeAttrColumn`, `UnsafeInit`) are no\nlonger re-exported at the crate root; use `tvm_ffi::reflection::`."
    },
    {
      "commit": "ecf09bdbd72ee4f8bc2bfea77c49e8e5544973ff",
      "tree": "65c1b47dd2910df063cece66a8832191e94885d5",
      "parents": [
        "7bedac88ac4f2737d089244bae4d7be9d3599140"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Fri Nov 06 21:37:41 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 21:37:41 2026 -0500"
      },
      "message": "[Rust] Array/Map conversions from references, literals and subtype containers (#952)\n\n## Summary\n\nThis PR lets `Array` and `Map` arguments convert the way object\nreferences do. Before, an\n`impl Into\u003cArray\u003cT\u003e\u003e` parameter, such as a stored field of a generated\n`new` or `from_fields`,\naccepted only `Array\u003cT\u003e` and `Vec\u003cT\u003e`. An `impl Into\u003cMap\u003cK, V\u003e\u003e`\nparameter accepted only an\nowned `Map\u003cK, V\u003e`. Now both also take a reference, an array literal and,\nthrough a named\nmethod, a container of a subtype:\n\n```rust\nfn keep_array(_: impl Into\u003cArray\u003cBase\u003e\u003e) {}\nfn keep_map(_: impl Into\u003cMap\u003cString, Base\u003e\u003e) {}\n\nkeep_array(\u0026bases);                  // reference-count bump\nkeep_array([a, b]);                  // [T; N]\nkeep_array(subs.upcast());           // Array\u003cSub\u003e -\u003e Array\u003cBase\u003e, no copy\nkeep_map(\u0026map);                      // no `.clone()`\nkeep_map([(\"a\".into(), a)]);         // [(K, V); N]\nkeep_map(sub_map.upcast());          // Map\u003cString, Sub\u003e -\u003e Map\u003cString, Base\u003e, no copy\n```\n\n### Details\n\n- **`From` conversions.** `Array\u003cT\u003e` gains `From\u003c[T; N]\u003e`, `From\u003c\u0026[T]\u003e`\nand `From\u003c\u0026Array\u003cT\u003e\u003e`.\n`Map\u003cK, V\u003e` gains `From\u003c[(K, V); N]\u003e`, as `HashMap` has, and\n`From\u003c\u0026Map\u003cK, V\u003e\u003e`. The\nreference forms clone the handle, the same as `From\u003c\u0026T\u003e for T` from\n`#[derive(ObjectRef)]`.\n- **`TypeSubsumes\u003cSource\u003e`.** A new `unsafe` marker trait, re-exported\nat the crate root and\nnamed after C++ `type_subsumes_v`. `Self: TypeSubsumes\u003cSource\u003e` means\nevery `Source` value is\na valid `Self` as stored. A blanket impl covers every type and itself,\nand\n`unsafe_impl_object_ref_upcast!` now also declares `Target:\nTypeSubsumes\u003cSource\u003e`. Existing\n  derived and stubgen-generated references get it without changes.\n- **Element upcasts.** `Array::upcast` and `upcast_ref`, and\n`Map::upcast` and `upcast_ref`,\nturn a container into one of subsuming element types without a copy, the\nsame as C++\n`Array(const Array\u003cU\u003e\u0026)` and `Map(const Map\u003cKU, VU\u003e\u0026)`. A blanket\n`From\u003cArray\u003cU\u003e\u003e for Array\u003cT\u003e`\nwould overlap the reflexive `From\u003cT\u003e for T`, so the upcast is a named\nmethod.\n- **`IntoObjectRef`.** `Array\u003cT\u003e` and `\u0026Array\u003cT\u003e` implement\n`IntoObjectRef\u003cArray\u003cU\u003e\u003e` for each\n`U: TypeSubsumes\u003cT\u003e`, and `Map` does the same for its keys and values. A\nread-only API can\ntake `impl IntoObjectRef\u003cMap\u003cString, Base\u003e\u003e` instead of `\u0026Map\u003cString,\nBase\u003e`, and accept an\n  owned or borrowed map of `Base` or of a subtype.\n- **Not covered.** An upcast to `Any` (`Array\u003ci64\u003e` to `Array\u003cAny\u003e`) and\na nested upcast\n(`Array\u003cArray\u003cSub\u003e\u003e` to `Array\u003cArray\u003cBase\u003e\u003e`), which C++ allows. Either\nimpl would overlap the\n  blanket reflexive impl."
    },
    {
      "commit": "7bedac88ac4f2737d089244bae4d7be9d3599140",
      "tree": "2af617a15497b2887973b597756405b09ccc8df9",
      "parents": [
        "ec4dc7143feff7a12c06db39068899fd9349d466"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 20:12:40 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 20:12:40 2026 -0500"
      },
      "message": "[Rust] structural_equal/hash/mismatch; name the parent `base_` and the generated handle `data_` (#951)\n\nTwo commits:\n\n1. **Name the parent `base_` and the generated handle `data_`.** Object\nstructs embed their parent as `base_`, and stubgen references hold their\n`ObjectArc` as `data_`, so reflected fields keep their registered names\n(`base`, `data`, `global_var_map_`); stubgen rejects only a reflected\n`base_`/`data_`. `#[rs_object]` requires `base_` and points a `base`\nfield to the new name (one-time break). Stubgen emits the reference\nbefore its `*Obj` (a `///` above the block documents the reference; the\n`*Obj` gets a one-line summary), adds a `visibility` directive\n(`\u003ctype_key\u003e.\u003cfield\u003e -\u003e pub(crate)`), and no longer imports the parent\u0027s\ntype for a parameter a `field` directive narrows.\n2. **`structural_equal`, `structural_hash`,\n`get_first_structural_mismatch`** (and `_with` variants taking\n`StructuralOptions { map_free_vars, skip_tensor_content }`), thin\nwrappers over the registered\n`ffi.StructuralEqual`/`ffi.StructuralHash`/`ffi.GetFirstStructuralMismatch`,\nre-exported at the crate root."
    },
    {
      "commit": "ec4dc7143feff7a12c06db39068899fd9349d466",
      "tree": "6e2162f2ec68a929dbb92c0e2e9b868549180a0f",
      "parents": [
        "5818c66b43ef83f0137a2aa956dd2a70c295951d"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 19:26:28 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 19:26:28 2026 -0500"
      },
      "message": "[Stubgen] Rust directives for allow-missing-docs and closed enums (#950)\n\nTwo opt-in Rust stubgen directives:\n\n- `tvm-ffi-stubgen(missing-docs): allow` puts `#[allow(missing_docs)]`\non every generated type and `impl` of the file, so a crate can enable\n`#![warn(missing_docs)]` and document the generated types by hand.\n- `closed` before the member list of an `enum` directive emits a\n`#[repr(\u003cint\u003e)]` Rust enum of exactly those members, for value sets the\nABI fixes, instead of the open integer newtype.\n\nWithout either, the generated code is unchanged."
    },
    {
      "commit": "5818c66b43ef83f0137a2aa956dd2a70c295951d",
      "tree": "1c72a7277bba9612a68e8990e12dd61caa11f23f",
      "parents": [
        "816aa6241258d8018d665f7c15ffea539da27fb0"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 17:44:17 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 17:44:17 2026 -0500"
      },
      "message": "[FIX] Make JSON numeric conversion independent of locale (#948)\n\nJSON numbers use a decimal point regardless of the process locale. Parse\nand print integers with standard character conversion. Use\nfloating-point character conversion with MSVC and libstdc++ 11 or newer,\nand explicit C-locale conversion with libc++ and older libstdc++\nlibraries.\n\nKeep the conversion logic in the existing parser and writer source\nfiles, with no build-time feature probes or new headers. Preserve\nfloating-point precision, integer-like float formatting, and range-error\nbehavior while avoiding temporary numeric-token copies on the standard\nconversion path."
    },
    {
      "commit": "816aa6241258d8018d665f7c15ffea539da27fb0",
      "tree": "0425a133d45becfb4e6625e7a47c2e637b14fc62",
      "parents": [
        "0f06d11334ce3aec7aece1fbbaf24f465a6e48e9"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 17:44:05 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 17:44:05 2026 -0500"
      },
      "message": "[Rust] Complete the API docs, CPUNDAlloc unit struct, AccessPath fields (#949)\n\nComplete and tidy the public API docs of the `tvm-ffi` Rust crate.\n\n- Document every public item that `missing_docs` flags: module docs,\nTensor/TensorView accessors, the `ErrorKind` constants,\n`ObjectCore`/`ObjectRefCore` items, `ArrayObj` fields,\n`AccessStep`/`AccessPath`, `DLTensorExt`, `IntoDispatcher`,\n`IntoWalkResult`, `ShallowCopy` and `Object::new`; then enable\n`#![warn(missing_docs)]`.\n- Write the docs as a native Rust API: state behavior in Rust terms\ninstead of comparing with C++, which is named only for ABI layouts and\nthe export macros.\n- Tidy existing docs: replace placeholder and stale wording\n(`CPUNDAlloc`, `NDAllocator` arguments,\n`ObjectCore::object_header_mut`), drop prose that restates the\nsignature, move implementation notes (List/Map/Optional layout) into\ncode comments, and use `MyPair` in examples. The `ObjectDef` example is\nnow a tested doctest instead of `ignore`.\n\n- `AccessStep`/`AccessPath` expose their reflected fields through\n`Deref` (`kind`, `key`; `parent`, `step`, `depth`), with an `AccessKind`\nenum for the step kind.\n- `CPUNDAlloc` becomes a unit struct deriving `Clone`, `Copy`, `Debug`\nand `Default` (`CPUNDAlloc {}` still compiles).\n\nNo behavior change."
    },
    {
      "commit": "0f06d11334ce3aec7aece1fbbaf24f465a6e48e9",
      "tree": "af268205c8561fcd7d0c387584a4a575db4e0a63",
      "parents": [
        "9faeaff3532b89746f6af841e616e1ec9b520871"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 16:46:17 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 16:46:17 2026 -0500"
      },
      "message": "[Rust] Export with #[unsafe(no_mangle)], tidy macro docs (#947)\n\nThe export macros (`tvm_ffi_dll_export_typed_func!` and its metadata and\ndoc getters) emit `#[unsafe(no_mangle)]`: the minimum Rust is 1.95, so\nthe plain form kept for rustc before 1.82 is no longer needed, and\nedition-2024 callers no longer see its deprecation. The comment\nexplaining the old form is dropped. The hidden `function_name!` and\n`check_safe_call!` get one-line docs, replacing a typo and a duplicated\nparagraph that said `check_safe_call!` updates the traceback, which it\ndoes not. `into_typed_fn!` gets a shorter doc in the current style, with\nthe example returning errors by `?`."
    },
    {
      "commit": "9faeaff3532b89746f6af841e616e1ec9b520871",
      "tree": "b678b05c094ac6369beff290ac319d3ec18d49ae",
      "parents": [
        "658bd6c584aa462e37a9e8ce69ce74c1a519f9bf"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 15:53:14 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 15:53:14 2026 -0500"
      },
      "message": "[Rust] Reorder object, error, array, macro and structural engine files; inline dispatch handlers, cold visitor stop path (#946)\n\nReorder items within each file so it reads top-down: key data structures\nfirst, then the main flow, then helpers. `object.rs` leads with\n`Object`, `ObjectArc` (with its impls, `ImmutableObject` and its\n`Send`/`Sync` next to `Clone`) and `ObjectRef`, then the traits, then\n`ObjectIdentity`/`is_instance_of`/`fmt_object_ref`, then a Helpers\nsection (the crate-private `root_*` helpers, `type_key_of_index`,\n`write_object_cell`, `allocate_object`), then `unsafe_`. `error.rs`\nleads with `ErrorObj`, `Error` and `Result`, then `ErrorKind` and its\nconstants, then `impl Error` with the private `make_mut` after the\npublic accessors, with the std impls at the end. `collections/array.rs`\nputs the private `Array` methods after the public ones and groups the\nrest into Index, Iterators, Any conversions and Helpers (`write_cell`)\nsections. `macros.rs` moves `unsafe_impl_object_ref_upcast!` and\n`unsafe_impl_object_ref_downcast_ref!` out of the error-handling section\ninto their own \"Macros for object references\" section.\n`extra/structural_visit.rs` and `extra/structural_mutate.rs` now read:\ndata structures (each type with its impls), public API and entrypoint,\nthe engine (its two `impl` blocks joined), prefix operations, private\nutilities, outlined errors. The reorder commit is moves only; review it\nwith `--color-moved`.\n\nThree small follow-ups ride along. `#[dispatch]` marks handlers\n`#[inline(always)]` unless they already carry an `inline` attribute, so\na traversal no longer pays an outlined handler frame per node (no-op\nmutate 210 to 158 ns on a 17-node tree, matching map).\n`StructuralVisitorObj::with_visit_context_raw` returns a None carrier\ndirectly and sends the rest to a `#[cold]` `#[inline(never)]` helper, so\ncontinuing visits keep no input copies for error annotation (native-hook\nvisits 7–9% faster, DAG walk/visit about 3.5%).\n`tests/python/test_stubgen_rust.py` gets the ruff-format fix that `main`\nhas been failing since #945."
    },
    {
      "commit": "658bd6c584aa462e37a9e8ce69ce74c1a519f9bf",
      "tree": "a34bd4815e3f4a5397a8798e5ce87c550b0a1f56",
      "parents": [
        "e12d6cdbb9872bfc64f26c446d20e190339999d7"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 13:35:53 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 13:35:53 2026 -0500"
      },
      "message": "[Rust] ObjectRefAnyCompatible and derive-only object reference declaration (#945)\n\n**[Rust] ObjectRefAnyCompatible: overridable AnyCompatible base for\nobject references**\n\nA reference with a stricter check than its object type, such as a typed\nexpression view, had to hand-write its whole `AnyCompatible` over raw\n`TVMFFIAny` cells. `ObjectRefAnyCompatible` is the object-reference base\nof\n`AnyCompatible`, as C++ `TypeTraits\u003cT\u003e` derives from\n`ObjectRefTypeTraitsBase\u003cT\u003e`: its hooks are safe and defaulted, and a\nblanket\nimpl makes each implementer `AnyCompatible` with the object cell\nencoding.\n\n- `extra_check(\u0026ContainerType) -\u003e bool` runs after the object-type\ncheck, in\n  every strict and converting cast.\n- `convert_fallback(AnyView) -\u003e Option\u003cSelf\u003e` converts other values, as\nC++\n`ConvertFallbackValue` does, for converting casts only (`TryFrom\u003cAny\u003e`,\n  typed function arguments); `downcast_ref`, `downcast` and `match_any!`\n  never call it.\n- `custom_type_str()` and `custom_mismatch_type_info(AnyView)` replace\nthe\n  names in conversion errors and type schemas.\n- The hidden `MATCH_ANY_EXACT` defaults to false, so a hand-written impl\nis\nnever routed by type index in `match_any!`; `#[derive(ObjectRef)]`,\nwhose\n  impl overrides nothing, sets it, and the blanket impl adds the object\n  type\u0027s finality.\n\n`#[derive(ObjectRef)]` now emits `unsafe impl ObjectRefAnyCompatible for\nT`\nwith the defaults instead of its own `AnyCompatible`. Its helper\nattributes\nbecome one namespaced `#[object_ref(skip_debug)]`; the unused `type_key`\nand `type_index` declarations are dropped. Containers keep their own\n`AnyCompatible`.\n\n\n**[Rust] Declare object references with #[derive(ObjectRef)] only**\n\nAn object reference had two declaration forms: `def_object_ref!`, which\nalso added `Deref`, `From\u003cObj\u003e` and the parent upcast, and\n`#[derive(ObjectRef)]`, which left those to hand-written code. The\nderive\nbecomes the one form, configured by one namespaced helper attribute\n`#[object_ref(...)]`:\n\n- `Deref\u003cTarget \u003d Obj\u003e` for field reads, as C++ `operator-\u003e`;\n`skip_deref`\nopts out for a reference whose object is internal (`Error`, `Function`,\n  `Tensor`, `Shape`, `Module`, `ObjectRef`, ...).\n- A private `fn from_object(object: Obj) -\u003e Self` for the type\u0027s own\nconstructors instead of a public `From\u003cObj\u003e`, so construction stays with\n  the type\u0027s author.\n- `parent \u003d Ref` adds the upcast to the parent\u0027s reference.\n- `skip_any_compatible` leaves `ObjectRefAnyCompatible` to a\n  hand-written impl, so a typed reference derives everything else.\n- `skip_debug` as before, and `crate \u003d path`.\n\nThe derive\u0027s in-place downcasts now come from\n`unsafe_impl_object_ref_downcast_ref!`. `def_object_ref!` is removed;\ntvm-ffi\u0027s\nown docs, tests and `VisitInterrupt` use the derive.\nThe Rust stub generator no longer emits a reference `Deref`, and the\n`rust_stubgen` example bindings are regenerated; bindings generated\nbefore\nthis change define that `Deref` themselves and need regenerating.\n\n\n\n\n\n`unsafe_impl_object_upcast!` is renamed\n`unsafe_impl_object_ref_upcast!`; the stub generator emits the new name.\n\n\nThe in-place borrow macro is renamed\n`unsafe_impl_object_ref_downcast_ref!`, and the new\n`impl_any_compatible_conversions!` emits the `TryFrom`, `call_tuple` and\ntyped-function argument impls for a type that implements `AnyCompatible`\nby hand; the derive uses it, and its three building blocks are hidden."
    },
    {
      "commit": "e12d6cdbb9872bfc64f26c446d20e190339999d7",
      "tree": "7a8be7353ef9c21f3190cb7a661e1dacbb5a8451",
      "parents": [
        "a472db8d80b57c6d6be34965e84133f7ce450c57"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 12:01:43 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 12:01:43 2026 -0500"
      },
      "message": "[Rust] Structural engine readability: one-line comments, typed run_visitor, TVMFFIAny by value (#944)\n\nMake the structural visit and mutate engines read straight through, with\nno behavior or public API change. The file layout stays as is; a\nfollow-up reorders sections.\n\n- `run_visitor` returns `Result\u003cOption\u003cVisitInterrupt\u003e\u003e`, so\n`visit_root`\n  and the two arms of `run_walker` call it directly instead of\n  round-tripping a raw result.\n- Private `extern \"C-unwind\"` helpers take `TVMFFIAny` by value instead\n  of its three scalar fields; it is still returned in registers on\n  AArch64.\n- One statement of the `_raw` ownership convention per engine file\n  replaces the overview blocks; doc and SAFETY comments are one-line\n  contracts.\n- Terminology: in-place \"mode\" and \"view\" replace \"permission\" and\n  \"capability\"; `CapabilitySource` -\u003e `MutationSource`,\n  `dispatcher_context` -\u003e `dispatcher_ptr`, `handle`/`visitor`/`mutator`\n  -\u003e `runtime` for the native prefix, `default_mutate_raw` -\u003e\n  `publish_and_descend_raw`, `_scope` \u0026 co -\u003e one `_marker`.\n- `VisitErrorContextObj` and its append function move to\n  `extra/visit_error_context.rs`, mirroring the C++ header, as\n  `update_visit_error_context`. `structural_common.rs` holds the shared\noutlined errors, raw carrier utilities and the reflection prefix helpers\n  both engines use (field flags, region rules, field iteration, type-key\n  lookup); the callback-chain arity macro moves next to its user in\n  `dispatch.rs`. The region guard stays per engine.\n- The borrow-check `compile_fail` examples move out of the user docs\ninto\n  a doctest-only item in `extra/mod.rs`, where they still run;\n  `visit_root`/`mutate_root` get user docs.\n- Drop the in-file `VisitErrorContextObj` layout test: the binding is\n  covered end to end by `tests/test_structural_mutate.rs`. Document the\n  `backtrace` argument of `Error::new` as most recent call first.\n- `downcast_ref_from_object_in_place` assumes the object-range type\n  index read from the object header, as `ObjectRefCore::downcast`\n  does, so the borrowing check drops that comparison."
    },
    {
      "commit": "a472db8d80b57c6d6be34965e84133f7ce450c57",
      "tree": "bf996f072ac8f0839133c8d451cee0e997304660",
      "parents": [
        "bc6bf77478c46c596cae9be611099078ccf85622"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 10:17:06 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 10:17:06 2026 -0500"
      },
      "message": "[FFI] Refcount ordering, Array copy-on-write mutators, Rust API surface cleanup (#943)\n\nThe strong-count decrement in `dec_ref` used `Relaxed`, so the Acquire\nfence before the deleter had no Release to pair with: writes made by\nanother owner before it dropped its reference were not guaranteed to be\nvisible to the thread running the destructor. Use `Release`, matching\nC++ `Object::DecRef` and `std::sync::Arc`.\n\nIn-place mutation (error context, backtrace append, `Array::push`,\nstructural mutate) was gated on a strong count of 1, which ignores weak\nreferences: one could be upgraded concurrently and observe the write.\nGate it on a new crate-internal `is_unique`, which requires one strong\nand no weak reference, as C++ `Object::unique()`, and loads with\n`Acquire` to pair with the releasing decrements, as `Arc::get_mut`.\n`strong_count` stays a `Relaxed` diagnostic.\n\nC++ `Object::unique()` loaded the count `Relaxed` (MSVC: a volatile\nread, not an acquire on arm64), yet copy-on-write paths write in place\nafter it. Load with acquire (`ReadAcquire64` on MSVC), pairing with\n`DecRef`\u0027s release.\n\nDocument on `Function::from_extern_c` that `safe_call`, `deleter` and\nthe handle state must be safe to use from any thread.\n\nImplement `std::error::Error::source()` for `Error` from its cause\nchain, so generic error tooling (anyhow, eyre, `Box\u003cdyn Error\u003e`) sees\nthe cause.\n\nMake the documented Rust surface match the supported API before it is\nlocked, without changing what is reachable:\n\n- hide the `macros` module and its `paste` re-export (the exported\n  macros live at the crate root);\n- document the items a hand-written reference type relies on:\n  `type_traits::ContainerElement`, `object::is_instance_of` and\n`ObjectArc::is_null`; add `unsafe_impl_ref_downcast!`, which implements\nthe in-place reference downcasts (`array[i]`, `downcast_ref`) for such a\n  type, so their traits and helpers stay hidden;\n- state what `impl_try_from_any!`, `impl_arg_into_ref!` and\n  `impl_into_arg_holder_default!` enable, and give `cached_global_func!`\n  an example;\n- add a casts section to `ObjectRefCore`: `downcast_ref` borrows\n  strictly, `downcast` takes the value and hands it back on a mismatch,\n  and `TryFrom` returns a `TypeError`;\n- make `StructuralVarRemap` crate-private (engine internal).\n\nDeclare `rust-version \u003d \"1.95\"` on the three crates, the oldest\ntoolchain that builds them (`core::hint::cold_path`), as TIRx does.\n\nRust `Array` gains public `push`, `insert`, `pop`, `truncate` and `set`,\nall `\u0026mut self`, with C++ `Array`\u0027s copy-on-write contract stated once\non\nthe type: copied when shared, edited in place when this handle is the\nonly reference. A private `make_mut` (as C++ `Array::CopyOnWrite` and\n`Rc::make_mut`) holds the copy logic previously inline in `push`. Index\nerrors match `List`: `insert`, `set` and `pop` return an `IndexError`.\n\nStructural mutate has one default path: `StructuralMutatorObj`\u0027s\n`StructuralMutatorBase::default_mutate_raw` reaches the variable remap\nthrough the installed vtable, as every other native prefix does, so a\nbase that reuses it is correct by construction. This removes the\n`ORDINARY_ENGINE` fast path and the same-named inherent\n`default_mutate_raw`; performance is confirmed separately.\n\n`Error` updates in place go through one private `make_mut` (copy when\nshared), and `Array::make_mut` keeps the reallocation in a helper.\nStructural mutate errors are labeled \"mutate\" (the map adapter keeps\n\"map\"), and the duplicate type-key lookup is removed. A test checks the\nRust `VisitErrorContextObj` binding against the field offsets C++\nregisters.\n\nC++ `UpdateVisitErrorContext` skips the append when the context\u0027s last\nframe is already `node` (callback, policy and default descent can report\nthe same frame), before copying the error, as Rust does."
    },
    {
      "commit": "bc6bf77478c46c596cae9be611099078ccf85622",
      "tree": "4dbb8f5f7ec50515ff0c3169bb418cdbcaa7ef0d",
      "parents": [
        "9288282fee38e0ba681411b80bb36d211d436e60"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 09:49:31 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 09:49:31 2026 -0500"
      },
      "message": "[Rust] Fix clippy findings (#942)\n\nAddress `cargo clippy --workspace --all-targets` findings with no change\nto public signatures or behaviour:\n\n- mechanical fixes: needless return/borrow/conversion, redundant field\n  names, same-type casts, canonical `partial_cmp`, `div_ceil`, and\n  `map_err(Into::into)` in `into_typed_fn!` instead of `Ok(x?)`;\n- add the missing `# Safety` sections on unsafe traits and functions;\n- scope-allow `new_without_default` on `Object` and the sys\n  `TVMFFIObject`/`TVMFFIAny`, and `result_unit_err` on the\n  implementor-facing `AnyCompatible::try_cast_from_any_view` and hidden\n  match-pattern hooks, whose `()` error is deliberate;\n- tests: replace PI-like float literals, keep the intentional\n  `i64::MIN % -1`, `AnyView::clone` and macro-mirroring `(\u0026probe)`\n  receiver cases under scoped allows.\n- CI: run pinned clippy (1.99.1, `-D warnings`) on ubuntu after the\n  Rust tests, when `rust/` changes."
    },
    {
      "commit": "9288282fee38e0ba681411b80bb36d211d436e60",
      "tree": "d3da037f84514b9b772c382ab9711c316b9a7a24",
      "parents": [
        "12c6fc51e71bc23bf3042258503826135abb41f3"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Nov 06 00:15:44 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 06 00:15:44 2026 -0500"
      },
      "message": "[Rust] Append visit error context in place (#940)\n\nRust structural visit and map annotate an escaping error with a\n`VisitErrorContext` breadcrumb per frame. Today\n`with_visit_error_context` reads the whole pattern through\n`ffi.ArraySize`/`ffi.ArrayGetItem`, then rebuilds the Array, the context\n(`ffi.MakeObjectFromPackedArgs`) and the Error at every frame, which is\nquadratic in the unwind depth.\n\nThis follows C++ `detail::UpdateVisitErrorContext` instead, entirely in\nRust: copy-on-write at each level, so an Error owned by the unwinding\nframe has its pattern appended in place, while a shared Error, context\nor pattern is copied before the write. The same-frame dedupe is kept,\nand a fresh context keeps the previous `extra_context` as\n`prev_error_context`.\n\n- A crate-internal `#[repr(C)]` binding of `ffi.VisitErrorContext` with\nthe C++ field layout (`reverse_visit_pattern`, `prev_error_context`),\nchecked against the registered field offsets in a unit test.\n- A crate-internal `Error::extra_context_mut`, which first replaces a\nshared Error by a shallow copy.\n- A crate-internal copy-on-write `Array::push` that writes in place when\nunique with room and otherwise moves or copies into a buffer that grows\ngeometrically. To support it, a Rust-allocated `ArrayObj` now sizes its\ninline buffer by `capacity`, and releases its elements when dropped\n(previously they were never released).\n\nNo public API changes.\n\n\nAlso adds `String::is_empty` and `Bytes::is_empty` (next to `len`, as in\nstd) and `impl Default for Shape` (the empty shape), so they are part of\nthe API before stabilization."
    },
    {
      "commit": "12c6fc51e71bc23bf3042258503826135abb41f3",
      "tree": "44b9151d7b6cc4683c18e63a02ed28bf2ac76417",
      "parents": [
        "5fdba0f4c562465435ab4a860da602ab80f6820d"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 23:46:01 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 23:46:01 2026 -0500"
      },
      "message": "[EXTRA] VisitErrorContext: Array with copy-on-write append (#939)\n\n`VisitErrorContextObj` kept its visit pattern in a mutable `List`, and\n`UpdateVisitErrorContext` appended to it and rewrote the `ErrorObj`\u0027s\n`extra_context` in place. That was safe only while the unwinding frame\nwas the Error\u0027s sole owner, and `Error`\u0027s `Send + Sync` claim depended\non that assumption.\n\nThis PR makes the update copy-on-write at each level:\n\n- `reverse_visit_pattern` is now an `Array\u003cObjectRef\u003e`, and\n`VisitErrorContextObj` is no longer `_type_mutable`.\n- `UpdateVisitErrorContext` swaps `err` for a shallow copy (kind,\nmessage, backtrace, cause chain, extra context) if the `ErrorObj` is\nshared. If the error\u0027s `VisitErrorContext` is shared, it gets swapped\nfor a copy too. Then `Array::push_back` copies its own storage if that\nis shared. Each level is borrowed through its parent\u0027s field, so when\nthe unwinding frame is the only owner, the update still happens in\nplace.\n- The raw-result and `Expected` overloads used by the visit and mutate\nengines now move the Error out of the result and put it back. Before,\nthey annotated a second handle. That second handle would now trigger a\ncopy, so moving keeps the engine\u0027s sole-owner path in place.\n- Every `UpdateVisitErrorContext` overload, and\n`StructuralMutatorObj::UpdateVisitErrorContext`, takes the Error or\nresult by pointer, so call sites show that it may be replaced.\n- On the Rust side, structural annotation reads and builds the pattern\nthrough the `ffi.Array*` globals.\n\nThe Error C ABI is unchanged; `extra_context` stays an opaque handle.\n\nRust stub generation now emits just the `ImmutableObject` impl line,\nwith no SAFETY comment, and the checked-in `rust_stubgen` example now\nincludes that line for `IntPairObj` (it was missing after #938)."
    },
    {
      "commit": "5fdba0f4c562465435ab4a860da602ab80f6820d",
      "tree": "1490ee4286268abf88041f71fb36a31956f27681",
      "parents": [
        "b04c6bb8f3cff55f160534abd61071dec9d74f68"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 22:48:19 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 22:48:19 2026 -0500"
      },
      "message": "[FFI][Rust] Thread safety only where it holds; TryFrom between object references (#938)\n\nFinishes the Rust API\u0027s object story for stabilization: thread safety is\nclaimed only where it holds, and downcasting between references uses\n`TryFrom`.\n\n## Thread safety\n\nBefore this change, the root `ObjectRef` and any derived reference whose\nfields happened to be thread-safe were `Send + Sync` automatically, even\nwhen the object was shared mutable state: a `List` behind an\n`ObjectRef`, or a C++ class whose methods mutate it.\n\n- **Object handles are not `Send`/`Sync` by default.** `ObjectRef` and\nderived references are single-threaded unless their class opts in. `Any`\nalready was.\n- **`ImmutableObject`:** an `unsafe` marker for object types whose\nshared instances are never mutated (after zerocopy\u0027s `Immutable` and\npyo3\u0027s `frozen`). A handle is `Send + Sync` when its object type\nimplements it and its fields are thread-safe, so an `Any` field still\nkeeps it single-threaded.\n- **`_type_mutable` decides generated classes.** C++ records\n`Class::_type_mutable` as the type attribute `__ffi_type_mutable__`,\nnext to `__ffi_type_final__`. The Rust stub generator marks a class\n`ImmutableObject` only when it is not mutable (handles give const\naccess, and mutation is copy-on-write); mutable or unknown classes get\nnothing.\n- **tvm-ffi\u0027s immutable built-ins are `Send + Sync`:** `String`,\n`Bytes`, `BigInt`, `Shape`, `Error` (so a `Result` can cross threads),\nand `Array\u003cT\u003e`/`Map\u003cK, V\u003e` when their elements are. `List` stays\nsingle-threaded.\n- **`Function` stays `Send + Sync`,** which global caches need. Its Rust\ncallbacks must be `Send + Sync` (`from_packed`, `from_typed`,\n`register_global_typed`, `ObjectDef::def`/`def_static`), so a closure\ncapturing an `Rc` or `RefCell` is rejected. A callee\u0027s own thread\nsafety, for C++ functions and objects, is that of its implementation.\n\n## `TryFrom` between references\n\n- `unsafe_impl_object_upcast!(Child \u003d\u003e Parent)` also generates\n`TryFrom\u003cParent\u003e for Child` and `TryFrom\u003c\u0026Parent\u003e for Child`, and the\nderive\u0027s upcast to `ObjectRef` gives every reference\n`TryFrom\u003cObjectRef\u003e`. Containers get the same by hand. The cast is\nstrict, since references never convert, and fails with a `TypeError`\nnaming both types, so the common downcast is `let op: Op \u003d\nexpr.try_into()?`. The `\u0026Parent` form checks in place and clones only on\nsuccess. `downcast` remains for trying another type, as it hands the\nvalue back, and `downcast_ref` for borrowing.\n- `object::fmt_object_ref` is documented, for hand-written reference\ntypes implementing `Debug`.\n- `AnyCompatible` is a supertrait of `ObjectRefCore`, so generic code\nneeds one bound."
    },
    {
      "commit": "b04c6bb8f3cff55f160534abd61071dec9d74f68",
      "tree": "e62fc4fda8061268a6ee0bcd205391e50b092c86",
      "parents": [
        "d37f62db8940698d70dc6860ab08c2a79eba33f4"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 21:50:47 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 21:50:47 2026 -0500"
      },
      "message": "[Rust] Align casts and lookups with std and C++ before stabilization (#937)\n\nAligns the Rust API with std and with the C++/Python APIs before it is\ndeclared stable. Each item follows a std precedent or the C++ name and\nshape.\n\n## Casts\n\n- **`try_cast` becomes `downcast`, returning `Result\u003cT, Self\u003e`**, as\nstd\u0027s `Box\u003cdyn Any\u003e::downcast` does. It applies to object references\n(`ObjectRefCore::downcast`) and to `MutationView::downcast`. A mismatch\nhands the value back, so another type can be tried and no error is\nbuilt. `Error::downcast_failed::\u003cB\u003e` makes the `TypeError` where `?` is\nwanted:\n  ```rust\nlet v: PrimVar \u003d\nexpr.downcast().map_err(Error::downcast_failed::\u003cPrimVar\u003e)?;\n  ```\nThis removes the clash with C++ `Any::try_cast`, which converts.\n`UnchangedOr::try_cast` is unchanged.\n- **Upcasts are `.into()`.** `#[derive(ObjectRef)]` now generates\n`From\u003cX\u003e for ObjectRef`, and `Array`/`List`/`Map` get it by hand, so\n`downcast` only goes down.\n- **Every object reference implements `Debug`**, printing its type key\nand address, so `downcast(..).unwrap()` works. `#[custom_debug]` keeps a\nhand-written one, as `Error` does.\n- **`ObjectRefCore` is the one reference trait**: the category of object\nreference types, carrying `same_as`, `downcast_ref` and `downcast`.\n`ObjectRefCast` is removed, so users import one trait. Its\n`data`/`into_data`/`from_data` plumbing stays as associated functions,\nand the derive implements it.\n- **`try_as` is removed.** `try_into`/`TryFrom` covers it: non-strict\nconversion is fine for scalars, references do not convert, and on an\nowned `Any` it moves without a refcount bump. `TryFrom\u003c\u0026Any\u003e` is added\nfor every convertible type, so `i64::try_from(\u0026any)` works on a borrowed\n`Any`. Look-only uses are `downcast_ref`. The cast vocabulary is now all\nstd names: `downcast_ref`, `downcast`, `try_into`.\n\n## Borrowing in place\n\n- `Error::cause_chain()` and `extra_context()` lend `Option\u003c\u0026Error\u003e` /\n`Option\u003c\u0026ObjectRef\u003e` instead of cloning, as std\u0027s `Error::source` does.\n- `Array::iter()` and `for x in \u0026array` borrow `\u0026T` for the types\n`array[i]` borrows. `for x in array` iterates by value for every element\ntype. `ArrayIterator` is replaced by `array::Iter` and\n`array::IntoIter`.\n- `Array` keeps its bounds on its impls, not the struct, like `List` and\n`Map`.\n- `downcast_ref`, `array[i]` and `array.iter()` borrow `Option\u003cT\u003e` of an\nobject reference in place (`Array\u003cOption\u003cExpr\u003e\u003e`), as one nullable\npointer; a size assert pins the layout.\n\n## Lookups (C++ shapes)\n\n- `reflection::get_method(type_key, name)` (C++ `reflection::GetMethod`)\nand `reflection::get_method_by_index(type_index, name)` replace\n`Function::from_type_key_method` and `Function::from_type_method`.\n- `Function::from_type_attr` and `reflection::get_type_attr` are\nremoved; use `TypeAttrColumn`.\n- `Module::get_function`, `implements_function`, `get_function_metadata`\nand `get_function_doc` take only the name and search only this module,\nas C++ `GetFunction(name)` and Python\u0027s default do (`get_function`\nsearched imports before). Each has a `_with_imports` twin that also\nsearches imported modules, instead of a `query_imports: bool` flag,\nsince Rust has no default arguments.\n- The `Function::get_global` docs say a missing name is an `Err`, as C++\n`GetGlobalRequired` and Python\u0027s default.\n\n## Smaller items\n\n- `ObjectArc::as_ptr`, `as_mut_ptr` and `into_raw` are safe, as in std\u0027s\n`Arc`; `from_raw` stays `unsafe`.\n- `Any` and `AnyView` expose the same raw-cell operations:\n`as_raw_ffi_any`, `as_raw_ffi_any_mut` (was `as_data_ptr`), a safe\n`into_raw_ffi_any`, and an `unsafe from_raw_ffi_any` with a `# Safety`\nsection.\n- `Function::from_extern_c` returns `Result\u003cFunction\u003e` instead of\npanicking.\n- `Tensor::is_contiguous` follows C++ `IsContiguous`, as\n`TensorView::is_contiguous` does.\n- `ErrorKind::new(name)` (a `const fn`) builds a custom error kind.\n- `TryFrom\u003c\u0026BigInt\u003e` for `i64`, `u64`, `i128` and `u128`.\n- `DLDataTypeExt::to_string` returns a std `String`.\n- `VisitInterrupt::with` becomes `VisitInterrupt::new`.\n- `StructuralVarRemap` is hidden; handlers use `var_remap_get` /\n`var_remap_set`.\n- The `Any::downcast_ref` docs cover every borrowable type.\n\n## Hidden from the docs\n\n`#[doc(hidden)]`, still public for macros: the `function_internal`\nmodule (`AsPackedCallable` is re-exported at the crate root, since it\nappears in public bounds), `any::TryFromTemp`, and the macros\n`function_name!`, `check_safe_call!` and\n`impl_try_from_any_for_parametric!`. `Shape::fill_strides_from_shape`\nbecomes crate-private.\n\n`impl_try_from_any!`, `impl_arg_into_ref!` and\n`impl_into_arg_holder_default!` are now documented: they make a\nhand-written reference type, such as a typed view, convert out of FFI\nvalues and pass as function arguments, as `#[derive(ObjectRef)]` does.\n`Error::from_panic(payload)` builds the `InternalError` for a panic\ncaught at an FFI boundary.\n\n## Soundness\n\n`downcast_ref::\u003cAny\u003e()` returns `None` for a view cell that borrows a C\nstring, byte array, `DLTensor` or rvalue slot, since an `\u0026Any` there\nwould clone into an owner of a borrowed resource. `Any` and container\ncells never hold those, so their borrows are unchanged.\n\nEmpty and zero-size cases no longer reach undefined behavior:\n`Shape::as_slice`, `Tensor::shape` and `DLTensorExt::numel` handle a\nnull pointer with no elements (an empty shape, a scalar);\n`Tensor::strides` checks for null strides as `TensorView::strides` does;\nand the CPU allocator gives a zero-size tensor an aligned dangling\npointer instead of a zero-size allocation, and handles allocation\nfailure.\n\n`TensorView` has a lifetime, `TensorView\u003c\u0027a\u003e`, so a view cannot outlive\nthe tensor it borrows. It no longer goes through `AnyCompatible`, which\nbuilds values with no lifetime. A view converts with\n`TensorView::try_from(any_view)` (or `try_into`), keeping the view\u0027s\nlifetime; it is a typed function argument (`|t: TensorView| ..`, which\ncannot keep the view past the call); and it passes to a call as a\n`DLTensor*`. `Any::from(view)`, which panicked, and\n`try_as::\u003cTensorView\u003e()` no longer compile.\n\n`ListObj` keeps the fields `List` mutates through `\u0026self` (`data`,\n`size`, `capacity`) in `UnsafeCell`, so a `\u0026ListObj` from `downcast_ref`\nstays sound while the list grows. The layout is unchanged, and the\nfields are no longer public.\n\n`impl_object_upcast!` is renamed `unsafe_impl_object_upcast!`: an upcast\ndeclaration is trusted, as an `unsafe impl` is, and a wrong one makes\nthe generated conversions unsound. The Rust stub generator, which writes\nnearly all of them from the C++ hierarchy, emits the new name.\n\n`Tensor::data_as_slice_mut` is an `unsafe fn`. It keeps `\u0026self`, since\nkernels write tensors they share, but two calls could hand out aliasing\n`\u0026mut [T]`; its `# Safety` section states what the caller guarantees, as\n`slice::from_raw_parts_mut` does. `Tensor::data_ptr_mut` takes `\u0026self`:\na tensor is a shared handle, so `\u0026mut self` did not make writes\nexclusive, and getting a pointer is safe."
    },
    {
      "commit": "d37f62db8940698d70dc6860ab08c2a79eba33f4",
      "tree": "bb1a3722f77281cfcfb3e64cb1d162b839e3d513",
      "parents": [
        "bd82ca5f2dcfa8cd384042f9d51a0aab79c8bcf1"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 20:22:09 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 20:22:09 2026 -0500"
      },
      "message": "[Rust] Borrow BigInt, DLDataType and DLDevice in place with downcast_ref (#936)\n\n`downcast_ref` and `Array` indexing now borrow `DLDataType`, `DLDevice`\nand `BigInt` in place, as they do `i64` and `f64`. `DLDataType` and\n`DLDevice` are stored in the cell\u0027s union as themselves, and a `BigInt`\nis a whole cell, like `Any`.\n\n```rust\nlet dtype: \u0026DLDataType \u003d value.downcast_ref::\u003cDLDataType\u003e().unwrap();\nlet n: \u0026BigInt \u003d value.downcast_ref::\u003cBigInt\u003e().unwrap();\n```\n\nThese two commits were pushed to #935 after it was reviewed and did not\nland with it."
    },
    {
      "commit": "bd82ca5f2dcfa8cd384042f9d51a0aab79c8bcf1",
      "tree": "6fee8dd53aec517a8538448d1fb59e448ced31bc",
      "parents": [
        "34fafd9ee80003a725851dd9adc8cd186fb0daf3"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 19:42:37 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 19:42:37 2026 -0500"
      },
      "message": "[Rust] MutationView::downcast_ref borrows managed references in place (#935)\n\n`MutationView::downcast_ref` now borrows anything\n`AnyView::downcast_ref` does: a managed reference such as `Array\u003ci64\u003e`\nor `Add`, an object type such as `ArrayObj`, or `Any`. It took only\nobject types before, so a mutation handler had to inspect `\u0026AddObj`\nwhere visit and map handlers already get `\u0026Add`.\n\n```rust\nlet array: \u0026Array\u003ci64\u003e \u003d value.downcast_ref::\u003cArray\u003ci64\u003e\u003e().unwrap();\n```\n\nThe check stays strict, and the borrow is in place with no\nreference-count bump. The Rust guide\u0027s mutation section says so."
    },
    {
      "commit": "34fafd9ee80003a725851dd9adc8cd186fb0daf3",
      "tree": "c3b6b8eeaaeb64f578ff11609677f59a675eed1a",
      "parents": [
        "2e10948e78656afc93a5e754e71f5c7aa983e89d"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 10:35:56 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 10:35:56 2026 -0500"
      },
      "message": "[Rust] Add IntoObjectRef\u003cT\u003e: owned or borrowed conversion into an object reference (#933)\n\nAdds `IntoObjectRef\u003cT\u003e`, a conversion into the object reference `T` that\nmoves an owned reference and borrows a borrowed one.\n\n```rust\npub trait IntoObjectRef\u003cT\u003e {\n    type Output: Borrow\u003cT\u003e + Into\u003cT\u003e;   // `T` for an owned value, `\u0026T` for a borrowed one\n    fn into_object_ref(self) -\u003e Self::Output;\n    fn into_owned_object_ref(self) -\u003e T { self.into_object_ref().into() }   // provided\n}\n```\n\n- **Generated per pair.** `impl_object_upcast!(Sub \u003d\u003e Base)` implements\n`IntoObjectRef\u003cBase\u003e` for `Sub` (moved through the existing `From`) and\nfor `\u0026Sub` (borrowed through `AsRef`, with no reference-count change).\n`#[derive(ObjectRef)]` implements it for the type itself, so a function\ntaking `impl IntoObjectRef\u003cBase\u003e` accepts `Base`, `\u0026Base` and every\ndeclared subtype, owned or borrowed.\n- **Concrete impls.** Because each impl is for a specific type pair,\nowned and borrowed impls never overlap. Blanket impls over both `T` and\n`\u0026T` would be rejected by Rust\u0027s coherence rules, which forced\nhand-written per-type lists downstream. A function that only reads the\nvalue borrows the output with `.borrow()`; one that keeps it calls\n`into_owned_object_ref()`, as with `Cow::into_owned`, which clones only\na borrowed reference.\n- **Infallible.** Hierarchy conversions cannot fail. Downstream traits\nthat need fallibility, such as TIRx\u0027s `IntoExpr` with its `ExprResult`,\nadd it on top."
    },
    {
      "commit": "2e10948e78656afc93a5e754e71f5c7aa983e89d",
      "tree": "93e24bc71efa7abff4ef46372081384314d9f4ab",
      "parents": [
        "a21f5fa79329cc63b46c0cf087ebcf7ac4516686"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 10:02:14 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 10:02:14 2026 -0500"
      },
      "message": "[DOCS][Rust] Borrow reference types in match_any! and dispatch examples (#932)\n\nUpdates the Rust guide and the `#[dispatch]` rustdoc example to borrow\nmanaged references and values in place, as #931 allows, in place of\nobject types or owned bindings that clone.\n\n- **`match_any!`:** `tvm_ffi::String(ref s)` and `Array\u003cAny\u003e(ref arr)`\nborrow without a reference-count change. The text explains `Type(ref\nname)` and keeps `ArrayObj(ref node)` as the way to borrow the object\nnode.\n- **Dispatching:** the handlers take `\u0026Array\u003cAny\u003e` and\n`\u0026tvm_ffi::String`. The expansion shown and the handler rule (`\u0026Type`\nbecomes a `Type(ref value)` arm) match.\n- **`Any` and `AnyView`:** the example borrows\n`downcast_ref::\u003cArray\u003ci64\u003e\u003e()`, and the description covers managed\nreferences, values and object types, with the strict, non-converting\ncheck.\n- **Borrowed values into `Any`:** `label_of` takes `\u0026Point` in place of\n`\u0026PointObj`; its fields are reachable through `Deref`."
    },
    {
      "commit": "a21f5fa79329cc63b46c0cf087ebcf7ac4516686",
      "tree": "f0e2a58b584f85f0bde71eebaf59bbaca0a1a933",
      "parents": [
        "25fda031d4f27a0076f065471802719baab4633b"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 09:54:51 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 09:54:51 2026 -0500"
      },
      "message": "[Rust] Borrow references and values in place in downcast_ref, dispatch and match_any!; add Optional::as_ref (#931)\n\nExtends `downcast_ref` to borrow values in place, like\n`std::any::Any::downcast_ref`, without touching reference counts.\n\n- **`Any::downcast_ref` / `AnyView::downcast_ref`** borrow managed\nreferences (`Array\u003cT\u003e`, `Map`, `List`, every `#[derive(ObjectRef)]`\ntype) and values stored in the cell as themselves (`String`, `Bytes`,\n`i64`, `f64`), as well as object types (`ArrayObj`). The check is\nstrict, as in `try_as`, and never converts. An `AnyView` borrow is tied\nto the view, which holds its own copy of the cell.\n- **Object references\u0027 `downcast_ref`** borrows another reference type\nin place: `\u0026Expr` borrows as `\u0026Add` when the expression is an `Add`.\nThis is the reverse of an upcast.\n- **`#[dispatch]` and `match_any!`.** Handlers taking `\u0026Type` and arms\n`Type(ref name)` accept every type `downcast_ref` does. A managed\nreference (`\u0026Array\u003ci64\u003e`, `\u0026Add`) or a value (`\u0026String`) is borrowed\nfrom the source\u0027s cell in place, as `\u0026NodeObj` already was. A\nreference-type `ref` arm used to clone the handle; it no longer does,\nand the existing tests\u0027 expected reference counts are updated to match.\n- **`Optional::as_ref`** borrows the value, like `Option::as_ref`, for\nvalues the cell stores as themselves.\n- The hidden traits: `RefFromAny` is renamed `RefFromAnyUnchecked`\n(std\u0027s `_unchecked`: the caller guarantees the type).\n`DowncastRefFromAny` and `DowncastRefFromObject` are the checked forms\nthat back `downcast_ref`. Object types are covered by a blanket impl, so\nexisting `downcast_ref::\u003cFooObj\u003e()` calls and generic callers are\nunchanged."
    },
    {
      "commit": "25fda031d4f27a0076f065471802719baab4633b",
      "tree": "79d293421e46d49ad09ae120d45d2dff807972f1",
      "parents": [
        "55b4fad05c39996f506c170985da2381134ef362"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 09:53:08 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 09:53:08 2026 -0500"
      },
      "message": "[Rust] Borrow object-reference upcasts through AsRef (#930)\n\nLets a derived object reference borrow as its base without a\nreference-count bump.\n\n- `impl_object_upcast!(Source \u003d\u003e Target)` now also implements\n`AsRef\u003cTarget\u003e for Source`. It views `\u0026Source` as `\u0026Target` in place:\nboth are one object pointer, and the declaration already promises that\nevery `Source` object is a valid `Target`. A compile-time assert keeps\nthe two layouts equal. Until now the only borrowed conversion was\n`From\u003c\u0026Source\u003e`, which clones.\n- `#[derive(ObjectRef)]` implements `AsRef\u003cSelf\u003e`, as `str`, `Path` and\n`[T]` do, so an `impl AsRef\u003cBase\u003e` bound accepts `\u0026Base` as well as each\nderived reference.\n\nAPIs that only read a base reference can take `impl AsRef\u003cBase\u003e` and\naccept every subtype for free. A bare `x.as_ref()` on a type with\nseveral upcast targets needs a type annotation, as with `String`."
    },
    {
      "commit": "55b4fad05c39996f506c170985da2381134ef362",
      "tree": "54468cef1b3ea93b84d07be10e6ef310d5458666",
      "parents": [
        "b94b787b3da8def992e210e88702c80cdb86af61"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Nov 05 09:13:46 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 09:13:46 2026 -0500"
      },
      "message": "[Rust] Index Array in place; add Array::from_vec; rename Optional::is_some and UnchangedOr::value_or_unchanged (#929)\n\nFixes one unsound API and aligns several names with Rust conventions.\n\n- **`Array` indexing.** `Index\u003cusize\u003e for Array\u003cT\u003e` returned\n`\u0026AnyView\u003c\u0027static\u003e`. Because `AnyView` is `Copy`, `arr[i]` could copy\nout a view that outlives the array, in safe code. It now returns `\u0026T`,\nborrowed from the array\u0027s cell. Every cell of an `Array\u003cT\u003e` holds a `T`,\nchecked when the array is built, so indexing only debug-checks the type,\nlike `Vec`\u0027s `[]` next to `get`. The hidden unsafe `RefFromAny` trait\n(`ref_from_any(cell) -\u003e \u0026Self`) marks the types an FFI `Any` cell stores\nin place: `Any`, `String`, `Bytes`, `i64`, `f64`, `Array`, `Map`,\n`List`, and every `#[derive(ObjectRef)]` type. The derive asserts at\ncompile time that the reference type is exactly its `ObjectArc`.\n- **`Array::new()` / `Array::from_vec`.** `Array::new()` creates an\nempty array, like `List::new()` and `Map::new()`.\n`Array::from_vec(items)` and `From\u003cVec\u003cT\u003e\u003e` build one from items.\n- **`Optional::is_some`.** Renamed from `has_value`, next to `is_none`.\n- **`UnchangedOr::value_or_unchanged`.** Renamed from `value_or`,\nmatching C++ `ValueOrUnchanged`. `value_or_else` is removed; use\n`into_option().unwrap_or_else(..)`.\n- **`Tensor::data_as_slice_mut`.** Allows `clippy::mut_from_ref` on this\none function: returning `\u0026mut` from `\u0026self` is intentional and covered\nby its documented safety contract.\n- **`Map::contains_key`.** Returns `Result\u003cbool\u003e`: a lookup that fails\nin the C++ runtime is reported as `Err`, like `Map::get`, instead of\npanicking."
    },
    {
      "commit": "b94b787b3da8def992e210e88702c80cdb86af61",
      "tree": "f529ca192b2a0d87658028237725c2502c99b519",
      "parents": [
        "744cf65c2d0186894ea23afcbafa9e1cfb943671"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 20:04:25 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 20:04:25 2026 -0500"
      },
      "message": "[Rust] Remove WalkResult::interrupt_with (#927)\n\nThis PR removes `WalkResult::interrupt_with`. `WalkResult` is a plain\nenum, so a handler builds the payload variant directly, as with std\u0027s\n`ControlFlow::Break(value)`:\n\n```rust\nreturn WalkResult::InterruptWith(value.into());\n```\n\nThe helper only added `.into()` and gave the variant a second spelling.\nThe Rust guide and the tests now use the variant."
    },
    {
      "commit": "744cf65c2d0186894ea23afcbafa9e1cfb943671",
      "tree": "f06af4db9ad9cc565d6eb1295a3d49791e8eb5d3",
      "parents": [
        "2e7dcacb6f21dcc3cc9603493f06f3760d9fa7e8"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 19:44:54 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 19:44:54 2026 -0500"
      },
      "message": "[Rust][DOCS] Add std-style examples to the core API docs (#926)\n\nThis PR adds std-style rustdoc to the core Rust APIs. The key top-level\nAPIs (types, entry functions and macros) carry runnable examples.\nSecond-level methods get a one-line summary, a short usage where it\nhelps, and a see-also link to the related top-level API.\n\n- **Macros.** `#[dispatch]`, `match_any!`, `rs_object` and\n`def_object_ref!` are documented on their `tvm_ffi` re-exports, so their\nexamples run as tvm-ffi doctests and the macro crate keeps no dependency\non tvm-ffi. The `dispatch` and `match_any!` examples follow the Rust\nguide. The `rs_object` and `def_object_ref!` examples, previously\n`ignore`, now compile and run.\n- **Values.** `Any` and `AnyView` (with `try_as` and `downcast_ref`),\n`Unchanged` and `UnchangedOr`, and `ObjectRefCast::try_cast`, the Rust\ncounterpart of C++ `ObjectRef::as\u003cT\u003e`.\n- **Traversal.** The `structural_mutate` example shows a handler that\nrewrites one field with `MutationView::field`. `MutationView`,\n`InplaceMode`, the visitor and mutator views, and `Dispatcher` point to\nthe traversal entry points.\n- **Functions, errors and containers.** `Function` (`from_typed`,\n`from_packed`, `call_tuple`, `call_packed`, `get_global`,\n`register_global_typed`), `Error` and `ErrorKind`, `bail!`, `ensure!`,\n`attach_context!`, `Array`, `List`, `Map`, `String`, `Bytes`, `Shape`\nand `Tensor`.\n- **Macro paths.** The macros always emit `::tvm_ffi` paths, which\n`extern crate self as tvm_ffi` resolves inside tvm-ffi, so the same\nexpansion works in the crate, its doctests and dependent crates.\n`attach_context!` no longer needs `Error` in scope."
    },
    {
      "commit": "2e7dcacb6f21dcc3cc9603493f06f3760d9fa7e8",
      "tree": "2283eb9a3a3180bbcffc91eacd7d810253897594",
      "parents": [
        "a8e370c4818fda2b5f666a879253b55d54c9fe33"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 15:36:19 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 15:36:19 2026 -0500"
      },
      "message": "[Rust] Use Result\u003cUnchangedOr\u003cAny\u003e\u003e as the structural map and mutate result (#925)\n\nRust structural map and mutate dispatchers now produce\n`Result\u003cUnchangedOr\u003cAny\u003e\u003e`, the same type that `mutate` and\n`default_mutate` return and that the C++ `Mutate` returns. A handler can\nreturn the result of recursion directly, and keeping a value is written\nexplicitly as `Unchanged.into()`.\n\n- `structural_map`, `structural_mutate`, and the mutation engine require\ndispatchers producing `Option\u003cResult\u003cUnchangedOr\u003cAny\u003e\u003e\u003e`.\n`#[dispatch(map, ...)]` and `#[dispatch(mutate, ...)]` declare\n`Result\u003cUnchangedOr\u003cAny\u003e\u003e`. The engine still carries the result as an\n`Any`, since `UnchangedOr` is a transparent wrapper.\n- `UnchangedOr\u003cAny\u003e` converts from `Unchanged`, from managed references\nand scalars (a replacement), and from typed `UnchangedOr\u003cT\u003e` results, so\n`Unchanged.into()`, `expr.into()`, and `typed_result.into()` work in\nhandlers. An `Any` replacement uses `UnchangedOr::changed`.\n- When a handler\u0027s return type and the declared result are both written\nas `Result\u003c..\u003e`, `#[dispatch]` converts the success value with `Into`,\nso handlers may return `Result\u003cUnchangedOr\u003cExpr\u003e\u003e` or `Result\u003ci64\u003e`.\n- Closure callbacks keep accepting `Unchanged`, `UnchangedOr\u003cT\u003e`, and\nreplacement values, optionally wrapped in `Result`. `IntoMutateResult`\nnow produces `Result\u003cUnchangedOr\u003cAny\u003e\u003e`.\n- The Rust guide, doc examples, and tests use the new result type."
    },
    {
      "commit": "a8e370c4818fda2b5f666a879253b55d54c9fe33",
      "tree": "3d5ab7dc5cb9076bcbed85d933946f2d2eea1614",
      "parents": [
        "7d097720891cc06e67f314f57e0688c1e056e9e0"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 14:22:12 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 05 03:22:12 2026 +0800"
      },
      "message": "[LINT] Keep C++20 syntax rewrites optional in clang-tidy (#924)\n\nAfter #920 moved TVM FFI to C++20, clang-tidy enables several modernize\nchecks that only apply to C++20, and the mainline clang-tidy job over\n`src/`, `include/`, and `tests/` now fails on existing code: designated\ninitializers for `DLDataType`/`DLDevice`, `std::ranges` algorithms,\n`starts_with`/`ends_with`, `std::numbers`, and reverse range-based\nloops.\n\nFollowing #920, which kept the C++20 constraint and integer-comparison\nrewrites optional, this PR disables\n`modernize-use-designated-initializers`, `modernize-use-ranges`,\n`modernize-use-starts-ends-with`, and `modernize-use-std-numbers`, and\nsets `modernize-loop-convert.UseCxx20ReverseRanges` to `false` so loop\nconversion keeps its pre-C++20 behavior."
    },
    {
      "commit": "7d097720891cc06e67f314f57e0688c1e056e9e0",
      "tree": "e1de80b1292cc812347af71381ebb48948949fa8",
      "parents": [
        "7b5532a830d1c69dd789298d4703c3c884b7d66d"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Thu Nov 05 02:14:58 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 13:14:58 2026 -0500"
      },
      "message": "[TEST][Rust] Avoid fixed NaN payloads across float casts (#922)\n\nThe crate publishing dry run for v0.1.16-rc0 fails in\n`matches_concrete_object_containers_in_source_order` on Linux ARM64,\nmacOS ARM64, and Windows AMD64. The test expects a negative NaN payload\nto survive `f32`/`f64` casts, but Rust allows those casts to change the\nNaN sign and payload; the optimized build returns `0x7fc00000` instead\nof `0xffc00001`.\n\nCheck that a matched `f32` remains NaN, or that an `f64` fallback\nretains the original stored bits. Keep the exact checks for signed zero,\ninfinity, finite narrowing, and an unrepresentable NaN payload. This\nchanges only the test.\n\nValidation: reproduced the original failure locally on macOS ARM64 with\nRust 1.99.1; `cargo +stable test --release --workspace` passes with the\ncorrection, including doctests. The local native library was built from\nsource identical to the candidate\u0027s `src/` and `include/` trees.\nRegistry uploads remain disabled, and v0.1.16-rc0 is unchanged.\n\n- Failing candidate run:\nhttps://github.com/apache/tvm-ffi/actions/runs/41882451026\n- Rust NaN guarantees:\nhttps://doc.rust-lang.org/std/primitive.f32.html#nan-bit-patterns"
    },
    {
      "commit": "7b5532a830d1c69dd789298d4703c3c884b7d66d",
      "tree": "18400e186007509cdc56d4d5e1634c91a565ae0d",
      "parents": [
        "3e906bc685ea45624bc80e8d7b7d86497d492af3"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Thu Nov 05 01:26:10 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 12:26:10 2026 -0500"
      },
      "message": "[BUILD] Require C++20 for TVM FFI (#920)\n\nRaise TVM FFI\u0027s required C++ standard from C++17 to C++20. Core, Cython,\nand test builds, exported CMake targets, `tvm-ffi-config --cxxflags`,\nand Python C++/CUDA extension builds now use C++20. Update the\ndocumentation, examples, and ORC JIT build settings accordingly.\n\nC++20 changes `u8` literals to `char8_t`, so preserve the JSON tests\u0027\nexpected UTF-8 bytes with explicit byte literals. Keep constraints and\ninteger-comparison syntax rewrites optional in clang-tidy, and preserve\nthe existing function-cell initialization and exact JSON decimal fixture\nwith targeted suppressions.\n\nThe independent Torch C-DLPack addon continues selecting its standard\nfrom the installed Torch version; it does not include TVM FFI\u0027s C++\nheaders.\n\nValidation on macOS arm64, Apple Clang 21, Python 3.13:\n- C++ suite: 549 passed; 2 disabled.\n- Config, build/load, and generated C++ ABI header tests: 43 passed; 3\nGPU-dependent tests skipped.\n- All pre-commit hooks passed; clang-tidy 21.1.1 passed on the changed\nC++ test.\n- Downstream CMake quickstart built as C++20 even when the consumer\nrequested C++17; the C11 ABI example also built.\n\nLocal builds used an identical source snapshot and virtual environment\nunder a path without spaces because existing libbacktrace and\nextension-linker path handling rejects this workspace path. Linux,\nWindows, GPU, and ORC JIT runtime coverage was not run locally."
    },
    {
      "commit": "3e906bc685ea45624bc80e8d7b7d86497d492af3",
      "tree": "7c30643bc66321be6666f2332e33d4c0a192e279",
      "parents": [
        "6742be0ab9a0ed3cedea80a23842cb2f3cb0150c"
      ],
      "author": {
        "name": "miyan",
        "email": "1138989048@qq.com",
        "time": "Thu Nov 05 00:37:49 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 11:37:49 2026 -0500"
      },
      "message": "[BUILD] Propagate TVM_FFI_EXPORTS to static library consumers (#890)\n\nThis PR propagates `TVM_FFI_EXPORTS` from the `tvm_ffi_static` target as\nan `INTERFACE` definition. Static consumers bundle TVM FFI rather than\nimport it from a DLL, so their declarations now match the `dllexport`\ndefinitions already compiled into the static archive.\n\nUsers who bundle TVM FFI and want their own symbol hiding can compile\nthe sources directly and override `TVM_FFI_DLL`.\n\n---------\n\nCo-authored-by: tqchen \u003ctianqi.tchen@gmail.com\u003e"
    },
    {
      "commit": "6742be0ab9a0ed3cedea80a23842cb2f3cb0150c",
      "tree": "44b783a292f7b1cf36342134d2e82297feeb0973",
      "parents": [
        "e8eb3032c6ea5ee8d839d04d1a4955002fd29af0"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 11:05:54 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 11:05:54 2026 -0500"
      },
      "message": "[DLPACK] Bump DLPack to 1.4 (#919)\n\nBump DLPack to the latest release, 1.4."
    },
    {
      "commit": "e8eb3032c6ea5ee8d839d04d1a4955002fd29af0",
      "tree": "17cf8b3c1a53ffdf81d87b0d3edc9ef3c7575008",
      "parents": [
        "283084866fdfcb849501dfe4003882e52f83a62b"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 10:59:08 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 10:59:08 2026 -0500"
      },
      "message": "[EXTRA] Compose mutator storage and expose borrowed Rust attributes (#918)\n\nAllow structural map and mutate engines to compose with state-only\nparents derived from `StructuralMutatorObj`. A shared engine layer owns\nvariable remapping and its reference lifetimes, while existing\n`StructuralMapEngineBase` parents retain a single remap environment.\n\nExpose the safe borrowed `TypeAttrColumn::get_raw_ffi_any` lookup and\nuse consistent `raw_ffi_any` names for Rust carrier helpers. The copied\ncarrier does not retain or transfer ownership; its documentation\ndescribes registry validity and the owning `get` alternative."
    },
    {
      "commit": "283084866fdfcb849501dfe4003882e52f83a62b",
      "tree": "6e6bfcd6474adb2596490a19b0406759198b74c7",
      "parents": [
        "919672c41b3e445ed1c133aa0ff584ed45f91f99"
      ],
      "author": {
        "name": "Polisetty V R K Jyothendra Varma",
        "email": "polisettyvarma@gmail.com",
        "time": "Wed Nov 04 21:27:28 2026 +0530"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 10:57:28 2026 -0500"
      },
      "message": "[Feature] [XPU] Enable Intel GPU Support (#888)\n\nThis PR enables  Intel GPU Support \n\nSigned-off-by: P V R K Jyothendra Varma \u003cpolisetty.v.r.k.jyothendra.varma@intel.com\u003e"
    },
    {
      "commit": "919672c41b3e445ed1c133aa0ff584ed45f91f99",
      "tree": "1fc78760ce737c1ce695a30ef6d8353ebf10c305",
      "parents": [
        "4b3b01a89228fab58f41a9dcb48503625926f292"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 09:58:49 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 09:58:49 2026 -0500"
      },
      "message": "[Rust] Unify dispatcher input conversion and raw base hooks (#917)\n\nCentralize dispatcher conversion, typed callback matching, callback\nprefix adaptation, and mixed tuple chaining in the shared dispatch\nmodule. Reuse this conversion at structural walk, map, visit, and mutate\nentry points while preserving recursive dispatcher identity and scoped\nmutable reborrows.\n\nMove default raw operations into the visitor and mutator base contracts.\nDocument supported inputs and conversion markers, and replace IntoWalker\nand IntoMapper with IntoDispatcher."
    },
    {
      "commit": "4b3b01a89228fab58f41a9dcb48503625926f292",
      "tree": "1a6bbe070ace1553899c82b221c9afc8d8c3a670",
      "parents": [
        "db09c464943b4fe596412c2c0d43f20bfe5a5cd5"
      ],
      "author": {
        "name": "miyan",
        "email": "1138989048@qq.com",
        "time": "Wed Nov 04 22:25:56 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 09:25:56 2026 -0500"
      },
      "message": "[FIX] Fix reference counting compilation on MSVC x86 (#916)\n\nAnother issue found in https://github.com/microsoft/vcpkg/pull/54810\n\nbuild error on 32bit:\n```\nD:\\b\\tvm-ffi\\src\\v0.1.15-e4904dcca0.clean\\include\\tvm/ffi/object.h(263): error C3861: \u0027_InterlockedIncrement64\u0027: identifier not found\nD:\\b\\tvm-ffi\\src\\v0.1.15-e4904dcca0.clean\\include\\tvm/ffi/object.h(320): error C3861: \u0027_InterlockedDecrement64\u0027: identifier not found\n```\n\nUse the Windows SDK `InterlockedIncrement64` and\n`InterlockedDecrement64` wrappers, which support both 32-bit x86 and\n64-bit x64 targets. On x86, they use a compare-exchange loop; on x64,\nthey map directly to the corresponding intrinsics."
    },
    {
      "commit": "db09c464943b4fe596412c2c0d43f20bfe5a5cd5",
      "tree": "48c23a27a41a94e5e1cd6411095247fb59ddeb04",
      "parents": [
        "d6d5e20f20d2d1c0ec68798302f5a3a8751b6a2b"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Wed Nov 04 08:20:19 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 08:20:19 2026 -0500"
      },
      "message": "[Rust] Make structural mutation generic over its native base (#912)\n\nMake `StructuralMutateEngine` generic over a complete native\n`StructuralMutatorBase`, allowing derived mutators to supply their state\nand default mutation behavior.\n\nThe shared engine retains allocation, scoped dispatcher reborrows,\nidentity remaps, mutation capabilities and result ownership. Scoped\nviews expose the selected base, while ordinary mutation entry points and\nmap adapters retain their existing behavior. Ordinary-base fallback\nkeeps direct remap access; arbitrary native prefixes use their installed\nvtable."
    },
    {
      "commit": "d6d5e20f20d2d1c0ec68798302f5a3a8751b6a2b",
      "tree": "805e9f4390d53f703cecd5ba2f3ccee17209bf15",
      "parents": [
        "2cb94ecf730d8e404d4845047328d6dcef80e4fa"
      ],
      "author": {
        "name": "Lei Wang",
        "email": "34334180+LeiWang1999@users.noreply.github.com",
        "time": "Wed Nov 04 20:11:12 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 07:11:12 2026 -0500"
      },
      "message": "[FIX] Preserve bit widths when formatting custom dtypes (#913)\n\nCustom dtype bit widths are lost when formatting native dtype values,\nwhich can change their types after a JSON round trip.\n`DLDataTypeToString_` only appends `dtype.bits` for type codes below\n`kDLFloat8_e3m4`, excluding custom type codes at or above\n`kDLExtCustomBegin`.\n\nFor example, TileLang uses `custom[float4_e2m1_unpacked]8` to describe\nunpacked FP4 shared-memory storage. The formatter drops the trailing\n`8`, and the parser then uses its default width of 32 bits:\n\n```text\nBefore:\n  (code\u003d131, bits\u003d8, lanes\u003d1)\n    -\u003e \"custom[float4_e2m1_unpacked]\"\n    -\u003e (code\u003d131, bits\u003d32, lanes\u003d1)\n\nAfter:\n  (code\u003d131, bits\u003d8, lanes\u003d1)\n    -\u003e \"custom[float4_e2m1_unpacked]8\"\n    -\u003e (code\u003d131, bits\u003d8, lanes\u003d1)\n```\n\nInclude custom type codes in the condition that emits the bit-width\nsuffix, matching the existing parser\u0027s `custom[name]\u003cbits\u003e` syntax."
    },
    {
      "commit": "2cb94ecf730d8e404d4845047328d6dcef80e4fa",
      "tree": "bd6d36db9ac211026b47a29b1449ad7e28ae232e",
      "parents": [
        "11cba7d743d1af966b5b25356275ab458802b6a6"
      ],
      "author": {
        "name": "Lei Wang",
        "email": "34334180+LeiWang1999@users.noreply.github.com",
        "time": "Wed Nov 04 20:10:38 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 07:10:38 2026 -0500"
      },
      "message": "[FIX] Use DLPack v1 dtype mapping for Torch allocation (#914)\n\nThe Torch addon\u0027s `ManagedTensorAllocator` still calls PyTorch\u0027s\n`at::toScalarType`, while tensor import already uses the addon\u0027s\n`toScalarTypeForDLPackv1`. In PyTorch 2.8, the former does not recognize\nthe FP8 DLPack codes, so allocating an FP8 output fails with\n`Unsupported code` even though the addon can import tensors of that\ndtype.\n\nUse the existing DLPack v1 mapper for output allocation as well.\nOrdinary scalar types retain their mappings, and the allocator can use\nthe FP8 and packed FP4 mappings already supported by the addon.\n\nAlso keep the ordinary `lanes \u003d\u003d 1` check active on older PyTorch\nversions. It is currently enclosed in a PyTorch 2.8+ guard, so switching\nthe allocator to this helper alone would allow inputs such as `float32`\nwith `lanes\u003d2` to be silently treated as scalar `float32` on PyTorch\n2.4–2.7. Remove that outer guard; the FP4 enum comparison uses the\nbundled DLPack header, while the branch referencing PyTorch\u0027s packed FP4\ntype remains version-gated and checks `bits\u003d4, lanes\u003d2`.\n\nExisting cached addon binaries need to be rebuilt to pick up this\nchange."
    },
    {
      "commit": "11cba7d743d1af966b5b25356275ab458802b6a6",
      "tree": "cd59faa2dd1bf869d80fdb202abcc0f4be91a022",
      "parents": [
        "91bdef278f449fe48265b6cf9802edbd94b8dd69"
      ],
      "author": {
        "name": "Lei Wang",
        "email": "34334180+LeiWang1999@users.noreply.github.com",
        "time": "Wed Nov 04 20:09:48 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 04 07:09:48 2026 -0500"
      },
      "message": "[FIX] Invalidate Torch addon cache when generator changes (#915)\n\nThe JIT cache for the Torch C DLPack addon is keyed by the Torch build,\ndevice, and C++ ABI, but does not include the packaged generator.\nUpdating `_build_optional_torch_c_dlpack.py` can therefore reuse a\npreviously compiled addon and leave changes to its C++ code or build\nlogic unapplied.\n\nInclude the first eight hex digits of the generator\u0027s SHA-256 in the\ncached library name. A changed generator selects a new cache entry and\nrecompiles the addon; identical contents continue to reuse the cached\nbinary. This lets addon fixes take effect after an FFI upgrade without\nmanually clearing the cache.\n\nThe native Torch and externally installed addon paths keep their\nexisting behavior. Old cache files are retained, and the first JIT load\nwith the new naming scheme rebuilds the addon once."
    },
    {
      "commit": "91bdef278f449fe48265b6cf9802edbd94b8dd69",
      "tree": "f5be1954ddf5fb6d9f18d5a5f3a570b426093c86",
      "parents": [
        "c52a017882549b1f7530db5e549242537180e8ed"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 22:29:17 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 22:29:17 2026 -0500"
      },
      "message": "[DOC][Rust] Add Matching and Dispatch to the Rust guide (#911)\n\nIntroduce `match_any!` and `#[dispatch]` in the Rust guide on their own,\nright before Structural Walk and Visit, so the traversal sections build\non them instead of re-explaining the dispatch contract.\n\n- **Rust-first wording**: explains the Rust API directly instead of by\ncomparison with C++, and links the APIs it introduces to the Rust\nreference.\n- **Any and AnyView, Object and ObjectRef**: examples use built-in\nvalues and `Array`/`ArrayObj` instead of a custom `rs_object` pair,\nwhich now first appears in Defining Object Types from Their Fields.\nRestores the named managed reference explanation (newtype around\n`ObjectArc\u003cT\u003e`).\n- **Matching and Dispatch** (new): Matching Types explains `match_any!`\narms; Dispatching builds a small `describe` dispatcher with\n`#[dispatch]`, shows the simplified `match_any!` and `Dispatcher` code\nit generates, and states the rule that a handler takes the matched value\nplus a leading prefix of the remaining arguments.\n- **Structural Walk and Visit**: the dispatch contract paragraph now\npoints back to Dispatching.\n- **Converting Borrowed Values into `Any`**: uses the guide\u0027s own\n`PointObj`.\n- **Installation**: `pip install apache-tvm-ffi`, with the editable\ninstall noted for source checkouts; crates.io version 0.1.15.\n- **`def_object_ref!` docs**: the `rs_object` link now points at the\nattribute macro, fixing rustdoc\u0027s ambiguous-link warning (in the\nproc-macro crate the name is both a function and an attribute macro)."
    },
    {
      "commit": "c52a017882549b1f7530db5e549242537180e8ed",
      "tree": "1edbdcc16930edc240d8351197401ec6a4739f58",
      "parents": [
        "41c433790bfec09d8b63f7d2c6e07927bc245835"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 22:28:35 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 22:28:35 2026 -0500"
      },
      "message": "[Rust] Preserve object-range facts in Any conversions (#910)\n\nPreserve the known object-type range when Rust converts object\nreferences into Any/AnyView and reconstructs object rvalues. Document\nthe live-object invariants and expose them to the optimizer with\n`core::hint::assert_unchecked`, allowing redundant round-trip range\nchecks to disappear while retaining generic input validation."
    },
    {
      "commit": "41c433790bfec09d8b63f7d2c6e07927bc245835",
      "tree": "ae7824742777ecdcc0231da51a64391ccece1c62",
      "parents": [
        "5eb6b37838ab8d98fdc1cd26c31113d601513ca5"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 22:12:46 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 22:12:46 2026 -0500"
      },
      "message": "[EXTRA][Rust] Make structural visiting generic over its native base (#907)\n\nMake `StructuralVisitEngine\u003cBase \u003d StructuralVisitorObj\u003e` use the\nselected native base for initialization, type identity and default\ntraversal. The shared engine owns runtime allocation, callback dispatch,\nrecursive dispatcher reborrows and owning result handling; existing\nordinary visitor entry points keep their behavior.\n\nAdd the unsafe `StructuralVisitorBase` contract and a one-pointer\ngeneric visitor view for downstream native state. Prefix-only ordinary\nfallback and hook helpers recurse through the installed vtable, so\nlarger bases do not depend on the ordinary engine\u0027s dispatcher offset.\nBorrowed bases cannot safely become owning visitor handles, and\nnative-mutated fields use interior mutability.\n\nExpose borrowed ABI access and one unsafe raw hook entry point so\ndownstream visitor bases can call registered hooks without another\nadapter."
    },
    {
      "commit": "5eb6b37838ab8d98fdc1cd26c31113d601513ca5",
      "tree": "572596451e098e2963362c661c761f5231d9a702",
      "parents": [
        "e6d897d172b450502668291032af33f34f6e20f4"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 21:48:39 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 21:48:39 2026 -0500"
      },
      "message": "[DOC] Convert Markdown guides to rst and drop MyST (#909)\n\nThis simplifies the docs dependencies by dropping MyST (myst-parser and\nits linkify-it-py dependency), and unifies the docs on one format:\nreStructuredText, which the rest of the docs already use. Only the\ncompiler integration, C++, Python and Rust guides were still Markdown.\n\nChanges:\n\n- Convert `docs/guides/compiler_integration`, `cpp_lang_guide`,\n`python_lang_guide` and `rust_lang_guide` from Markdown to rst without\nchanging their text. MyST roles, `note`/`seealso` directives, tables and\nlinks become their rst equivalents. The `cpp-guide` and\n`python-argument-conversion-protocols` anchors that other pages\nreference are kept as explicit labels.\n- Point the guides toctree in `docs/index.rst` at the `.rst` files.\n- Remove `myst_parser`, the `myst_*` settings and the `.md` source\nsuffix from `docs/conf.py`.\n- Remove `myst-parser` and `linkify-it-py` from the `docs` dependency\ngroup.\n\n`docs/README.md` stays Markdown; it is GitHub-facing and is not part of\nthe Sphinx build."
    },
    {
      "commit": "e6d897d172b450502668291032af33f34f6e20f4",
      "tree": "5a60c14969904b48d2064f20a153a48eb9271210",
      "parents": [
        "afa8dce89705e844457899b42e3d0f69da8c5c03"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 21:46:04 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 21:46:04 2026 -0500"
      },
      "message": "[REFACTOR][Rust] Clarify structural traversal utilities and initialization (#906)\n\nAdd a public `ColdInitLazyLock` that shares the initialized check and\noutlined initialization path. Use it for structural traversal columns,\nruntime type indices and cached global functions, keeping Once setup\noutside hot callers where the compiler preserves the outline boundary.\n\nKeep outlined errors alongside their traversals and share flat\nraw-carrier comparison and result-conversion utilities. Fold the\nsingle-use ownership fast path into its conversion caller, use direct\ncarrier access for trivial conversions, and document ownership, native\nABI transport and performance-sensitive implementation choices."
    },
    {
      "commit": "afa8dce89705e844457899b42e3d0f69da8c5c03",
      "tree": "df861ad45341e2aee29698fc21be03d46dbec55e",
      "parents": [
        "1a584402d9782f6d2dfd47f30e95643fc79f15f7"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Tue Nov 03 21:38:03 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 21:38:03 2026 -0500"
      },
      "message": "[Rust] Rename `rs_class` to `rs_object` (#908)\n\n## Summary\n\nThis PR renames the attribute macro that defines an object type in Rust\nfrom `#[rs_class]` to\n`#[rs_object]`. The behavior and the arguments are unchanged:\n\n```rust\nuse tvm_ffi::object::ObjectRef;\nuse tvm_ffi::{def_object_ref, rs_object, Object};\n\n#[rs_object(\"my.Point\")]\npub struct PointObj {\n    base: Object,\n    pub x: i64,\n    pub label: tvm_ffi::String,\n}\n\ndef_object_ref!(pub Point, ObjectRef, PointObj);\n```"
    },
    {
      "commit": "1a584402d9782f6d2dfd47f30e95643fc79f15f7",
      "tree": "0fd62523d2ab4d4c16938f3072b959ab7665678d",
      "parents": [
        "9c834dadb9d575be3818758f371d143720a1602a"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 19:19:23 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 19:19:23 2026 -0500"
      },
      "message": "[PERF][Rust] Streamline structural traversal checks and dispatch (#904)\n\nUse the compile-time depth-zero `Object` root contract to avoid\nredundant ancestry checks while preserving primitive rejection and\nnon-root checks. Outline checked Error conversion and capture mutation\nregion state only in reflected fallback.\n\nRoute structural walking and mapping through native Dispatcher while\nretaining closure/tuple adapters and explicit mapper conversion and\nreuse. Share type-key diagnostics and name mutation error context\nexplicitly.\n\nStore remapped values directly under retained object keys, acquiring a\nkey reference only on first insertion and releasing keys during\nclear/destruction. Terminal destruction releases keys directly before\nnormal value and table destruction, while reusable clear preserves\ncapacity. Keep the opaque public remap API. Use InplaceMode consistently\nfor mutation permission while preserving all uniqueness checks and\nshared-input restrictions; mark invalid identity branches cold.\n\nOrganize traversal contracts, private utilities, engine implementations\nand public entrypoints. Document ownership, parameters, private\nABI/unwind boundaries and outlining decisions, and add argument\ndescriptions and examples for the four public traversal APIs."
    },
    {
      "commit": "9c834dadb9d575be3818758f371d143720a1602a",
      "tree": "067a5f9f427f4d4bc1ec1680aa90b80cb66c15b7",
      "parents": [
        "6e6127aa9b5af082083d7a2366875f2ae40ca992"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 16:22:50 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 16:22:50 2026 -0500"
      },
      "message": "[PERF][Rust] Keep structural traversal fast paths in registers (#903)\n\nKeep structural traversal results as owning `TVMFFIAny` carriers along\nnative visitor and mutation paths, with `_raw` helpers and outlined\nreflected, packed, and error handling. Construct slow-path aggregate\narguments inside those helpers and use private `C-unwind` return\nboundaries so the AArch64 C convention can return the raw pair in\nregisters while preserving Rust cleanup. Keep lazy initialization\nscratch inside outlined slow paths while ready loads stay inline.\nPreserve public ABI, dispatcher guards, copy-on-write permission,\nremapping, and error/interrupt ownership.\n\nAlways-inline lightweight internal traversal adapters and\nownership-transfer/drop wrappers while leaving generic one-shot public\nentrypoints to compiler heuristics. Move visit context annotation into\n`StructuralVisitEngine::with_visit_context_raw` and name the owning\nresult conversion `visit_result_from_any`.\n\nUse `core::hint::cold_path()` directly at uncommon branches. This\nrequires Rust 1.95 or newer."
    },
    {
      "commit": "6e6127aa9b5af082083d7a2366875f2ae40ca992",
      "tree": "b7e22e9527c562284e9f0c8e951feb3d777156ec",
      "parents": [
        "490a1641cd52c64a6911de500b75f5255142e72e"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 14:13:25 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 14:13:25 2026 -0500"
      },
      "message": "[Rust] Simplify structural traversal engines (#902)\n\nSimplify structural visiting and mutation around one recursion core per\nengine, with walk and map callbacks layered above them. Each view holds\na runtime handle, and the engines own native hooks, reflected descent,\ndefinition regions and dispatcher callbacks. The visitor engine holds\nits native base and active dispatcher borrow; the mutation engine\nadditionally stores its existing variable remap directly after the\ndispatcher.\n\nUse `Dispatcher` directly and share owned/borrowed input conversion\nthrough `extra::marker::{Owned, Borrowed}`. Remove custom\nvisitor/mutator Base composition, offset metadata and duplicate\ndriver/storage adapters while preserving mutation permissions,\ncopy-on-write, remapping and ordered callback behavior.\n\n`VisitInterruptObj` and `VisitInterrupt` carry the same owning object\nthrough native and typed returns. `VisitInterrupt::with` and shared\npayload reads remain; payload-only struct literals and moving or\nreplacing `.value` are no longer supported. Traversal callbacks report\nfailures through `Result` and must not panic; a panic reaching a\nnon-unwinding native callback boundary aborts."
    },
    {
      "commit": "490a1641cd52c64a6911de500b75f5255142e72e",
      "tree": "d127efd591489ba315893c959d19f0e72ae1e95e",
      "parents": [
        "29c7495aa52e138f25578abf22d23f1cf41146d4"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 12:39:06 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 12:39:06 2026 -0500"
      },
      "message": "[Rust] Simplify structural traversal engines and adapters (#901)\n\nThis is primarily a readability and simplification cleanup.\n\nWalk and map own their APIs, callback adapters and Dispatcher bridges in\ndedicated modules. Generic dispatch stays in dispatch.rs, while visitor\nand mutator modules group the hook ABI, engine state and traversal\nimplementation. Existing crate-root and visitor/mutator module exports\nremain available.\n\nBoth engines use ObjectArc ownership with the concrete payload layout\nand destructor, including borrowed dispatchers and custom bases. Visitor\nrecursion carries owning Any outcomes under the\nNone/VisitInterrupt/Error protocol, with typed conversion at public\nboundaries. LazyLock stores required registry columns while absent\nper-type hooks retain their normal fallback. Helper conversion details\nfollow the public-facing implementations, and traversal coverage uses\npublic entry points."
    },
    {
      "commit": "29c7495aa52e138f25578abf22d23f1cf41146d4",
      "tree": "7c58e2d41e02143eb31de9fde4db8d41c6d0ce2c",
      "parents": [
        "b0a048e4d510febff28f1ecea102716516c5b952"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 10:02:57 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 10:02:57 2026 -0500"
      },
      "message": "[FEAT][Rust] Declare dispatch arguments and return types explicitly (#900)\n\nMake the dispatch input tuple and return type explicit with\n`#[dispatch(prefix, args_as_tuple, ret)]`. The declared contract\nreplaces longest-handler signature deduction while preserving typed\nfirst-argument matching and handlers that consume an initial argument\nprefix.\n\nConvert the first matched handler\u0027s result through standard `Into\u003cRet\u003e`\nbefore wrapping it in `Some`; outer `None` continues to mean no match.\nPreserve borrowed results, shared generic bounds, aliases, and\nconditional impls, and migrate the existing call sites and API\ndocumentation."
    },
    {
      "commit": "b0a048e4d510febff28f1ecea102716516c5b952",
      "tree": "3cf75670fbe18a6bc82dfcf62a49bf3203f215f0",
      "parents": [
        "f135303be857de59a3acac84abb0dc85c192c0ca"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Tue Nov 03 07:34:28 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 03 07:34:28 2026 -0500"
      },
      "message": "[FEAT][Rust] Unify runtime dispatch and scoped structural views (#893)\n\nGenerate source-ordered runtime dispatch through ordinary `match_any!`\nin an inline inherent `dispatch(value, ...)` method. `Dispatcher\u003cArgs,\nRet\u003e::dispatch_tuple` unpacks and forwards to it, preserving complete\n`Option\u003cR\u003e` outcomes, borrowed results and compatible trailing\narguments.\n\nKeep traversal state in scoped runtime engines with thin visitor and\nmutator views. The `visit`/`default_visit` and `mutate`/`default_mutate`\npairs reborrow the current dispatcher. Mutation accepts inputs\nconvertible to typed or untyped `MutationView` and preserves\n`Result\u003cUnchangedOr\u003cAny\u003e\u003e`. Concrete Base implementations can customize\ndefault descent; generic definition-region scopes retain restoration,\nhooks and remapping. Remove the separate policy interfaces and adapters.\n\nCarry mutation permission in each capability, with downgrade-only\npermission and live uniqueness checks. Exclusive `\u0026mut Any` borrows\nprovide non-owning capabilities. Typed capabilities dereference to\nshared nodes, `downcast_ref` supports dynamic inspection, and\n`field(|node| \u0026node.a)` exclusively borrows direct owning fields for\nrecursive mutation. Field projection preserves the parent ownership\nrequirement and does not grant parent-field writeback.\n\nAccept borrowed object nodes through ordinary `Into\u003cAnyView\u003e` without\nacquiring ownership, preserving their dynamic type and lifetime. Remove\ncached `current()` and runtime permission state, restrict whole-object\nmutable access and raw builtin construction, and reject unmanaged object\nheaders at the borrowed conversion boundary."
    },
    {
      "commit": "f135303be857de59a3acac84abb0dc85c192c0ca",
      "tree": "73cbc56fcbeb43d85280a7824309a186dea52983",
      "parents": [
        "18afa9c8ac90467b635171d208000ef5992471e4"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Mon Nov 02 20:58:34 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 02 20:58:34 2026 -0500"
      },
      "message": "[Rust] Extend match_any with scalars and typed mutation views (#899)\n\nMatch payloads in `Any`, `AnyView`, object references and `MutationView`\nwith explicit result types: `Type(value)`, borrowed `NodeObj(ref node)`,\nand `MutationView\u003cType\u003e(capability)`. Inputs are taken by value once;\nuse `\u0026value` to retain the owner.\n\nTyped arms match strict runtime categories and preserve stored numeric\nvalues, with ordinary Rust aliases, qualified types, guards and an\nordered fallback. Ordinary `Map\u003cK, V\u003e` arms are supported; typed\nmutation capabilities containing Maps remain outside the supported\nscope."
    },
    {
      "commit": "18afa9c8ac90467b635171d208000ef5992471e4",
      "tree": "eee195a2b8f2afb52924ba6c249d7bf47ec4b726",
      "parents": [
        "3380316d02864ff51513a5edd353b6d1f2e86d40"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Mon Nov 02 17:16:15 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 02 17:16:15 2026 -0500"
      },
      "message": "[FIX] Construct small moved strings and bytes inline (#898)\n\nUse inline storage when constructing `String` or `Bytes` from a small\n`std::string` rvalue. Share the existing small-value capacity check and\nretain the moved heap representation for larger inputs.\n\nExisting externally supplied heap objects retain their representation."
    },
    {
      "commit": "3380316d02864ff51513a5edd353b6d1f2e86d40",
      "tree": "e7882a30235966f37df028ebe979ad4b9b3bf185",
      "parents": [
        "b80178f4dde2f05b1eed4817d8af3bf0d87d35eb"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Mon Nov 02 09:55:46 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 02 09:55:46 2026 -0500"
      },
      "message": "[Rust] Add borrowed matching and rename MutationView (#896)\n\nRename the non-owning mutation capability to MutationView and its erased\ninspection accessor to as_any_view, preserving the capability-bounded\nborrow.\n\nAdd borrowed object-node patterns such as AddObj(ref node) to match_any.\nOrdered matching uses conditional fallthrough with guard cleanup;\neligible final borrowed and mixed owning arms use exact-type lookup and\ndirect selected-arm conversion without acquiring ownership for borrowed\nnodes."
    },
    {
      "commit": "b80178f4dde2f05b1eed4817d8af3bf0d87d35eb",
      "tree": "5c5d836aa9b89db52cb0d1dc6bcc2c43d2006fae",
      "parents": [
        "ba02eadd5779a8c58c76e1a1086a370de7d0d0ff"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 01 21:48:03 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 01 21:48:03 2026 -0500"
      },
      "message": "[REFACTOR][Rust] Unify mutation capabilities and context names (#894)\n\nUse one mode-carrying `MutationValue` for low-level structural mutation,\ntyped callbacks and policies. Consuming handles preserve inspection\nborrow bounds, combine stored and requested permissions, and retain the\nuniqueness checks needed for copy-on-write.\n\nRename the related interfaces to `MutationContext`,\n`MutationContextPolicy` and `DefaultMutationContextPolicy`, with\nmatching exports, macro handling and guide examples. Keep `Mutator`,\ndispatch/callback APIs and map-policy composition unchanged. A small\npermission helper exposes constant-mode checks to inlining."
    },
    {
      "commit": "ba02eadd5779a8c58c76e1a1086a370de7d0d0ff",
      "tree": "a50ba7eb5ff64e3e22d881ac8d21e83909186025",
      "parents": [
        "455bf7bff825c06c1c41bd248567e56c43da65d1"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 01 20:07:49 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 01 20:07:49 2026 -0500"
      },
      "message": "[Rust] Use AnyView in structural traversal callbacks (#892)\n\nReplace the Rust structural traversal view with `AnyView`, using\nby-value views for visitor, walker, mapper, and mutator callbacks. Reuse\n`downcast_ref` and `try_as` for typed access while keeping owning\nextraction explicit.\n\nKeep mutation permissions in consuming capabilities with self-bounded\nviews, and update dispatch, policies, examples, and documentation to the\ncommon view API."
    },
    {
      "commit": "455bf7bff825c06c1c41bd248567e56c43da65d1",
      "tree": "1c82841cc90df7d6149ffeb752ef4d313d18b74f",
      "parents": [
        "69be48a2931505255733bfc5a18d6e0e5cc1a033"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Nov 01 20:07:38 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 01 20:07:38 2026 -0500"
      },
      "message": "[FEAT][Rust] Add object downcast_ref to Any, AnyView and managed references (#891)\n\nAdd `downcast_ref\u003cT: ObjectCore\u003e() -\u003e Option\u003c\u0026T\u003e` to Any, AnyView and\nmanaged object references for inheritance-aware borrowed access without\nacquiring another strong reference. The Rust guide explains object\nhandles and dynamically typed values in separate sections using\nMyPairObj examples."
    },
    {
      "commit": "69be48a2931505255733bfc5a18d6e0e5cc1a033",
      "tree": "78a48ae2e9694de969b6290a7aa1f5eff7725228",
      "parents": [
        "1cfa5f7c0e940e2173f1d4583cec7c00136a4626"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Oct 31 13:33:26 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Oct 31 13:33:26 2026 -0400"
      },
      "message": "[FEAT] Enrich structural traversal errors through root type hooks (#889)"
    },
    {
      "commit": "1cfa5f7c0e940e2173f1d4583cec7c00136a4626",
      "tree": "9ed1be6a116abd1a5dcfaf79362e973d782268a8",
      "parents": [
        "e9fdc58fa4bf2e60ed701dacac48a01e41a3dc1f"
      ],
      "author": {
        "name": "Tom Fogal",
        "email": "60981+tfogal@users.noreply.github.com",
        "time": "Fri Oct 30 09:17:35 2026 -0700"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Oct 30 12:17:35 2026 -0400"
      },
      "message": "Constrain Optional\u0027s constructors for C++20 (#887)\n\nOptional\u003cT\u003e\u0027s non-template std::optional\u003cT\u003e constructor makes copying an\nOptional consider std::optional\u003cT\u003e\u0027s converting constructor from\nOptional. The standard constrains that constructor on whether T is\nconstructible from Optional\u003cT\u003e. For types with an explicit Any\nconstructor (e.g. VisitInterrupt), that check routes back through the\nOptional copy constructor, so the constraint depends on itself.\nImplementations are not required to accept such a constraint, and Clang\nrejects it, so structural_visit.cc and structural_mutate.cc fail to\nbuild in C++20.\n\nAccept only std::optional sources via a constrained template, in all\nthree Optional specializations. This removes the dependency cycle\nwithout relying on any particular standard library\u0027s behavior.\n\nCo-Authored-By: Claude"
    },
    {
      "commit": "e9fdc58fa4bf2e60ed701dacac48a01e41a3dc1f",
      "tree": "7063f784bcd2af3b27af2bc371ac6a01ad92d0ec",
      "parents": [
        "277e7b452bafd77fa6725cd47f3937409208b43b"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Wed Oct 28 22:23:44 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Oct 28 22:23:44 2026 -0400"
      },
      "message": "[FEAT][Rust] Replace rs_class placeholders with an UnsafeInit creator (#886)\n\n## Summary\n\napache/tvm-ffi#884 made a creator of an `rs_class` type start the object\nfrom `tvm_ffi::Placeholder`\nvalues: a Rust reference is never null, so a Rust object cannot start\nempty as a C++ one does. That\nneeds a placeholder for the parent\u0027s object and for every field type,\nbuilds a whole placeholder\nobject for each reference field, and still leaves each downstream\nproject to register `__ffi_new__`\nand call `ffi._RegisterFFIInit` itself.\n\nThis PR removes `Placeholder` and the `placeholder` flag, and implements\nC++ `UnsafeInit` in Rust\ninstead, without calling into C++ for it. Every `#[rs_class]` type now\nregisters a creator, as\n`refl::ObjectDef` registers `ObjectCreatorUnsafeInit\u003cT\u003e`. The creator\nallocates the object zeroed\nand leaves its fields undefined for reflection to set. From it the type\nregisters `__ffi_new__` and,\nunless the type defines its own, the `__ffi_init__` that\n`ffi._RegisterFFIInit` generates. A type\nneeds no per-type code:\n\n```rust\nuse tvm_ffi::object::ObjectRef;\nuse tvm_ffi::{def_object_ref, rs_class, Object};\n\n#[rs_class(\"my.Point\")]\npub struct PointObj {\n    base: Object,\n    pub x: i64,\n    pub label: tvm_ffi::String,\n}\n\ndef_object_ref!(pub Point, ObjectRef, PointObj);\n```\n\n```python\n@tvm_ffi.register_object(\"my.Point\")\nclass Point(tvm_ffi.Object):\n    pass\n\npoint \u003d Point(1, \"p\")  # the generated `__ffi_init__`\njson \u003d tvm_ffi.serialization.to_json_graph_str(point)\nback \u003d tvm_ffi.serialization.from_json_graph_str(json)  # the creator\n```"
    },
    {
      "commit": "277e7b452bafd77fa6725cd47f3937409208b43b",
      "tree": "034ee7120aa4deb8cbbd9a8cb5aa821f6c5073ac",
      "parents": [
        "d31d34e10378d0e3a0948d760f98466a2e8d27d7"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Wed Oct 28 19:33:20 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Oct 28 19:33:20 2026 -0400"
      },
      "message": "[FEAT][Rust] Generate placeholders of rs_class objects with `placeholder` (#884)\n\nReflection builds some objects field by field: a JSON graph read back,\nand the `__ffi_init__`\nthat `ffi._RegisterFFIInit` generates both make an empty object with the\ntype\u0027s creator, then set\neach field. A C++ type gets its creator from `refl::ObjectDef`, whose\nobject can start empty\nbecause its references may be null; a Python `py_class` allocates zeroed\nmemory. A Rust object\ncannot start empty, since its references are never null, so a downstream\nproject that registers a\ncreator (`__ffi_new__`) for an `rs_class` type has to make the object\nfrom valid placeholder\nvalues, which reflection then overwrites.\n\nTVM TIRx does this to let Python construct, JSON graphs hold, and\nTVMScript parse the IR types an\nextension defines in Rust. It carries its own `Placeholder` trait for\nit, and every type writes\nthe same impl by hand:\n\n```rust\nimpl Placeholder for PairTypeObj {\n    fn placeholder() -\u003e Self {\n        Self::new(TypeObj::placeholder(), Type::placeholder(), Type::placeholder())\n    }\n}\n```\n\nThe impl only repeats the struct: the parent\u0027s placeholder, then each\nfield\u0027s, in order. This PR\nadds the trait here as `tvm_ffi::Placeholder` and lets `#[rs_class]`\nwrite the impl when asked:\n\n```rust\nuse tvm_ffi::object::ObjectRef;\nuse tvm_ffi::{def_object_ref, rs_class, Object, Placeholder};\n\n#[rs_class(\"my.Point\", placeholder)]\npub struct PointObj {\n    base: Object,\n    pub x: i64,\n    pub label: tvm_ffi::String,\n}\n\ndef_object_ref!(pub Point, ObjectRef, PointObj);\n\nlet point \u003d Point::from(PointObj::placeholder());\nassert_eq!((point.x, point.label.as_str()), (0, \"\"));\n```\n\nSigned-off-by: Yuchuan \u003cyuchuan.7streams@gmail.com\u003e"
    },
    {
      "commit": "d31d34e10378d0e3a0948d760f98466a2e8d27d7",
      "tree": "474a97b4163bea340ce60b3170f5f4cc75a4de5d",
      "parents": [
        "1a2e530fa68f5a251e3dea8b24d2a7ba19614a14"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Wed Oct 28 16:47:56 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Oct 28 16:47:56 2026 -0400"
      },
      "message": "[TEST][Rust] Run the tests of each binary on one thread (#885)\n\nThe TVM FFI runtime does not guard its type and global function tables\nagainst readers on other threads, and the Rust tests register types and\nglobals on first use. With the default parallel test harness, a test\nthat registers a type can race another test reading the table, as in the\nmacOS failure on #884:\n\n```\nException caught during TVMFFIGetTypeInfo:\nCheck failed: (entry !\u003d nullptr) is false: Cannot find type info for type_index\u003d173\nerror: test failed, to rerun pass `-p tvm-ffi --test test_object_reflection`\n```\n\nThere `test_duplicate_method_names_fail_the_registration` registers\n`DuplicateMethodObj` (it cannot be pre-registered, since its\nregistration panics) while\n`test_cpp_structural_equality_and_hash_see_reflected_fields` reads the\ntype table through `ffi.StructuralEqual`.\n\nThis adds `rust/.cargo/config.toml`, which sets `RUST_TEST_THREADS\u003d1`,\nso the tests of each binary run one at a time, in CI and locally alike.\nTests that spawn threads on purpose, such as\n`test_registration_from_threads`, are unaffected. The `register_types()`\npre-registration helpers can be dropped in a follow-up.\n\nTested: `cargo test` in `rust/` passes (33 binaries, 361 tests), and the\ntest processes see `RUST_TEST_THREADS\u003d1`."
    },
    {
      "commit": "1a2e530fa68f5a251e3dea8b24d2a7ba19614a14",
      "tree": "8b30319f3f079f40a582804207ab835976b87275",
      "parents": [
        "7c2488d18b4374d121bf63a79ca651fdcf65afcb"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Tue Oct 27 20:33:20 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Oct 27 20:33:20 2026 -0400"
      },
      "message": "[FEAT][Rust] Let a static_init_block! end without Ok(()) (#883)\n\n## Summary\n\nThe body of a `tvm_ffi::static_init_block!` (#882) was the body of a\nclosure that returns\n`Result\u003c()\u003e`, so every block ended in an `Ok(())` that carried no\ninformation:\n\n```rust\ntvm_ffi::static_init_block! {\n    Function::register_global_typed(\"my_ext.add_one\", add_one, \"Add one to an integer.\")?;\n    Ok(())\n}\n```\n\nThis PR lets a block end without it, as C++ `TVM_FFI_STATIC_INIT_BLOCK`\ndoes:\n\n```rust\ntvm_ffi::static_init_block! {\n    Function::register_global_typed(\"my_ext.add_one\", add_one, \"Add one to an integer.\")?;\n}\n```"
    },
    {
      "commit": "7c2488d18b4374d121bf63a79ca651fdcf65afcb",
      "tree": "8939a166a98fe62510f8c450ab03ca6b61661358",
      "parents": [
        "ded7531f1bbc5b43da7929f155ac890bfe31d82a"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Tue Oct 27 17:14:39 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Oct 27 17:14:39 2026 -0400"
      },
      "message": "[FEAT][Rust] Add static_init_block! in Rust (#882)\n\n## Summary\n\nRust has had no counterpart to C++ `TVM_FFI_STATIC_INIT_BLOCK`: code\nthat runs when the program\nor library that holds it loads, to register what the library defines. A\ncrate built as a `cdylib`\nfor Python to load (an operator library, a library of object types)\nneeds one, and TVM TIRx has\ncarried its own, as the hidden `__register_block!` behind its\n`register_ops!` and\n`register_types!`. This PR moves that machinery here as the generic\n`tvm_ffi::static_init_block!`,\nso downstream macros become thin wrappers over it:\n\n```rust\nuse tvm_ffi::{Function, Result};\n\nfn add_one(x: i64) -\u003e Result\u003ci64\u003e {\n    Ok(x + 1)\n}\n\ntvm_ffi::static_init_block! {\n    Function::register_global_typed(\"my_ext.add_one\", add_one, \"Add one to an integer.\")?;\n    Ok(())\n}\n\n// Registered when the program or library loaded.\nlet add_one \u003d Function::get_global(\"my_ext.add_one\")?;\n```\n\nThe body is a block that returns `Result\u003c()\u003e`, so it registers in order\nand stops at its first\nerror. A library exports `tvm_ffi::run_static_init_blocks` (with\n`tvm_ffi_dll_export_typed_func!`) for its loader to re-raise the errors\nof the blocks that failed,\nwhich cannot reach a caller when the library loads."
    },
    {
      "commit": "ded7531f1bbc5b43da7929f155ac890bfe31d82a",
      "tree": "f615ba4b5d804896707138fa8cc1b03c8ed02162",
      "parents": [
        "ad6fc94765b39d2e27b360d0cd0a1cac23231fdf"
      ],
      "author": {
        "name": "Gabriel Wu",
        "email": "13583761+lucifer1004@users.noreply.github.com",
        "time": "Tue Oct 27 10:02:21 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Oct 26 22:02:21 2026 -0400"
      },
      "message": "[FEAT][Rust] Register fields and methods of object types defined in Rust (#834)\n\n## Summary\n\nSince this PR was opened, #859 and #869 landed the field side of Rust\nobject reflection\n(`#[reflect]` fields, `rs_class`). The branch is now rebased on `main`\nafter #832 and narrowed\nto what `main` still lacks: one commit, f4907aa.\n\nA `#[type_register]` type registers its `#[reflect]` fields, but not its\nmethods, so Python saw\na Rust object without methods; and every field registered an empty doc\nstring. This PR\nregisters both, as C++ `refl::ObjectDef\u003cT\u003e().def(...)` and `def_ro(\"x\",\n\u0026T::x, \"doc\")` do:\n\n```rust\nuse tvm_ffi::derive::{Object, ObjectRef};\nuse tvm_ffi::reflection::ObjectDef;\nuse tvm_ffi::{Object, ObjectArc, Result};\n\n#[repr(C)]\n#[derive(Object)]\n#[type_key \u003d \"my.Point\"]\n#[type_register]\n#[type_reflection(PointObj::reflect_methods)]\npub struct PointObj {\n    base: Object,\n    /// The x coordinate.\n    #[reflect]\n    pub x: i64,\n    #[reflect(writable, doc \u003d \"The y coordinate.\")]\n    pub y: i64,\n    #[reflect(name \u003d \"label\")]\n    pub name: tvm_ffi::String,\n}\n\nimpl PointObj {\n    fn reflect_methods(def: \u0026mut ObjectDef\u003cSelf\u003e) {\n        def.def(\"norm1\", |p: Point| -\u003e Result\u003ci64\u003e { Ok(p.data.x.abs() + p.data.y.abs()) }, \"The L1 norm.\")\n            .def_static(\"origin\", || -\u003e Result\u003cPoint\u003e { Ok(origin()) }, \"The origin.\");\n    }\n}\n```\n---------\n\nCo-authored-by: Yuchuan \u003cyuchuan.7streams@gmail.com\u003e"
    },
    {
      "commit": "ad6fc94765b39d2e27b360d0cd0a1cac23231fdf",
      "tree": "e38d90b454d6fd11ded8c9a60482bcc14d1b86ae",
      "parents": [
        "51341adc9a0c4c0de329852e24d57b1587b0e0c6"
      ],
      "author": {
        "name": "Gabriel Wu",
        "email": "13583761+lucifer1004@users.noreply.github.com",
        "time": "Tue Oct 27 03:45:50 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Oct 26 15:45:50 2026 -0400"
      },
      "message": "[FEAT][Rust] Record type schemas and doc strings of exported functions (#832)\n\n- **Type schemas.** `AnyCompatible::type_schema()` mirrors C++\n`TypeTraits\u003cT\u003e::TypeSchema`. Its default is `{\"type\":\"\u003ctype_str\u003e\"}`,\nwhich is right for object references and for most builtins, whose type\nstring is their type key. `Option`, `Array`, `Map`, `BigInt`,\n`Unchanged` and `UnchangedOr` override it to write theirs as C++ does.\n`RValueRef`, `Any` and `AnyView` have their schemas as parameters or\nreturn types.\n- **Function schemas.** `AsPackedCallable::type_schema()` gives a typed\nfunction\u0027s schema,\n`{\"type\":\"ffi.Function\",\"named_args\":{\"return\":[...],\"params\":[...]}}`,\nas C++ `FunctionInfo::TypeSchema` writes it. A callable whose signature\nthe crate cannot see, such as a downstream `AsPackedCallable` impl for a\npacked function, keeps the default method, which returns the untyped\nschema that `def_packed` records. Existing impls keep compiling.\n- **Exports, behind a feature.** The new `export-metadata` cargo feature\nis the counterpart of C++ `TVM_FFI_DLL_EXPORT_INCLUDE_METADATA`, and\nlike it is off by default. With the feature,\n`tvm_ffi_dll_export_typed_func!` also exports\n`__tvm_ffi__metadata_\u003cname\u003e`, and the new\n`tvm_ffi_dll_export_typed_func_doc!(name, \"doc\")` exports\n`__tvm_ffi__doc_\u003cname\u003e`, like `TVM_FFI_DLL_EXPORT_TYPED_FUNC_DOC`.\nWithout the feature, the export is unchanged and the doc macro exports\nnothing, as in C++; it still checks that the doc string is a string\nconstant. A `#[cfg]` emitted by a `macro_rules!` expansion would test\nthe features of the calling crate, so the export macros call hidden\nhelper macros that tvm-ffi defines twice, once per state of its own\nfeature. As in C++, both getters return a string that the runtime\nallocates (`TVMFFIStringFromByteArray`), so it outlives the library.\n- **Globals, always.** `Function::register_global_typed(name, func,\ndoc)` registers a typed function with its schema and doc string, like\n`GlobalDef().def`. `Function::register_global` now records the untyped\nschema, like `def_packed`. Both register through\n`TVMFFIFunctionSetGlobalFromMethodInfo`, which tvm-ffi-sys now binds.\n- **Byte-identical JSON.** The metadata escapes the schema string with\nthe runtime\u0027s JSON writer (`ffi.json.Stringify`), which uses the same\n`EscapeStringJSON` as the C++ macros. The Rust metadata therefore\nmatches the C++ metadata byte for byte, and Rust needs no JSON escaper\nof its own.\n- **Docs and CI.** The Rust guide documents typed globals, exports and\nthe feature. CI\u0027s Rust step also runs `cargo test -p tvm-ffi --features\nexport-metadata`, so the export tests run.\n\n**API note:** a typed closure passed to `Function::from_typed` (and now\nto the export macro) needs a return type with a schema. That means an\n`AnyCompatible` type, `Any` or `AnyView`, which covers every return type\nthe crate converts today. Before, any type with `From\u003cOut\u003e for Any` was\naccepted.\n---------\n\nCo-authored-by: Yuchuan \u003cyuchuan.7streams@gmail.com\u003e"
    },
    {
      "commit": "51341adc9a0c4c0de329852e24d57b1587b0e0c6",
      "tree": "fe58b81754e750a0db9b8ba92da6936815e6fa95",
      "parents": [
        "628a8b64e997f2c3e300899c4340819ab78bc35a"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Mon Oct 26 23:38:40 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Oct 26 11:38:40 2026 -0400"
      },
      "message": "[FIX][ORCJIT] Discard CRT callbacks after failed ARM64 links (#880)\n\nAn ARM64 COFF object with CRT callback sections and an unresolved symbol\ncan crash during module teardown. RuntimeDyld frees the failed object\u0027s\nmemory, but the addon previously retained indirect\nconstructor/destructor slots into that memory.\n\nStage CRT entries per object until `NotifyEmitted` confirms successful\nlinking. The object\u0027s memory manager discards staged entries on failure,\nbefore releasing their memory. Keep staging records separate when\nobject-buffer addresses are reused.\n\nAdd native Windows ARM64 regressions for clang-cl and MSVC. Each\nrepeatedly fails materialization, unloads the failed module without\ncallbacks, and then verifies constructor/destructor ordering on a valid\nmodule using the same session.\n\nValidation:\n- Reproduced the original ARM64 COFF crash in the C++ harness against\n`mlc-llvm-static\u003d\u003d23.1.1.post0`; the fix leaves zero stale callbacks and\nexits successfully.\n- The same harness still executes the native ARM64 COFF fixtures,\nimported host calls, arithmetic, CRT ordering, null/sentinel slots, and\nteardown successfully.\n- macOS ARM64: built and repaired the wheel against the exact\n`23.1.1.post0` SDK, installed it with the published\n`apache-tvm-ffi\u003d\u003d0.1.15.post1` core in an isolated environment without\nthe LLVM SDK, and passed **136 tests, 57 skipped**, plus both C and C++\nquick-start examples.\n- Pre-commit checks pass.\n- Native Windows ARM64: **107 passed, 51 skipped**, including the new\nfailed-materialization regressions for both clang-cl and MSVC; the C\nquick-start passes. [Validation\nrun](https://github.com/cyx-6/tvm-ffi/actions/runs/40341249761).\n- Linux ARM64: **178 passed, 15 skipped**; Linux x86-64: **180 passed,\n13 skipped**. C and C++ quick-start examples pass on both. [Remaining\nplatform validation\nrun](https://github.com/cyx-6/tvm-ffi/actions/runs/40341882212) also\nbuilds Windows AMD64 and macOS ARM64 wheels.\n- Windows AMD64: **82 passed, 42 skipped**; the C quick-start passes.\nAll four remote platform jobs have passed; the macOS CI job is still\nqueued, with local native wheel validation completed above.\n\nThe fork validation commits change only the CI workflow; addon and core\nsources are identical to this PR.\n\nAll five candidate wheels are built and saved with SHA-256 checksums.\nWheel metadata declares only the TVM FFI core as a runtime dependency;\nLLVM remains statically linked.\n\nThe ORCJIT 0.1.3 publishing run was cancelled before PyPI upload so this\nfix can be included in the release. No LLVM SDK rebuild is needed."
    },
    {
      "commit": "628a8b64e997f2c3e300899c4340819ab78bc35a",
      "tree": "75711df0be1aa350bdbd27127b0e5c0079cda546",
      "parents": [
        "90cae8eb3eb16d18afc5effe86644076b167eef9"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Mon Oct 26 21:47:59 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Oct 26 09:47:59 2026 -0400"
      },
      "message": "[FEAT][ORCJIT] Add native Windows ARM64 wheels (#879)\n\nPrepare ORC JIT 0.1.3 with native Windows ARM64 wheels, using the\npublished `mlc-llvm-static\u003d\u003d23.1.1.post0` SDK. Add\n`windows-11-vs2026-arm` / `cp312-win_arm64` to both CI and the release\nmatrix, activate native Visual Studio tools, and explicitly target ARM64\nwhen compiling clang-cl test objects.\n\nLLVM 23.1.1 JITLink only implements COFF/x86-64 and rejects ARM64\nobjects. Use `RTDyldObjectLinkingLayer` on Windows ARM64, preserving\nORC\u0027s module isolation and the addon\u0027s `.CRT$XC*` / `.CRT$XT*` lifecycle\nhandling. RuntimeDyld supplies ARM64 relocations, DLL-import slots and\nlong-branch stubs; the DLL generator resolves base symbols to host\naddresses. LLVM-facing C++ code follows `LLVM_ENABLE_RTTI` from the SDK\nto avoid unresolved base-class typeinfo. Keep lifecycle slots indirect\nuntil relocation finishes, and ignore null/sentinel boundary slots.\nWindows continues to support C objects only.\n\nValidation:\n- macOS ARM64 editable build against the exact `23.1.1.post0` SDK\nsucceeds; ORC JIT tests: 136 passed, 55 skipped.\n- C and C++ quick-start examples pass.\n- All pre-commit hooks for changed files pass; cibuildwheel selects\n`cp312-win_arm64`.\n- A local C++ harness cross-compiled an ARM64 COFF object and executed\nit through the new RTDyld adapter on macOS ARM64, checking direct host\ncalls, DLL-import slots, constructor/destructor ordering, null/sentinel\nentries and teardown. This does not replace native Windows validation.\n- Native Windows ARM64 validation: **105 passed, 51 skipped**; the C\nquick-start passes. Both MSVC and clang-cl produce and execute ARM64\nCOFF objects; constructor/destructor and process-shutdown tests pass.\nBuilt `apache_tvm_ffi_orcjit-0.1.3-py3-none-win_arm64.whl` (11.2 MB).\n[Upstream native Windows ARM64\nCI](https://github.com/apache/tvm-ffi/actions/runs/40298238458/job/121496554907)\npasses on the PR commit. An [independent native validation run on the\nfork](https://github.com/cyx-6/tvm-ffi/actions/runs/40299903473) also\npasses with the same addon/core sources.\n\nReview status: all CI checks pass, including ORC JIT wheel builds/tests\non Windows ARM64, Windows AMD64, Linux ARM64, Linux x86-64, and macOS\nARM64, plus lint, documentation, and the core test jobs.\n\nThis PR prepares the release; it does not create a tag or publish to\nPyPI."
    },
    {
      "commit": "90cae8eb3eb16d18afc5effe86644076b167eef9",
      "tree": "5713e6871f4e23fb151c552873559b22d9fd917c",
      "parents": [
        "59a1f8fe6f667f6ac4cb2a783681bf348115eeb8"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Oct 25 18:35:13 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Oct 25 18:35:13 2026 -0400"
      },
      "message": "[BUILD][ORCJIT] Discard unused sections and embedded archive debug data (#878)\n\nCollect unused code and data sections when linking the ORCJIT addon on\nELF platforms. Strip debug information from a build-directory copy of\nthe Linux ORC runtime archive before embedding it, with dependencies\nthat regenerate the copy when its source changes.\n\nPreserve the installed SDK, explicit exports, RTTI and exception\nhandling."
    },
    {
      "commit": "59a1f8fe6f667f6ac4cb2a783681bf348115eeb8",
      "tree": "e34743070aed5c1fd5069ab40c96a3b0e2165a5f",
      "parents": [
        "dbdcdaceeef5b0b03251e8dea87725a1c1e2cde6"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Mon Oct 26 01:26:28 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Oct 25 13:26:28 2026 -0400"
      },
      "message": "[BUILD][ORCJIT] Use the PyPI LLVM static SDK (#877)\n\nORC JIT builds currently download an LLVM release tarball on Linux and\ninstall LLVM through Conda on macOS/Windows. Use the published\n`mlc-llvm-static\u003d\u003d23.1.1` SDK as the build dependency across the\nexisting platform matrix.\n\n- Discover the SDK with the build environment\u0027s Python and link LLVM\u0027s\nexported CMake targets. Their transitive dependencies supply static\nzlib/zstd and platform system libraries, replacing the manual\n`llvm-config` queries, library searches, and linker-flag filtering.\n- Require the packaged SDK directly, with its native profile. External\nLLVM installations and build-time `LLVM_PREFIX`, `LLVM_DIR`, and\n`ORC_RT_PATH` overrides are no longer supported. Linux builds embed the\nmatching SDK `liborc_rt` and fail if it is absent. Runtime\ncustom-archive arguments remain supported.\n- Clear old system-zlib discovery results so incremental builds also\nlink the SDK\u0027s static zlib. Require CMake 3.24+, which supports\n`ZLIB_USE_STATIC_LIBS`.\n- Remove the release download, mount, cache, Conda setup, and obsolete\nmacOS libc++ fixup. The shared wheel action installs the SDK from PyPI,\nbuilds/tests against the in-tree core, installs Clang separately in\nmanylinux, and uses the SDK\u0027s macOS 14 deployment floor.\n- Update the source-build instructions and custom-runtime tests to use\nthe packaged SDK. Use the Apache-approved cibuildwheel v4.2.1 pin\nalready used by core wheel builds.\n\nThe native SDK supplies the backend used by ORC JIT;\n`mlc-llvm-static-extra-targets` is unnecessary. LLVM/zlib/zstd remain\nstatically linked. The SDK is a build dependency, with no new runtime\ndependency in the addon wheel.\n\nValidation of the simplified CMake setup on macOS arm64:\n\n- Clean isolated wheel build from declared PyPI build dependencies:\n`apache_tvm_ffi_orcjit-0.1.2-py3-none-macosx_14_0_arm64.whl`.\n- Incremental build against the current in-tree core, including\nmigration from the old cached system-zlib lookup: **136 passed, 54\nskipped** in the full addon suite under pytest-xdist.\n- C and C++ quick-start examples passed.\n- `otool -L` shows only TVM-FFI and system C/C++ runtimes, with no\ndynamic LLVM/zlib/zstd.\n- SDK paths containing spaces configure and build successfully; a\nmissing SDK fails configuration immediately.\n- All applicable repository pre-commit hooks and `git diff --check`\npassed.\n\nThe [upstream CI run for the SDK-only imported-target\nimplementation](https://github.com/apache/tvm-ffi/actions/runs/40203992826)\npasses all four ORC JIT wheel jobs, including their examples:\n\n| Platform | Addon tests |\n| --- | --- |\n| Linux x86_64 | 180 passed, 10 skipped |\n| Linux aarch64 | 178 passed, 12 skipped |\n| macOS arm64 | 136 passed, 54 skipped |\n| Windows AMD64 | 82 passed, 39 skipped |\n\nLocal uv builds use a package-specific cutoff override for the SDK\nbecause it was published within the repository\u0027s 14-day `exclude-newer`\nwindow.\n\nAI assistance: This change was prepared with OpenAI Codex."
    },
    {
      "commit": "dbdcdaceeef5b0b03251e8dea87725a1c1e2cde6",
      "tree": "bd421bc5985a32e7c2ea8edfb37f06725f5c8568",
      "parents": [
        "2c55d9fb97c1c25382b7379b3677ef4e01634bf7"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sun Oct 25 09:55:09 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Oct 25 21:55:09 2026 +0800"
      },
      "message": "[FEAT] Add independent fallback controls to private library lookup (#876)\n\nAdd independent keyword-only `use_fallback_build_path\u003dTrue` and\n`use_env_path\u003dTrue` controls to `_find_library_by_basename`. Package\nmetadata and explicit extra directories remain active; the default\ncandidate list and search order are unchanged.\n\nKeep `_resolve_and_validate` and `_find_library_by_basename` private\nwith their existing Path-only input contracts. The finder returns Path\nand raises RuntimeError when no library is found. Document both helpers\u0027\nparameters, predicate results, search order, and error behavior while\nretaining their original locations in the module."
    },
    {
      "commit": "2c55d9fb97c1c25382b7379b3677ef4e01634bf7",
      "tree": "f82ffae8970fc87338448d3ed23f23fb58af6f5e",
      "parents": [
        "4a3f097a2bb25fe89da1900b671c056de8fc909b"
      ],
      "author": {
        "name": "Yaxing Cai",
        "email": "caiyaxing666@gmail.com",
        "time": "Sun Oct 25 21:30:43 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Oct 25 09:30:43 2026 -0400"
      },
      "message": "[CI] Update PyPI publishing action to ASF-approved v1.14.3 (#875)\n\nThe v0.1.15-post1 publish run [failed before starting any\njobs](https://github.com/apache/tvm-ffi/actions/runs/40177792078)\nbecause ASF removed the pinned PyPI publishing action v1.13.0 from its\nallowlist on October 25.\n\nUpdate the three PyPI publishing workflows to v1.14.3\n(`7245906fb61fa33a13554f9d5fb856fe61758086`), which is present in the\n[current ASF\nallowlist](https://github.com/apache/infrastructure-actions/blob/main/approved_patterns.yml).\nOIDC publishing and attestations remain enabled.\n\nValidation: all applicable repository pre-commit hooks passed for the\nthree changed workflows; `git diff --check` passed; verified the pin\nagainst the signed upstream v1.14.3 tag.\n\nAfter merging, dispatch `publish_wheel.yml` from `main` with\n`tag\u003dv0.1.15-post1` so the corrected workflow builds the existing\nrelease tag.\n\nAI assistance: this change was prepared and validated with OpenAI Codex."
    },
    {
      "commit": "4a3f097a2bb25fe89da1900b671c056de8fc909b",
      "tree": "970190b172ec6caaebabb35fd57f6d7a050cee5d",
      "parents": [
        "97e4877f53a788c148fd9eb7475f7a1d4c331a82"
      ],
      "author": {
        "name": "LingYi",
        "email": "lingyi01525@gmail.com",
        "time": "Sun Oct 25 02:46:07 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Oct 24 14:46:07 2026 -0400"
      },
      "message": "[FIX] Preserve namedtuple fields when unpacking dataclasses (#867)\n\n`unpack_dataclass_to_tuple` rebuilds tuples from a single iterable.\nNamed tuples take one positional argument per field: multi-field values\nraise `TypeError`, while single-field values silently receive the\ngenerator instead of their original value.\n\nHandle named tuples separately, preserving their type and recursively\nunpacking their fields without copying leaf objects. The regression\ntests cover empty, single-field and multi-field values, both namedtuple\nAPIs, and nested values through the cached dataclass unpacker. Follow-up\nto #563.\n\nValidation on Windows / Python 3.12:\n\n- All five new cases fail with the unchanged main implementation; 17\nfocused tests pass after the fix (`test_unpack_dataclass.py` and\n`test_kwargs_wrapper.py`).\n- The exact worktree utility sources were tested with the\n`apache-tvm-ffi\u003d\u003d0.1.15.post0` binary wheel as the package runtime. I\ndid not rebuild the native extension or run the full C++/Python/Rust\nsuites.\n- Ruff lint/format, focused ty checks, ASF headers, file types and `git\ndiff --check` pass."
    },
    {
      "commit": "97e4877f53a788c148fd9eb7475f7a1d4c331a82",
      "tree": "bd44bc812dd14d3d535205c7dede0551f4190da7",
      "parents": [
        "830f2ebac90928f1375c882601599aa4e4fd3116"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Sat Oct 24 14:32:57 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Oct 24 14:32:57 2026 -0400"
      },
      "message": "[BUILD] Enable MSVC inline COMDAT elimination (#874)\n\nEnable `/Zc:inline` in the shared MSVC target helper to avoid emitting\nunreferenced inline COMDAT definitions and their associated object\nrecords.\n\nApply the option privately to C and C++ compilation. Preserve the\nexisting `MSVC_FLAGS OFF` opt-out and keep the option out of CUDA\ncompilation and downstream link interfaces."
    },
    {
      "commit": "830f2ebac90928f1375c882601599aa4e4fd3116",
      "tree": "6eaa666974043476aaae3a8ba09bfa315057b9d2",
      "parents": [
        "1a2f94238f3259e729bdd18f1b0e6144b6988323"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Fri Oct 23 21:21:09 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Oct 23 21:21:09 2026 -0400"
      },
      "message": "[CORE] Use singular detail for internal C++ namespaces and headers (#872)\n\nAlign internal C++ naming with the common singular `detail` convention\nused by C++ projects. Rename the internal namespaces and three\n`*_details.h` headers, updating includes, guards, qualified references,\ngenerated C++ code, documentation filters, and backtrace filtering\nconsistently.\n\nRetain temporary `details` namespace aliases for existing qualified\nsource uses, with removal TODOs for downstream migration.\n\nPlace the extra dtype traits in `tvm::ffi` alongside the other C++ APIs,\nusing the common base header and its compatibility alias."
    },
    {
      "commit": "1a2f94238f3259e729bdd18f1b0e6144b6988323",
      "tree": "746021af10d777c0d3e0aad9afc35b328c9bf711",
      "parents": [
        "8fd93039ff332d6262d1f6a47f626b6f91a84080"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Fri Oct 23 20:47:36 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Oct 23 20:47:36 2026 -0400"
      },
      "message": "[TEST] Fix the main test failures after #869 and #861 (#871)\n\n## Summary\n\nFix the two test failures of `main` after #869 and #861 merged.\n\n- **`test_rs_class`** segfaults now and then\n\n([39880320266](https://github.com/apache/tvm-ffi/actions/runs/39880320266/job/120252443676)).\nSame race as #862: `#[rs_class]` types register on first use, so a test\nregistering one grows `type_table_` while another test reads it through\n`TVMFFIGetTypeInfo`. As in #862, `register_types()` now registers every\ntype\n  of the file once, behind a `std::sync::Once`, before each test.\n- **`test_cli_check_ignores_how_a_binding_is_spelled`** fails on every\nrun\n\n([39880346684](https://github.com/apache/tvm-ffi/actions/runs/39880346684/job/120252471634)).\n#869 made the generated `\u003cLeaf\u003eObj::new` of a non-final type `pub`, but\n#861, written before it, still looks for `pub(crate) fn new(`. The test\nnow\n  looks for `pub fn new(`."
    },
    {
      "commit": "8fd93039ff332d6262d1f6a47f626b6f91a84080",
      "tree": "187142439a7bf85e8b584041ea22fed1267ec6f9",
      "parents": [
        "0aef1bf18151f0d0df78f4e9331629bc0c900b2b"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Thu Oct 22 20:48:55 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Oct 22 20:48:55 2026 -0400"
      },
      "message": "[STUBGEN][RUST] Update the check for generated bindings (#861)\n\n## Summary\n\nMake `tvm-ffi-stubgen --target rust --check` report a file as stale only\nwhen\na generated binding would change, not when a run would only respell it.\n\nUntil now `--check` was `--dry-run` plus a byte comparison of the whole\nfile.\nA tvm-ffi release that only changes how the generator spells its output\n(the\n`use` paths, e.g. `super::` to `crate::`, the wrapping of a call, the\nwording\nof a doc comment) made every downstream tree fail the check, though the\nbindings were the same.\n\nWith `--target rust`, a file is now stale when one of these would\nchange:\n\n- a struct field, its type, or the size / alignment assertion\n- the type key, `#[type_final]`, the parent, or an upcast\n- an accessor or allocator signature\n- a builtin stand-in in the import section (it carries `TYPE_DEPTH`)\n- the set of `object/` blocks (a `prefix` roll-out to add one, an\n  unregistered type to remove)\n\nand not when only these would:\n\n- `use` lines: their paths, their order, one more or one fewer\n- comment lines\n- line wrapping and trailing commas\n- the module a path is spelled from (`crate::ir::Expr`,\n  `super::super::ir::Expr` and `Expr` are the same)\n\n## Changes\n\n- `Generator.check_view(code_blocks)` returns what `--check` compares.\nThe\npipeline takes it for each file before the run edits any block (before\nthe\n  `prefix` roll-out), and a file the run changes is stale when its view\n  differs afterwards.\n- `PythonGenerator.check_view` is the whole text, so the Python target\nbehaves\n  as before.\n- `RustGenerator.check_view` maps each `object/` block and the import\nsection\nto its tokens from `check_tokens`, which drops `use` and comment lines,\nmodule qualifiers, and a comma before a closing bracket. An import\nsection\nof `use` lines alone has no entry, so the one a `prefix` roll-out adds\ndoes\n  not count.\n- `docs/packaging/stubgen.rst` and `--help` describe the rule.\n\n## Compatibility\n\n- Python target: unchanged.\n- Rust target: `--check` passes on trees that differ from the generated\ntext\n  only in spelling, and still fails on every change listed above. A run\n  without `--check` still rewrites the file to the exact generated text.\n- Not reported: a field whose type moves to a type of the same name in\nanother\nmodule (`s_tir::FunctionFrame` to `tirx::FunctionFrame`), since that\nchanges\n  only a module path."
    },
    {
      "commit": "0aef1bf18151f0d0df78f4e9331629bc0c900b2b",
      "tree": "aeb0e228bcb8af2a0ee615552482a21d567601f0",
      "parents": [
        "0e51eddf5976ea5b031a82bacfe6a16c6e5fd1eb"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Thu Oct 22 20:48:38 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Oct 22 20:48:38 2026 -0400"
      },
      "message": "[FEAT][RUST] Define object types from a struct of their fields with `rs_class` (#869)\n\nAdd `#[rs_class]` and `def_object_ref!`, which define a new FFI object\ntype in\nRust as C++ does: `#[rs_class]` goes on the object struct, whose first\nfield\n`base` is the parent\u0027s object, and `def_object_ref!(TypeName,\nParentType,\nObjectName)` defines its reference, as C++\n`TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE` does. The type is\nregistered in\nthe FFI type table the way a C++ type with `TVM_FFI_DECLARE_OBJECT_INFO`\nand\n`refl::ObjectDef` is:\n\n- Its type key gets a type index under its parent\u0027s.\n- Every field is registered with its getter, setter, type schema and\nflags.\n\nC++ and Python then handle it like a C++ type:\n\n- C++ code that takes the parent type accepts it.\n- C++ structural equality and hashing, `ffi.ReprPrint` and\n`ffi.DeepCopy`\n  walk its fields.\n- A Python `c_class` for its key gets the fields from the registration.\n\n```rust\nuse tvm_ffi::{def_object_ref, rs_class};\n\n#[rs_class(\"my_ext.PairType\", final)]\npub struct PairTypeNode {\n    base: TypeObj,\n    pub first: Type,\n    pub second: Type,\n    #[reflect(seq_hash_ignore)]\n    pub note: tvm_ffi::String,\n}\n\ndef_object_ref!(pub PairType, Type, PairTypeNode);\n\nimpl PairType {\n    pub fn new(first: impl Into\u003cType\u003e, second: impl Into\u003cType\u003e) -\u003e Self {\n        PairTypeNode::new(TypeObj::new(UNKNOWN_LOC), first, second, \"\").into()\n    }\n}\n\nlet pair \u003d PairType::new(PrimType::int(32), PrimType::float(32));\nlet ty: Type \u003d pair.into(); // an `ir.Type` that C++ sees as `my_ext.PairType`\n```\n\nOn the Rust side, the two macros write what a type defined with\n`derive(Object)` / `derive(ObjectRef)` (#859) otherwise needs by hand:\n\n- `#[rs_class]`: `#[type_register]` and `#[reflect]` on each field,\n`#[repr(C)]`, `Deref` to the parent\u0027s object and `PairTypeNode::new`,\nwhich\n  takes the parent\u0027s object, then the fields\n- `def_object_ref!`: the reference struct, `Deref` to the object,\n  `From\u003cPairTypeNode\u003e` and the conversion into `Type`\n\n`PairTypeNode::new` and the reference\u0027s `new` that `tvm-ffi-stubgen`\ngenerates\ntake a field the same way: a scalar (`bool`, an integer or a float) as\nits own\ntype, and any other field as `impl Into\u003cT\u003e`. A literal infers only from\nan\nexact type: under `impl Into\u003cu64\u003e`, `1` falls back to `i32`, which does\nnot\nconvert into `u64`. The generated `new` thereby also takes a `\u0026str` for\na\n`String` field, a `Span` for an `Option\u003cSpan\u003e` one, and a `PrimType` for\na\n`Type` one, and converts each before it calls the generated\n`\u003cLeaf\u003eObj::new`.\nThat one takes every field as its own type, as a hand-written parent\u0027s\n`new`\n(bound with `ty-map`) does, so it hands the inherited fields on to its\nparent\u0027s as they are, and `.into()` at its call site still names a\ntarget. A\nsubtype defined in Rust builds a generated parent\u0027s object with it.\n\nNeither macro names a type the user did not write. `ParentType` is the\nreference to the parent\u0027s object, `tvm_ffi::object::ObjectRef` for a\ntype under\n`ffi.Object`, and the conversion into it is the existing\n`impl_object_upcast!`.\nA conversion into the reference to a further ancestor is another\n`impl_object_upcast!`, since Rust\u0027s `From` does not chain."
    },
    {
      "commit": "0e51eddf5976ea5b031a82bacfe6a16c6e5fd1eb",
      "tree": "b910fe58b99b874b8cb36e7eae846b49b6208e01",
      "parents": [
        "0c73a2e01ee61ae96ed93e623e4562e0f9ad8468"
      ],
      "author": {
        "name": "Tianqi Chen",
        "email": "tqchen@users.noreply.github.com",
        "time": "Thu Oct 22 18:02:37 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Oct 22 18:02:37 2026 -0400"
      },
      "message": "[FIX] Preserve post-order structural map descent (#866)"
    },
    {
      "commit": "0c73a2e01ee61ae96ed93e623e4562e0f9ad8468",
      "tree": "8d73345ab9a8bde9f479cbade7d4799bda6dda49",
      "parents": [
        "b310f9c88eb89551acc27cbf62bf91ac573e81fa"
      ],
      "author": {
        "name": "Linzhang Li",
        "email": "yuchuan.7streams@gmail.com",
        "time": "Thu Oct 22 15:46:21 2026 -0400"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Oct 22 15:46:21 2026 -0400"
      },
      "message": "[STUBGEN] Rename the custom-new allocator to from_fields (#870)\n\n## Summary\n\nRename the allocator that the Rust stub generator writes for a type\nunder the\n`custom-new` directive from `from_complete_fields` to `from_fields`. The\ndirective leaves the wrapper\u0027s `new` to hand-written code, which usually\nderives some fields and forwards to the generated allocator:\n\n```rust\n// tvm-ffi-stubgen(custom-new): rust_stubgen.IntPair\n\nimpl IntPair {\n    pub fn new(a: i64, b: i64) -\u003e Self {\n        let kind \u003d if a \u003c\u003d b { PairKind::Ordered } else { PairKind::Unordered };\n        Self::from_fields(a, b, kind)\n    }\n}\n```\n\nTypes without the directive still get `new`, and `\u003cName\u003eObj::new` is\nunchanged."
    }
  ],
  "next": "b310f9c88eb89551acc27cbf62bf91ac573e81fa"
}
