Skip to content

fix: resolve #13200 — Cranelift: JITMemoryProvider cannot be implemented because JITMemoryKind is private#13517

Open
chinhkrb113 wants to merge 1 commit into
bytecodealliance:mainfrom
chinhkrb113:improve/quality/re-export-jitmemorykind-from-the-crate-r
Open

fix: resolve #13200 — Cranelift: JITMemoryProvider cannot be implemented because JITMemoryKind is private#13517
chinhkrb113 wants to merge 1 commit into
bytecodealliance:mainfrom
chinhkrb113:improve/quality/re-export-jitmemorykind-from-the-crate-r

Conversation

@chinhkrb113
Copy link
Copy Markdown

Summary

Making JITMemoryKind public in memory.rs is not sufficient if it is not re-exported from the crate root alongside JITMemoryProvider and the other memory-related public items. Downstream users import these symbols from cranelift_jit::..., so the type needs to be reachable through the same path used for JITMemoryProvider

Fixes #13200

Changes

  • cranelift/jit/src/lib.rs

Why

cranelift/jit/src/lib.rs: Making JITMemoryKind public in memory.rs is not sufficient if it is not re-exported from the crate root alongside JITMemoryProvider and the other memory-related public items. Downstream users import these symbols from cranelift_jit::..., so the type needs to be reachable through the same path used for JITMemoryProvider.

…nnot be implemented because JITMemoryKind is private

Fixes bytecodealliance#13200

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
@chinhkrb113 chinhkrb113 requested a review from a team as a code owner May 31, 2026 09:42
@chinhkrb113 chinhkrb113 requested review from fitzgen and removed request for a team May 31, 2026 09:42
@github-actions github-actions Bot added the cranelift Issues related to the Cranelift code generator label May 31, 2026
@fitzgen
Copy link
Copy Markdown
Member

fitzgen commented Jun 1, 2026

Thanks, but it looks like you didn't run tests because there are compile errors:

https://github.com/bytecodealliance/wasmtime/actions/runs/26709191286/job/78716123018?pr=13517#step:23:322

   Compiling cranelift-jit v0.133.0 (/home/runner/work/wasmtime/wasmtime/cranelift/jit)
error: missing documentation for an enum
  --> cranelift/jit/src/memory/mod.rs:19:1
   |
19 | pub enum JITMemoryKind {
   | ^^^^^^^^^^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> cranelift/jit/src/lib.rs:6:9
   |
 6 | #![deny(missing_docs, unreachable_pub)]
   |         ^^^^^^^^^^^^

error: could not compile `cranelift-jit` (lib) due to 1 previous error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cranelift: JITMemoryProvider cannot be implemented because JITMemoryKind is private

2 participants