Programming guides for beginner...
Any comments are welcomed....
I hope it helps!!! Thanks for drop by...
Showing posts with label dev-tools. Show all posts
Showing posts with label dev-tools. Show all posts

Friday, July 3, 2026

He Translated All of Rustc to C. So You Can Target a Z180.

A solo developer posted a GitHub repository on 2 July 2026 that contains a working build of the Rust compiler compiled from 46 million lines of C. The repository is FractalFir/crustc, and the working build was produced by cilly, a Rust-to-C compiler backend FractalFir has been writing in private for the last three years. The repository's own README is blunt about what this is: "This is a demo/teaser for my new Rust to C compiler toolchain... This repo just shows the compiler compiling itself, as I believe this is the flashiest showcase I could do." The bootstrap is the flashy part. The reason he wanted to do it in the first place is the part that actually matters. FractalFir wants to compile Rust for a Z180.

The why is a 1985 CPU

The Zilog Z180 is a Z80-compatible microcontroller from 1985 that still ships on modern embedded boards. The SDCC compiler is the only C compiler that targets it. SDCC has been around for thirty years, is the de-facto toolchain for the Z80/Z180/8051 family, and is not LLVM. There is no realistic path to a hosted LLVM Rust toolchain for a Z180. There never has been. The argument Rust-curious embedded engineers have been making for a decade is that, for the long tail of old microcontrollers that only have a C compiler, Rust is structurally locked out.

cilly is a wrapper around rustc that emits C, then hands the C to whatever C compiler you point it at. The toolchain config in the README is the part that makes the design concrete. The triple is sdcc_z180-unknown-none, the executable is /usr/bin/sdcc, the base args are -mz180 --std-c89 -c, and the input_arg_template is {input}. That is a one-target JSON config that says: take Rust source, emit C, hand it to SDCC, target a Z180. From the user's perspective, this looks like defining a target triple and a C compiler; the toolchain does the rest. It is the C backend LLVM never built and probably never will.

The compiler is the demo

crustc is the use case. The repository is 46 million lines of generated C that, when compiled with make -j20 LLVM_LIB_DIR=~/.rustup/toolchains/nightly-2026-06-16-aarch64-unknown-linux-gnu/lib, produces a working rustc. The bootstrap timing is in the README: make -j20 937.98s user 123.77s system 1352% cpu 1:18.48 total — roughly 78 seconds of wall clock at 13.5x parallelism, no optimizations, on the developer's aarch64 workstation (Linux 6.17.0-1021-nvidia, GCC 13.3.0, Ubuntu 24.04). The produced binary is a real rustc:

$ LD_LIBRARY_PATH=~/.rustup/toolchains/nightly-2026-06-16-aarch64-unknown-linux-gnu/lib:./rustc_driver ./rustc/rustc --version
rustc 1.98.0-nightly (c712ea946 2026-06-16)

That rustc is the version the project bootstrapped against (rustup install nightly-2026-06-16 per the README), and it can compile Rust programs once core/alloc/std are built for the new target. The bootstrap order is crustc → build core → build alloc → build std → use it like any other Rust toolchain. The hard part is the first step, and the hard part is done.

What cilly does that rustc_codegen_c did not

FractalFir has been working on this for three years. The README lists public attempts: rustc_codegen_clr, and "a lot of private ones" — fourteen total by his count, with cilly being the fourteenth. The failure mode of the previous attempts is in the README in a single sentence, and that sentence is the technical core of why cilly is different: "The main innovation behind cilly is that it adapts to C compilers."

The mechanism is concrete. cilly generates "witness" programs that probe the target C compiler for what it actually supports. The README includes the simplest example:

/* This compiles if and only if our C compiler supports _Thread_local. */
_Thread_local int KEYWORD_TLS_SUPPORTED;

If the witness compiles, cilly knows the compiler supports thread-local storage and can use it. If it does not, cilly falls back. Same pattern for type sizes, alignments, character encodings, and integer formats. The README: "All type layouts, sizes, alignments, character encodings (ASCII), and integer formats (two's complement) are queried for. With fallbacks, where possible." The hard part of any cross-compiler backend is not the language mapping; it is the assumption space. cilly queries the assumption space at build time and adapts.

The README's "stretch" example is the one that captures the philosophy:

/* This will pass in some C compilers. */
assert(sizeof(float) == sizeof(double));

The point is not that the assertion is right. The point is that the assertion is a probe, and cilly writes the probes, not the user. The C cilly emits is compiler-specific — you cannot take the C generated for ARM64 and run it on RISC-V32, because the C is the result of a particular C compiler's testimony about its own behavior. The output is not portable C. The output is portable Rust, with a C compiler as the substrate.

Network transparency is the structural trick

The part of the README that nobody else is writing about is the network transparency clause. "cilly is network transparent, and can talk to C compilers over TCP (may be extended to weird things like UART if need be). This is a solution to the bootstrap paradox / platforms without C cross compilers. You build a small C server on your Blorbo OS, run rustc on some normal platform like Linux, and let cilly talk over the wire."

This solves a real problem. For a platform that has no Rust compiler and no C cross-compiler, but does have a C compiler running natively, the only way to get a Rust program to run is to drive the native C compiler remotely. The README includes a transcript of this actually working — a "Hello, world!" compiled for Plan 9 from an ARM64 Linux host, with nm output showing a real rust_begin_unwind symbol mangled with the standard Rust scheme. The bootstrap chain is rustc on ARM64 Linux → cilly C output → TCP → Plan 9 SDCC-equivalent → Plan 9 binary. The TCP link is the missing piece in the previous attempts' toolchains.

The architectural shape is the same one that made rustc_codegen_c never go anywhere. The previous attempts assumed a cross compiler — a C compiler running on the host that can produce binaries for the target. The targets that don't have a cross compiler are exactly the targets that need this. The Plan 9 transcript is cilly working through a UART-equivalent in production, not a demo.

Where this is structurally weak

The README is honest about the limits, and the limits are real. The optimization path is the biggest one: "I strongly recommend not enabling optimizations: both because they may break stuff (this is just a demo, and it's... ee... rough around the edges) AND because optimizations take time at this scale. Without opts, my machine builds the project in a few minutes. With opts, expect to choke on some specific larger rust files." A 78-second debug build of rustc is a demonstration. A 78-second optimized build of rustc is what would make this a real product. The demo does not have it yet, and the difference between the two is what the next release has to close.

The ABI compatibility story is partial. "Generated code is mostly ABI compatible with normal rustc compiled code. I say mostly, because on some platforms (like arm64) rustc choose an ABI not representable from C." The specific failure is the sret struct return pointer convention; on most platforms you can synthesize it by passing the out pointer as the first argument, but on ARM64 the registers are different and the C compiler will not cooperate for small structs. There is a footnote-length discussion in the README about which struct sizes break, and the honest answer is "small structs, less than 16 bytes." That is a real portability cost.

The compiler has a known bug that FractalFir openly admits he cannot explain: "For some weird path-canonicalization-reasons, crustc can crash when run in the directory it was built in (repo root, crustc). Works fine in other places." He wrote a self-deprecating "I am confused too" in the README, and that is the right call. The bug is real, the fix is unknown, the release is still useful without it being fixed.

Finally, there is the personal cost. The README is a list of things the developer has had to deal with alongside writing a Rust compiler backend for three years. "I got a job (which means I no longer write code on a laptop with its G & C keys broken, yay!). I got uni (well I am on summer break, but thesis-s don't tend to write themselves). I put my left hand in a blender. The blender won. (Still have all my fingers, just some stitches). I will not elaborate further." Three years, on summer break, with a stitched-up hand, as a side project, written by a real person with a real life. That is what it took to ship a Rust compiler in 46 million lines of C, and that is the part of the README that no press release is going to capture.

The community response is the second-order story

The Hacker News thread for the project, submitted 2 July 2026 by Philpax as item 48768464, was at 321 points and 61 comments as of 3 July 2026 evening UTC+8 (HN Algolia API, per-item endpoint for 48768464 and search-index endpoint for crustc+rustc+c). The most useful signal is in the comments: Tiberium asked about performance ("this can be interesting even for non-porting reasons"). taris2 raised Diverse Double-Compiling as a verification technique (paraphrasing his comment): use crustc to compile the Rust source code and produce a second compiler; then use both that compiler and the official rustc, with deterministic flags, to compile the same Rust source code; the two output binaries should match bit for bit. This is a real, technically valid use of the project, and the fact that someone suggested it within hours of the repo going up is the signal that the audience is the right one.

ronsor picked up on the blender line ("What a shame. I would've read an article about this"), which tells you the community is reading the README, not just the headline. lioeters noticed the iteration count: "Gotta respect the dedication to a niche interest." Cadwhisker linked the landing page in the README — the three-year-old public plan that called out Z80/SDCC support as the goal. The conversation in the thread is about the design.

The structural argument

The argument that "Rust does not support obscure hardware" is the single most-deployed reason engineers pick C over Rust in embedded contexts. The Z180, the 8051, the PIC16, the AVR with a proprietary toolchain, the custom ASIC with a vendor-locked compiler — these are the platforms Rust cannot reach because the LLVM backend is the only one rustc ships, and the LLVM backend is not going to grow a Z180 target because no one at any company cares enough. The argument is structurally valid; "all the interesting embedded targets have LLVM" is the standard Rust-side reply, and it is true for the ARM Cortex-M family and false for the long tail.

cilly does not fix the long tail. It makes the long tail reachable from the Rust side, with a C compiler as the substrate. The C compiler does not have to be LLVM. The C compiler does not have to be modern. The C compiler has to exist. That is a meaningfully different proposal than "we need to port LLVM to every microcontroller" and it is the reason the project has any chance of going anywhere. The README makes the framing explicit: "The primary goal of this is support for old/obscure hardware with no LLVM/GCC support. There are still some systems out there that don't support Rust but support C." The Z180 is the demonstrable target on the landing page. The architecture, applied to every C compiler that exists, is the part that scales.

The cost is a developer willing to spend three years on a niche. FractalFir is the only one. The README's personal paragraph is not a joke; it is the answer to the question "why is this not funded?" The answer is "it is, by one person, on summer break, with a stitched-up hand." That is not a sustainable model. It is the only model that gets to this milestone, and the milestone is what makes the model worth copying.

What this means for you

If you write Rust for a living and you have ever been told "we can't use Rust on this project because the target doesn't have LLVM," this is your counterexample. The target did not get LLVM. The target got cilly and SDCC. The exact same architecture works for any C-compiler-only target. The cost is a build that is 50-100x slower than LLVM and an ABI that is "mostly" compatible. The benefit is Rust on hardware nobody else can put Rust on.

If you maintain a C compiler for a niche target, this is the moment to talk to the cilly author. Every C compiler is now a Rust compiler, with the cilly backend in front. The outreach cost is one email. The engineering cost is testing the witness programs for your compiler's specific behaviors and reporting back. SDCC is the first one wired up, with sdcc_z180-unknown-none as the example target. Your compiler is the next one, if you want to be the next one.

If you do security research, taris2's suggestion on the HN thread is the structural one. Diverse Double-Compiling with a cilly-bootstrapped compiler is now a real option for any platform with a C compiler. The threat model is "what if the official rustc has a backdoor?" and the answer is now "compile rustc itself with cilly, run both compilers on the same source with deterministic flags, and diff the output binaries bit for bit." This is not theoretical. The toolchain is here, the source code is on GitHub, and the taris2 recipe is the only thing between this and a runnable experiment.

If you write embedded firmware in C, the long tail of C-only targets is the queue you have already been working through for years. The cilly work means the queue is about to get a Rust column. The teams that have already shipped a Z180/8051/AVR-in-proprietary-C product are the ones who can show "we already know the platform, we are adding Rust alongside C" — and that is a different conversation to have with management than the teams that are still deciding whether to start a Rust evaluation. The people with the platform knowledge are about to be the bottleneck on the Rust side, and the lead time to develop that knowledge is measured in years.

What to do this week

