Skip to content

docs: explain how to build emitted C - #2212

Open
flipcyde101 wants to merge 1 commit into
bendlang:mainfrom
flipcyde101:work/document-emitted-c-2195
Open

flipcyde101 wants to merge 1 commit into
bendlang:mainfrom
flipcyde101:work/document-emitted-c-2195

Conversation

@flipcyde101

Copy link
Copy Markdown

Closes #2195.

The README now explains how to compile the C emitted by bend -o file.c, add the platform and GPU flags, and link libraries used by foreign C. It also explains how the macOS deployment target and architecture flags affect portability.

Verification

  • bun gates/repo.ts passed 56 of 56 checks with ttok==0.3. The README is 3,816 tokens against its 4,000-token cap.
  • Emitted and ran a small CPU program with -std=c11 -O3 -lpthread -lm on Ubuntu using a Clang 20.1.2 frontend. It printed the expected message.
  • Emitted a second program whose foreign C calls a function from a separate static archive. Linked the archive by path and verified the binary printed 42.
  • Checked the macOS, X11, ALSA, and GPU flag descriptions against the current CLI and emitter. Those platform-specific examples were source-checked only.

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.

Guide: how to build the C that -o file.c emits

1 participant