# Crystal Contrib

**URL:** https://forum.crystal-lang.org/c/crystal-contrib/6.md

[Latest](https://forum.crystal-lang.org/latest.md) · [Categories](https://forum.crystal-lang.org/categories.md) · [Tags](https://forum.crystal-lang.org/tags.md)

---

## [About the Crystal Contrib category](https://forum.crystal-lang.org/t/about-the-crystal-contrib-category/20)

<div class="topic-metadata">

**Author:** [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Replies:** 0

</div>

Related to language, compiler, tools and standard library. Let’s talk about how/if something should be added/changed/removed.

---

## [Handling typing for optional dependencies](https://forum.crystal-lang.org/t/handling-typing-for-optional-dependencies/8807)

<div class="topic-metadata">

**Author:** [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Replies:** 14\
**Last updated:** [October 12, 2026, 6:11pm UTC](https://forum.crystal-lang.org/t/handling-typing-for-optional-dependencies/8807 "2026-10-12T18:11:06Z")

</div>

So I have been exploring the idea of de-coupling some of the Athena components from the framework. In other words, make some of them optional and not installed by default. E.g. one of the framework services has a constru…

---

## [RFC: \`with ... yield\` replacement](https://forum.crystal-lang.org/t/rfc-with-yield-replacement/386)

<div class="topic-metadata">

**Author:** [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Replies:** 58\
**Last updated:** [October 7, 2026, 12:25pm UTC](https://forum.crystal-lang.org/t/rfc-with-yield-replacement/386 "2026-10-07T12:25:03Z")

</div>

The with ... yield feature has some drawbacks that would be good to solve. To illustrate the main challenge, both from the user and from the compiler, let’s see the following code: foo do bar end It is unclear (witho…

---

## [Reaching out to maintainers of downstream Crystal packages](https://forum.crystal-lang.org/t/reaching-out-to-maintainers-of-downstream-crystal-packages/9189)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 4\
**Last updated:** [October 7, 2026, 11:53am UTC](https://forum.crystal-lang.org/t/reaching-out-to-maintainers-of-downstream-crystal-packages/9189 "2026-10-07T11:53:35Z")

</div>

First of all: Thank you for helping to make Crystal available in downstream package repositories. It’s much appreciated.:heart\_hands: I’m reaching out to the maintainers of Crystal packages because I’d like to start a c…

---

## [Macro hook for full file](https://forum.crystal-lang.org/t/macro-hook-for-full-file/9179)

<div class="topic-metadata">

**Author:** [@Jochen](https://forum.crystal-lang.org/u/Jochen)\
**Replies:** 8\
**Last updated:** [October 7, 2026, 10:52am UTC](https://forum.crystal-lang.org/t/macro-hook-for-full-file/9179 "2026-10-07T10:52:00Z")

</div>

Ok, this one is probably going to be horrible, but hear me out. We are using Crystal a lot to create DSLs, and I wanted to put this out there and ask if other DSL authors would find this useful, too? One of the DSLs sho…

---

## [CodeGraph support for Crystal — feedback wanted](https://forum.crystal-lang.org/t/codegraph-support-for-crystal-feedback-wanted/9182)

<div class="topic-metadata">

**Author:** [@n-rodriguez](https://forum.crystal-lang.org/u/n-rodriguez)\
**Replies:** 0\
**Last updated:** [October 3, 2026, 10:15am UTC](https://forum.crystal-lang.org/t/codegraph-support-for-crystal-feedback-wanted/9182 "2026-10-03T10:15:16Z")

</div>

CodeGraph ( GitHub - colbymchenry/codegraph: Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, CoPilot, and Hermes Agent — fewer tokens, fe…

---

## [\[RFC\] crinit: Pluggable filesystem-driven template engine for Crystal (upstream crystal init evolution)](https://forum.crystal-lang.org/t/rfc-crinit-pluggable-filesystem-driven-template-engine-for-crystal-upstream-crystal-init-evolution/9156)

<div class="topic-metadata">

**Author:** [@renich](https://forum.crystal-lang.org/u/renich)\
**Replies:** 2\
**Last updated:** [September 20, 2026, 6:40pm UTC](https://forum.crystal-lang.org/t/rfc-crinit-pluggable-filesystem-driven-template-engine-for-crystal-upstream-crystal-init-evolution/9156 "2026-09-20T18:40:02Z")

</div>

Hi everyone, Currently, crystal init app and crystal init lib generate hardcoded skeletons embedded in compiler macros. While fine for getting started, real-world projects invariably require customized scaffolding: doma…

---

## [Docs generating don't respect "extend self" in modules](https://forum.crystal-lang.org/t/docs-generating-dont-respect-extend-self-in-modules/9141)

<div class="topic-metadata">

**Author:** [@GerBra](https://forum.crystal-lang.org/u/GerBra)\
**Replies:** 0\
**Last updated:** [September 10, 2026, 12:49pm UTC](https://forum.crystal-lang.org/t/docs-generating-dont-respect-extend-self-in-modules/9141 "2026-09-10T12:49:59Z")

</div>

Hello, first post here! Have a minor problem, maybe a “little” bug when generating docs with: crystal docs Given this module: TODO: Write documentation for DocsTest module DocsTest extend self VERSION = "0.1.0" def …

---

## [Multi-valued enum](https://forum.crystal-lang.org/t/multi-valued-enum/9140)

<div class="topic-metadata">

**Author:** [@hutou](https://forum.crystal-lang.org/u/hutou)\
**Replies:** 1\
**Last updated:** [September 10, 2026, 10:01am UTC](https://forum.crystal-lang.org/t/multi-valued-enum/9140 "2026-09-10T10:01:08Z")

</div>

Speaking of AI, I once asked ChatGPT to suggest the best way to code a variable or type that would meet the following conditions: 1) never occur, 2) occur once, 3) repeat times? It suggested the following code: struct…

---

## [Different flavours of \`Enum\`](https://forum.crystal-lang.org/t/different-flavours-of-enum/9131)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 14\
**Last updated:** [September 9, 2026, 9:45pm UTC](https://forum.crystal-lang.org/t/different-flavours-of-enum/9131 "2026-09-09T21:45:41Z")

</div>

There are a number of discussions about potential enhancements to the Enum type. For example, the ability to reopen Enum types to add additional members has been requested in Reopening Enums · Issue #7629 · crystal-lang…

---

## [RFC 0030: Forward Compatibility Policy - #30](https://forum.crystal-lang.org/t/rfc-0030-forward-compatibility-policy-30/9112)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 0\
**Last updated:** [August 25, 2026, 11:56am UTC](https://forum.crystal-lang.org/t/rfc-0030-forward-compatibility-policy-30/9112 "2026-08-25T11:56:33Z")

</div>

We have a new RFC to discuss the policy for forward compatibility of the compiler, i.e. which old release is able to build a modern compiler. Currently, Crystal 1.0 can build any 1.x release. In the future we plan to li…

---

## [GCC 15 on Alpine Linux changes \`-static\` to imply \`-pie\` (i.e. \`-static-pie)\`](https://forum.crystal-lang.org/t/gcc-15-on-alpine-linux-changes-static-to-imply-pie-i-e-static-pie/9074)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 6\
**Last updated:** [August 5, 2026, 6:24am UTC](https://forum.crystal-lang.org/t/gcc-15-on-alpine-linux-changes-static-to-imply-pie-i-e-static-pie/9074 "2026-08-05T06:24:02Z")

</div>

When linking an executable with -static flag, starting with GCC 15 (as available in Alpine Linux 3.23+) implies the flag -pie. PIE stands for Position-independent executable. That’s generally a good idea as it enables a…

---

## [\[RFC\] Surviving the AI PR Flood: The Macro X-Ray & Asymmetric TDD](https://forum.crystal-lang.org/t/rfc-surviving-the-ai-pr-flood-the-macro-x-ray-asymmetric-tdd/8763)

<div class="topic-metadata">

**Author:** [@renich](https://forum.crystal-lang.org/u/renich)\
**Replies:** 23\
**Last updated:** [July 26, 2026, 11:46am UTC](https://forum.crystal-lang.org/t/rfc-surviving-the-ai-pr-flood-the-macro-x-ray-asymmetric-tdd/8763 "2026-07-26T11:46:21Z")

</div>

Context: The era of “VibeCoding” (high-velocity, LLM-assisted development) is here. People are using AI to generate code, and Crystal maintainers are inevitably going to face an influx of AI-generated PRs. Initially, a …

---

## [Adding a base directories class/module to the standard library](https://forum.crystal-lang.org/t/adding-a-base-directories-class-module-to-the-standard-library/6975)

<div class="topic-metadata">

**Author:** [@Snacks](https://forum.crystal-lang.org/u/Snacks)\
**Replies:** 10\
**Last updated:** [July 7, 2026, 6:42am UTC](https://forum.crystal-lang.org/t/adding-a-base-directories-class-module-to-the-standard-library/6975 "2026-07-07T06:42:25Z")

</div>

Hey folks, During a recent discussion on Discord, I raised the idea of having an alternative to directories-rs in Crystal. @straight-shoota suggested that we discuss it further here and possibly include the newly added …

---

## [Adamas: experimental LSP-first compiler work, current status, and feedback request](https://forum.crystal-lang.org/t/adamas-experimental-lsp-first-compiler-work-current-status-and-feedback-request/8953)

<div class="topic-metadata">

**Author:** [@ComputerMage](https://forum.crystal-lang.org/u/ComputerMage)\
**Replies:** 28\
**Last updated:** [June 4, 2026, 7:02pm UTC](https://forum.crystal-lang.org/t/adamas-experimental-lsp-first-compiler-work-current-status-and-feedback-request/8953 "2026-06-04T19:02:32Z")

</div>

Hi everyone, I want to share an experimental Crystal project I have been working on: The short version: it started as an attempt to build a better Crystal LSP, and over time grew into a larger compiler experiment wi…

---

## [Eliminate environment modifications](https://forum.crystal-lang.org/t/eliminate-environment-modifications/8533)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 42\
**Last updated:** [May 30, 2026, 1:06pm UTC](https://forum.crystal-lang.org/t/eliminate-environment-modifications/8533 "2026-05-30T13:06:08Z")

</div>

Modifying a process’ environment is generally not thread-safe because it is memory shared between all threads of a process. System functions like setenv or SetEnvironmentVariable are based on a global variable (environ …

---

## [Why Process.fork needs a good alternative in crystal](https://forum.crystal-lang.org/t/why-process-fork-needs-a-good-alternative-in-crystal/8949)

<div class="topic-metadata">

**Author:** [@threez](https://forum.crystal-lang.org/u/threez)\
**Replies:** 15\
**Last updated:** [May 22, 2026, 9:43pm UTC](https://forum.crystal-lang.org/t/why-process-fork-needs-a-good-alternative-in-crystal/8949 "2026-05-22T21:43:01Z")

</div>

Hey. I’m building freebsd.cr, Crystal bindings for FreeBSD’s Capsicum capability mode, Casper privilege-separation framework, and related kernel security APIs. The Process.fork deprecation warning prompted me to raise a …

---

## ["Why isn't there an LSP for Crystal?"](https://forum.crystal-lang.org/t/why-isnt-there-an-lsp-for-crystal/7687)

<div class="topic-metadata">

**Author:** [@nobodywasishere](https://forum.crystal-lang.org/u/nobodywasishere)\
**Replies:** 23\
**Last updated:** [May 22, 2026, 7:05pm UTC](https://forum.crystal-lang.org/t/why-isnt-there-an-lsp-for-crystal/7687 "2026-05-22T19:05:37Z")

</div>

There was a recent post on Reddit asking why there wasn’t an LSP for Crystal. This is a copy / paste of what I said in response, repeated for visibility and further discussion. There are a number of things that make wr…

---

## [Formatter vs ToSVisitor](https://forum.crystal-lang.org/t/formatter-vs-tosvisitor/8947)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 2\
**Last updated:** [May 20, 2026, 3:41pm UTC](https://forum.crystal-lang.org/t/formatter-vs-tosvisitor/8947 "2026-05-20T15:41:53Z")

</div>

The Crystal compiler contains two tools which turn an AST into source code: The formatter and the to\_s visitor. Their implementations are completely independent, so there is a lot of duplication. I’m wondering if there’…

---

## [Splatting in \`#values\_at\`](https://forum.crystal-lang.org/t/splatting-in-values-at/8938)

<div class="topic-metadata">

**Author:** [@Carlos](https://forum.crystal-lang.org/u/Carlos)\
**Replies:** 12\
**Last updated:** [May 12, 2026, 12:04pm UTC](https://forum.crystal-lang.org/t/splatting-in-values-at/8938 "2026-05-12T12:04:28Z")

</div>

What about on the caller’s side? If the method has a splat parameter, it should be possible to call it “splatting” any Enumerable as the argument. The use case is #values\_at. I find that method mostly useless. You can b…

---

## [Programmatic AST construction as a supported use case](https://forum.crystal-lang.org/t/programmatic-ast-construction-as-a-supported-use-case/8863)

<div class="topic-metadata">

**Author:** [@rubys](https://forum.crystal-lang.org/u/rubys)\
**Replies:** 11\
**Last updated:** [May 4, 2026, 8:52pm UTC](https://forum.crystal-lang.org/t/programmatic-ast-construction-as-a-supported-use-case/8863 "2026-05-04T20:52:18Z")

</div>

Several projects in the Crystal ecosystem work with the compiler’s AST from outside the compiler itself: the language server (crystalline), linters (ameba), documentation generators, and transpilers like railcar (GitHub …

---

## [Execution contexts and \`HTTP::Server\`](https://forum.crystal-lang.org/t/execution-contexts-and-http-server/8901)

<div class="topic-metadata">

**Author:** [@jgaskins](https://forum.crystal-lang.org/u/jgaskins)\
**Replies:** 5\
**Last updated:** [April 23, 2026, 8:54pm UTC](https://forum.crystal-lang.org/t/execution-contexts-and-http-server/8901 "2026-04-23T20:54:47Z")

</div>

What is the plan for things like HTTP::Server regarding execution contexts? Is the idea that the HTTP::Server will receive an execution context to spawn the new fibers into? context = Fiber::ExecutionContext::Parallel.n…

---

## [Different levels of \`@\[Deprecation\]\` annotations?](https://forum.crystal-lang.org/t/different-levels-of-deprecation-annotations/8752)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 13\
**Last updated:** [April 21, 2026, 9:17am UTC](https://forum.crystal-lang.org/t/different-levels-of-deprecation-annotations/8752 "2026-04-21T09:17:26Z")

</div>

The @\[Deprecation\] annotation is a useful tool to help keep code bases up to date. But sometimes its use could be a bit more nuanced. Deprecations are often used when a new method is introduced and intents to replace a…

---

## [Debugger support](https://forum.crystal-lang.org/t/debugger-support/1325)

<div class="topic-metadata">

**Author:** [@ComputerMage](https://forum.crystal-lang.org/u/ComputerMage)\
**Replies:** 196\
**Last updated:** [April 12, 2026, 7:08pm UTC](https://forum.crystal-lang.org/t/debugger-support/1325 "2026-04-12T19:08:58Z")

</div>

Hello everyone! I am working on a Crystal debugger ( for macOS for now as I am macOS user and I use MacDBG as a source of inspiration and lldb/gdb is quite heavy in my opinion) and I have some question: Is it me or lin…

---

## [Constant time cryptography](https://forum.crystal-lang.org/t/constant-time-cryptography/8847)

<div class="topic-metadata">

**Author:** [@renich](https://forum.crystal-lang.org/u/renich)\
**Replies:** 2\
**Last updated:** [April 7, 2026, 9:47am UTC](https://forum.crystal-lang.org/t/constant-time-cryptography/8847 "2026-04-07T09:47:34Z")

</div>

Question: is constant time in the roadmap, anywhere? Just asking. The question comes from the fact that LLVM has been at odds with constant-time since forever. Yet: Introducing constant-time support for LLVM to protect c…

---

## [Highlights of past releases](https://forum.crystal-lang.org/t/highlights-of-past-releases/8809)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 10:42am UTC](https://forum.crystal-lang.org/t/highlights-of-past-releases/8809 "2026-03-23T10:42:35Z")

</div>

In time for the 5 Years Anniversary of Crystal 1.0, we’ve compiled a list of the most important changes in each release since 1.0: It’s quite a list! Obviously, some of these changes might be more relevant to your spe…

---

## [Crystal multithreading support](https://forum.crystal-lang.org/t/crystal-multithreading-support/6622)

<div class="topic-metadata">

**Author:** [@vinit812010](https://forum.crystal-lang.org/u/vinit812010)\
**Replies:** 40\
**Last updated:** [March 20, 2026, 8:16am UTC](https://forum.crystal-lang.org/t/crystal-multithreading-support/6622 "2026-03-20T08:16:18Z")

</div>

Great News, threading and supporting multiple levels of parallelism is critical in writing backend enterprise grade applications that can maximally use the underlying computing hardware. There are numerous examples of…

---

## [RFC 0021: Percent String Array Literal with Interpolation](https://forum.crystal-lang.org/t/rfc-0021-percent-string-array-literal-with-interpolation/8772)

<div class="topic-metadata">

**Author:** [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Replies:** 2\
**Last updated:** [March 11, 2026, 4:42pm UTC](https://forum.crystal-lang.org/t/rfc-0021-percent-string-array-literal-with-interpolation/8772 "2026-03-11T16:42:13Z")

</div>

This RFC is about ready to be accepted: RFC 0021: Percent String Array Literal with Interpolation by straight-shoota · Pull Request #21 · crystal-lang/rfcs · GitHub Here is the full proposal. It’s time for a final glanc…

---

## [The semantics of type restictions](https://forum.crystal-lang.org/t/the-semantics-of-type-restictions/8777)

<div class="topic-metadata">

**Author:** [@cie](https://forum.crystal-lang.org/u/cie)\
**Replies:** 5\
**Last updated:** [March 11, 2026, 11:01am UTC](https://forum.crystal-lang.org/t/the-semantics-of-type-restictions/8777 "2026-03-11T11:01:47Z")

</div>

Hm, is it a good thing that Crystal works that way? That the return type annotation is only a contract for the method body but not for those using it? This way, adding a perfectly valid subclass can break existing code …

---

## [Improve Process API](https://forum.crystal-lang.org/t/improve-process-api/579)

<div class="topic-metadata">

**Author:** [@j8r](https://forum.crystal-lang.org/u/j8r)\
**Replies:** 7\
**Last updated:** [March 10, 2026, 5:21pm UTC](https://forum.crystal-lang.org/t/improve-process-api/579 "2026-03-10T17:21:34Z")

</div>

I find the Process API with Process.new and Process.run confusing, often mixing both forgetting which one is blocking or non-blocking. Another pain point compared to said, Python, is to easily create Strings from the ST…

[Next page](https://forum.crystal-lang.org/c/crystal-contrib/6.md?page=1)