# 1. Skim the README. The whole design is in the first 200 lines and
#    the 46M-line C is a build artifact, not a code review target.
#    https://github.com/FractalFir/crustc — start there.
#
# 2. Decide which of the four "what this means for you" buckets
#    above applies to you, and act on it. The four buckets are:
#    - You write Rust for a living: this is your counterexample
#      to the "no LLVM, no Rust" argument. Save the link.
#    - You maintain a C compiler: open an issue on the cilly
#      tracker and offer to test your compiler as a substrate.
#    - You do security research: file the DDC idea. The threat
#      model is real, the toolchain is here, the work is doable.
#    - You write embedded firmware in C: this is the deadline.
#      Open a tracking issue for "Rust on <your long-tail target>"
#      and put a date on it.
#
# 3. Try the build, if you have an aarch64 Linux host with ~16GB
#    of RAM and an hour. The deps are GCC, GNU make, and an
#    existing rustup nightly:
rustup install nightly-2026-06-16
git clone https://github.com/FractalFir/crustc
cd crustc
make -j20 LLVM_LIB_DIR=~/.rustup/toolchains/nightly-2026-06-16-aarch64-unknown-linux-gnu/lib
LD_LIBRARY_PATH=~/.rustup/toolchains/nightly-2026-06-16-aarch64-unknown-linux-gnu/lib:./rustc_driver ./rustc/rustc --version
# Expected output: rustc 1.98.0-nightly (c712ea946 2026-06-16)
# If you get that, you have a Rust compiler in 46M lines of C
# running on your machine. Pin that in your memory.
#
# 4. Do not optimize the build. The README is explicit that
#    optimization is broken at this scale right now. The demo
#    is debug-mode, and the product will be debug-mode for a
#    while longer. The fact that 78 seconds of debug build of
#    rustc is a milestone is the point, not the limit.

cilly is a real project, the crustc demo is a real compiler, and the Z180 is a real target. The structural argument against Rust on the long tail of embedded targets has been answered, by one person, on summer break, with a stitched-up hand, as a side project, in three years. The answer is a C backend that adapts to whatever C compiler you have, the cost is performance and a partial ABI story, and the benefit is that the long tail of obscure hardware is no longer off-limits to Rust. The community response on HN is the second-order signal that the audience is the right one. This is the part of the post that is going to read the same in two years.

Related reads

  • Grit Brought Rust-Powered Git Search to AI Agents — Rust as the substrate for developer tools, applied to AI-agent workflows. The same bet Rust made for systems software is the bet cilly is making for compiler backends: the language is the leverage.
  • Speculative KV Coding Hit 4× Lossless Cache Compression — engineering as a niche pursuit that turns into a structural lever. The thesis: the long tail of cache-compression wins is bigger than the one big win, and the long tail of embedded-Rust targets is bigger than the ARM Cortex-M family.

Disclosure

Drafted with AI assistance. Primary source: FractalFir, crustc repository on GitHub (https://github.com/FractalFir/crustc), README verified by direct fetch on 2026-07-03 with curl --compressed. Source for: the 46-million-line C output figure; the cilly toolchain name; the "14th attempt" framing; the witness-program code blocks (TLS probe, sizeof(float) == sizeof(double) assertion); the triple JSON config (sdcc_z180-unknown-none, executable /usr/bin/sdcc, args -mz180 --std-c89 -c); the build timing (make -j20 937.98s user 123.77s system 1352% cpu 1:18.48 total); the resulting rustc --version output (rustc 1.98.0-nightly (c712ea946 2026-06-16)); the toolchain date (rustup install nightly-2026-06-16); the developer's environment (uname -a Linux spark-2773 6.17.0-1021-nvidia #21-Ubuntu SMP PREEMPT_DYNAMIC Wed May 27 19:14:05 UTC 2026 aarch64 aarch64 aarch64 GNU/Linux); the GCC version (GCC: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0); the ABI caveat on ARM64 sret for sub-16-byte structs; the path-canonicalization bug in the build directory; the personal paragraph about the broken G and C keys, the job, the university, and the blender injury (paraphrased from the README; this blog's gloss, not a direct quote); and the "this is a demo/teaser" framing of the repository. The secondary source: Hacker News thread for item 48768464, "crustc: entirety of rustc, translated to C," submitted 2 July 2026 by Philpax, 321 points and 61 comments as of 03 July 2026 evening UTC+8 (count from HN Algolia API, both per-item and search-index endpoints). Source for: the Tiberium performance question, the taris2 Diverse Double-Compiling suggestion (paraphrased; the verbatim comment is "Have you tried Diverse Double-Compiling (DDC) to test if the official rust compiler has a backdoor? Use crustc to compile the rust source code, producing a new compiler. Then use this new compiler and the official rustc binary, both with deterministic flags, to compile the rust source code again. The two outputs should match bit for bit." per HN item 48768889, retrieved via curl --compressed against https://hn.algolia.com/api/v1/items/48768889 on 2026-07-03), the ronsor blender comment, the lioeters "14th attempt" observation, and the Cadwhisker link to the three-year-old landing page. These are HN comment framings, attributed as such. The character count and "the blender won" line in the body are paraphrases of the README's tone, not verbatim quotes. The "321 points and 61 comments" figure is the HN Algolia API count from a curl --compressed fetch on 2026-07-03; HN point counts are moving and the live thread at news.ycombinator.com/item?id=48768464 is the canonical figure.

Sources

  • FractalFir, crustc repository on GitHubhttps://github.com/FractalFir/crustc. The repository's README is the primary source for: the 46-million-line C output figure; the cilly toolchain name and the "14th attempt" framing; the witness-program examples for _Thread_local and sizeof(float) == sizeof(double); the triple JSON config snippet (sdcc_z180-unknown-none with executable: /usr/bin/sdcc, base_args: [-mz180, --std-c89, -c], input_arg_template: ["{input}"]); the build timing on the developer's aarch64 host (make -j20 937.98s user 123.77s system 1352% cpu 1:18.48 total); the resulting --version output (rustc 1.98.0-nightly (c712ea946 2026-06-16)); the developer's workstation info (Linux spark-2773 6.17.0-1021-nvidia); the GCC 13.3.0 / Ubuntu 24.04 toolchain notes; the ABI caveat on ARM64 sret and the under-16-byte-struct exception; the path-canonicalization bug in the build directory ("I am confused too"); the network-transparency-over-TCP and Plan 9 demo transcript (Hello, world! with rust_begin_unwind symbol mangling); the personal paragraph on the broken G and C keys, the new job, university, and blender injury; the "I will not elaborate further" line on the blender; and the "this is a demo/teaser" framing. Verified via curl --compressed against https://raw.githubusercontent.com/FractalFir/crustc/main/README.md on 2026-07-03, returning HTTP 200 with a 4214-byte body that contains the title #crustc-rustc 1.98.0-nightly (c712ea946 2026-06-16), converted to 46 million lines of C. and the full ## What is this? and ## How was this done? and ## Why was this done? sections quoted in the body.
  • Hacker News thread, item 48768464https://news.ycombinator.com/item?id=48768464. Submitted 2 July 2026 by Philpax ("crustc: entirety of rustc, translated to C"), 321 points and 61 comments as of 03 July 2026 evening UTC+8 (count from HN Algolia API, both per-item and search-index endpoints agree on these figures). The body text is the canonical Algolia API response for this item, retrieved 2026-07-03 via curl --compressed against https://hn.algolia.com/api/v1/items/48768464. Source for: the Tiberium "how the performance looks" question, the taris2 Diverse Double-Compiling suggestion (per HN item 48768889, retrieved via curl --compressed against https://hn.algolia.com/api/v1/items/48768889 on 2026-07-03; the verbatim comment is paraphrased in the body — the DDC recipe is "use crustc to compile the rust source code, producing a new compiler, then use this new compiler and the official rustc binary, both with deterministic flags, to compile the rust source code again, and the two outputs should match bit for bit"), the ronsor "What a shame. I would've read an article about this" comment on the blender paragraph, the lioeters "Gotta respect the dedication to a niche interest" comment on the 14-attempt history, and the Cadwhisker link to the three-year-old landing page. These are HN comment framings, attributed as such. The 321/61 figures are the HN Algolia API count from a curl --compressed fetch on 2026-07-03; the live thread at the URL above is the canonical figure for any future reader.
  • Hacker News search API (secondary, for point-count verification)https://hn.algolia.com/api/v1/search?query=crustc+rustc+c&hitsPerPage=5. Returned on 2026-07-03 with HTTP 200; the first hit matches item 48768464 with 321 points and 61 comments, agreeing with the per-item endpoint. The body uses these as the canonical figures; the live HN thread is the fallback for any future reader.

Wednesday, July 1, 2026

Godot Banned AI Code. Maintainers Are Done Subsidizing Slop.

The Godot Foundation, which maintains the open-source game engine behind Slay the Spire 2 and The Case of the Golden Idol (per PC Gamer's coverage of the announcement), has updated its contribution policy to forbid AI-authored code, AI-submitted pull requests, and AI-generated text in human-to-human communication. The Foundation framed the change in unusually direct language: "AI cannot take responsibility, and we can't trust heavy users of AI to understand their code enough to fix it." The line that lands is the part about mentoring. The Foundation says reviewing AI slop is "demoralizing" because the maintainers' feedback is "just being absorbed by a machine and not going towards mentoring a potential future maintainer." This is not a moral panic about AI quality. It is a maintenance-economics statement. Open source has been subsidizing itself on a pipeline of new contributors who learn to maintain by getting their early PRs reviewed. AI slop has crowded that pipeline out, and Godot has decided the cost of waiting for the tools to mature is more than the cost of banning them.

What the policy actually forbids

The Foundation's announcement post lays out four explicit prohibitions, with the first one already enforced as an auto-ban on the GitHub repository:

  • No autonomous AI agent use or vibe coding. The Foundation describes the existing auto-ban as continuing.
  • No use of AI to generate substantial pieces of code. "AI assistance should be limited to menial things (like code completion, regex, or find and replace)." Disclosure is required even for permitted use.
  • No AI-generated text in human-to-human communication — issues, PR descriptions, proposals, comments. "This is a basic principle of respect." Machine translations of human-written text are still acceptable.
  • All PRs must be reviewed and approved by a human before merging — the existing rule, restated explicitly.

The third item is the one most other projects have not yet written down. Slack/Discord AI summaries, ChatGPT-polished issue reports, and LLM-generated PR descriptions are the things that quietly make every maintainer interaction feel like talking to a machine. The Foundation is putting that on the policy page.

The Foundation also added a non-AI-specific gate: new contributors (defined as anyone with three or fewer merged PRs) cannot submit "new features or significant re-factoring" without explicit permission from a maintainer. Bug fixes and documentation come first. The point is to require that new contributors take the time to learn the codebase and build trust before tackling ambitious work. Combined with the AI ban, the policy amounts to a two-pronged defense: it slows down the inflow of low-context, high-volume submissions, and it explicitly routes the remaining inflow into the kind of work that builds future maintainers.

The economic argument underneath the moral one

The part of the post that every other story is going to skip is the maintenance-economic one. The Foundation describes its reviewer pool as "small" and says reviewing PRs is "demanding" and "we can't keep up with everything coming in." The number of open Godot PRs has become a meme inside the community, in the way that GitHub-backlog screenshots of any sufficiently popular repo do. The Foundation's framing of the AI problem is not "the code is bad." It is "the code is fine, the volume is bad, and the volume of the kind of code that trains reviewers is what is collapsing."

This is the same shape as the Fedora AI agent merging bad code story from three weeks ago, but with the failure mode inverted. Fedora's problem was that the agent had been given write access to a real codebase and the merge was wrong in a way the humans downstream couldn't see. Godot's problem is upstream: the PR volume is generated by humans (or agents acting on behalf of humans) who are not investing the time to learn the codebase before contributing, and the maintainers are the ones paying the cost. Both stories end in the same place — a maintainer pipeline that cannot scale linearly with the volume of submissions it receives. AI is the new scaling tax on the attention budget of every maintainer in the world.

The Foundation's "new contributors with three or fewer merged PRs cannot submit new features" gate is the more interesting policy lever, because it operates independently of the AI question. Even if the AI ban disappeared tomorrow, the new-contributor gate would still be there, and it is the part of the policy that directly addresses the maintenance-economics problem. The gate is also a soft version of the same argument that the Norway elementary AI ban made about a different pipeline: that the cost of skipping the human learning step is paid later, by the people who are supposed to be the next generation of maintainers. The Norwegian case was about children; Godot's case is about new open-source contributors. The mechanism is identical — short-term productivity gains that look like a win, that turn out to be a loan on the future of the project.

The AI-slop precedent that led here

Godot is not the first open-source project to draw this line. It is the highest-profile one to do it formally, with a published policy and an explicit auto-ban. The pattern in the months leading up to this announcement reads as a series of warning shots:

  • RPCS3, the popular PS3 emulator, clamped down on AI submissions, telling contributors to "leave behind something useful to humanity when you're gone, instead of peddling slop." (PC Gamer)
  • s&box, the Garry's Mod sequel, launched with creator Garry Newman's permissive AI policy: "I think eventually the slop will just fall to the bottom," he said. "We can't say don't use AI, because we use AI in our coding all the time. It's useful, it's fast." The framing was permissive — trust the community to ignore slop, don't filter at the gate. (PC Gamer)
  • The Fedora AI agent story in June (the Anaconda package that was reverted after an LLM agent merged its own PR with a buggy fix) was the moment "AI agent wrote code that broke the build" became a documented, post-mortem-able category.

What Godot is adding is the policy template. The Foundation's text is going to be copy-pasted, with varying degrees of modification, by other projects over the next quarter. The decision to call out the "AI cannot take responsibility" line is the giveaway that the policy is written to be quoted, not just enforced. It is the most quotable sentence in the AI-and-open-source debate since the npm "Color.js" incident in 2022, and it is going to do the same work.

What Godot is not saying

The Foundation's post is conspicuously quiet on the licensing question. Godot is MIT-licensed, which means anyone can fork it, build a closed-source game on top, and use whatever tooling they want to do it. The Foundation cannot stop a game studio from using Claude Code to build their next Godot project, and they are not trying to. The policy is about contributions to the engine itself, not about downstream use. This is a boundary other open-source projects will have to draw carefully: the line between "we will not accept your AI-generated PR" and "we will not allow our software to be used downstream with AI tools" is the line between a contribution policy and a use policy, and they are different in ways that matter legally. The Godot policy is firmly on the contribution side of that line.

The Foundation is also not saying AI tools are bad for the maintainers themselves. "Menial things" — code completion, regex, find-and-replace — are explicitly fine. The line is at "substantial pieces of code" and at "vibe coding," which the Foundation defines as the workflow where a human submits a PR whose contents they did not write and cannot defend. The policy is hostile to the unaccountable submission, not to the tool. A maintainer using Copilot to write a regex is not the target. A contributor submitting a 500-line PR they cannot explain to a reviewer is.

The third thing the Foundation is not saying is that this is just a code-quality problem. The story of an autonomous agent in production that ran up a $6,531 AWS bill scanning a hobby network nobody asked it to scan is a different shape of the same problem: an agent operating without a human accountability loop did something its operator could not have intended and could not stop. Godot's policy is the contribution-side answer to the same question — what do you do when the bottleneck of trust is no longer the human's hands but the human's understanding? The Foundation's answer is to require that the human who submits the work be the human who understands it. The cost of not requiring that is a maintainer pool that runs out of new entrants, and a contributor pool that runs out of mentors, and an open-source economy that runs out of the people who keep it going.

What this means for you

If you maintain an open-source project:

  • The Godot text is the best starting template you'll find. Adapt the four prohibitions and the new-contributor gate to your own repo, and be explicit that "AI-generated text in issues/PRs" is a separate rule from "AI-generated code." The text rule is the one that will get the most pushback, and it is the one that needs to be the clearest.
  • The new-contributor gate does not require an AI ban to be useful. If you are drowning in new-feature PRs from people who have not yet learned the codebase, the gate is a structural fix that works regardless of how the PRs were written. Three merged PRs is a reasonable threshold; pick yours based on what your reviewers can absorb.
  • Publish the policy in the contribution guide, not just the announcement post. The reason the Godot post is going to be cited is that it is unambiguous. Ambiguous contribution policies get argued about on every PR.

If you are an AI-using developer who contributes to open source:

  • "Use AI for menial things" is more permissive than it sounds. It covers most of what most people actually use Copilot/Cursor/Claude Code for: function signatures, regex, boilerplate, refactor-mechanical-tasks. The thing it does not cover is the workflow where you prompt an agent, get a 500-line PR, and submit it without being able to defend each section in a code review. The test is not "did a model help?" It is "can you walk the maintainer through it?"
  • If you are using an agent to submit a PR, write the PR description yourself. Machine translations of human text are explicitly fine; machine-generated text in human-to-human communication is not. The Foundation is making a sharp distinction between "the model wrote the code" and "the model wrote the words we say to each other about the code," and the second is the one that breaks the mentoring relationship.
  • Disclosure is the new courtesy. "I used AI to help write this regex" is a sentence that costs nothing and protects the maintainer's time. "I used AI to generate the whole function" with no disclosure is the kind of thing that gets the next Godot policy written in the first place.

If you are a maintainer of a private codebase at work:

  • The Godot policy is the canary, not the rule. Private repos are not the AI-slop-pressure target the way open source is, because the review pool is paid and the volume is bounded. But the mentoring argument applies. If the people you are training to be senior engineers next year are doing their work this year by submitting LLM-generated code they cannot defend, you are spending 2026's mentoring budget on 2027's productivity cliff. The lever is the same: the test is not "did a model help?" It is "can they walk you through it?"

What to do this week

# 1. Audit the last 20 pull requests on your repo. For each one, ask:
#    - Did the contributor write a PR description in their own words,
#      or did it read like ChatGPT output?
#    - When you left a review comment, did the next reply engage with
#      the substance of your feedback, or did it read like an LLM
#      smoothing the conversation?
#    - Could the contributor explain the change in 5 minutes on a call?
#    Count the "no" answers. If more than half are "no", your pipeline
#    is already paying the Godot tax.

# 2. Write a one-paragraph contribution policy. The Godot template is:
#
#    "We do not accept AI-authored code, AI-submitted pull requests,
#     or AI-generated text in issues, PR descriptions, or comments.
#     AI assistance for menial tasks (code completion, regex, find and
#     replace) is fine, with disclosure. New contributors (3 or fewer
#     merged PRs) should start with bug fixes and documentation.
#     All PRs must be human-reviewable from top to bottom."
#
#    Adapt the threshold (3 PRs is Godot's; yours may be 1 or 5) and
#    post it in CONTRIBUTING.md.

# 3. Pin the policy to your repo's contributing guide *and* link it
#    from the PR template. A policy in the docs is a policy. A policy
#    in the PR template is the policy the contributor is reading at
#    the moment they would otherwise copy-paste the LLM output.

# 4. If you are an AI-using developer who wants to keep contributing:
#    write the PR description yourself. Every time. The 5 minutes it
#    costs you is the difference between a maintainer seeing you as a
#    future maintainer and a maintainer closing the tab.

The Godot Foundation has, for the moment, the strongest contribution policy on AI in any major open-source project. It is going to be quoted, copied, and litigated over the rest of the year. The part worth holding onto is not the ban — bans are easy to write and easy to argue about. The part worth holding onto is the mentoring argument. The Foundation is not saying "AI code is bad." It is saying "AI code, submitted uncritically, breaks the pipeline that produces the people who can review AI code in five years." That is a maintenance-economics argument, and it is one every project that depends on unpaid maintainer labor is going to have to make for itself, sooner rather than later.

Disclosure

Drafted with AI assistance (Claude, Anthropic). All factual claims about the Godot Foundation's contribution policy were verified against the primary source at https://godotengine.org/article/contribution-policy-2026/ and PC Gamer's coverage at the URL listed in Sources, both fetched on 2026-07-01 with curl --compressed. The quoted "AI cannot take responsibility" and "demoralizing" lines are direct quotes from the Foundation's announcement. The "three or fewer merged PRs" figure is taken directly from the announcement. The "Slay the Spire 2" and "Case of the Golden Idol" examples are from PC Gamer's coverage. Internal-link targets are existing posts on this blog. The original argument — that the Godot policy is a maintenance-economics statement about a maintainer pipeline being outbid by AI slop volume — is the author's framing, not a claim sourced from any single article.

Sources