Skip to content

Make the editor's Lean helpers available to VIR - #11

Merged
FawadHa1der merged 1 commit into
FawadHa1der:mainfrom
ejgallego:fix/editor-reference-bodies
Nov 4, 2026
Merged

FawadHa1der merged 1 commit into
FawadHa1der:mainfrom
ejgallego:fix/editor-reference-bodies

Conversation

@ejgallego

@ejgallego ejgallego commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The editor has three fast C helpers: one reads a pixel, one writes a pixel, and one updates a histogram. Each also has a Lean implementation.

VIR cannot use these C implementations. It needs the Lean versions, but those are currently hidden from files that import the editor. This adds @[expose] to make the three Lean definitions available. Native and compiled Wasm builds keep using the existing C code.

This prepares the helpers for VIR. Connecting the editor to VIR will be a separate change.

All 612 editor checks and 522 kit checks pass. A separate importing file can now access all three Lean definitions, and VIR can compile them as fallbacks.

Make get32, set32 and histAdd available as Lean definitions after ordinary imports so alternate backends can explicitly select their reference implementations. Preserve the existing inline C implementations.

Co-Authored-By: Codex <noreply@openai.com>
@ejgallego ejgallego changed the title Editor: expose Lean bodies of inline C helpers Make the editor's Lean helpers available to VIR Oct 29, 2026
@FawadHa1der
FawadHa1der merged commit 36c77d8 into FawadHa1der:main Nov 4, 2026
3 checks passed
@FawadHa1der

Copy link
Copy Markdown
Owner

Thank you for the PRs @ejgallego

@ejgallego

Copy link
Copy Markdown
Contributor Author

Thank you!

@ejgallego
ejgallego deleted the fix/editor-reference-bodies branch November 4, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants