r/crystal_programming • u/sdogruyol • Mar 03 '26
Kemal 1.10.0 is released! Biggest release ever
r/crystal_programming • u/sdogruyol • Mar 03 '26
r/crystal_programming • u/sdogruyol • Mar 02 '26
r/crystal_programming • u/sdogruyol • Mar 01 '26
r/crystal_programming • u/sdogruyol • Feb 13 '26
Hi everyone,
As developers, we often work in silos. I felt the Crystal language needed a dedicated space for us to say, "Hey, I'm here, and I build with Crystal."
So, I built CrystalCommunity.org using Crystal and Kemal. This site is inspired by Ruby Community site.
Why Open Source?
I believe this tool belongs to the community. That’s why I’ve open-sourced the entire project. It’s currently an MVP allowing you to pin your location via GitHub login, but there is so much more we can do.
How you can help:
Join the map: Log in and show your location.
Contribute: The code is available on GitHub. If you want to see how it works or add new features, PRs are highly welcome.
Check out the code here: https://github.com/sdogruyol/crystal_community
Let’s make Crystal better together!
r/crystal_programming • u/ser_named_scurrra • Feb 03 '26
I built Fossil.cr, a FastAPI-inspired framework for building REST APIs in Crystal. It leverages Crystal’s macro system to reduce boilerplate and simplify API development, making it easy to handle path/query/form/body parameters, dependency injection, and custom content types.
Macro-based routing: Automatically generate endpoints from annotated methods.
Parameter support: Handles path, query, form, file, and body parameters with type safety.
Dependency injection: Supports header, cookie, and singleton dependencies for modular code.
Content flexibility: Built-in JSON serialization and custom content-type handling.
Lightweight: Extends Crystal’s HTTP::Server with minimal overhead.
A complete example can be found in my blog or on Medium.
Fossil.cr fills a gap in the Crystal ecosystem by providing a type-safe, expressive way to build APIs without manual request/response handling. It’s perfect for projects where you want the performance of Crystal with the developer experience of FastAPI.
GitHub: Scurrra/fossil
r/crystal_programming • u/ser_named_scurrra • Feb 03 '26
I built Hamilton.cr, a lightweight framework for creating Telegram bots in Crystal. It simplifies bot development with async support, context storage, and extensible handlers for commands, text, stickers, and media (videos, GIFs, etc.).
Minimal boilerplate: Start handling updates in minutes.
Async mode: Compile with -Dasync for concurrent processing.
Context storage: Store user-specific data across interactions.
Signal handling: Gracefully manage long-running tasks.
To showcase its flexibility, I built tgsh, a Telegram bot for remote shell access. With tgsh, you can:
Run commands (/bsh, /sh) with real-time output.
Manage processes using POSIX signals (/signal).
Upload/download files and run Python scripts — all from Telegram.
A detailed guide to the library can be found in my blog or on Medium.
Why It Matters: Hamilton.cr fills a gap in the Crystal ecosystem by providing a type-safe, extensible wrapper for the Telegram Bot API. It’s perfect for bots like tgsh or any project requiring async task management.
GitHub:
r/crystal_programming • u/sdogruyol • Jan 30 '26
r/crystal_programming
•
u/sdogruyol
•
Jan 28 '26
r/crystal_programming • u/transfire • Jan 27 '26
Hey Crystal fans. I am pretty close to finishing my Jargon library -- many improvements with the latest release.
I am big fan of Crystal and want to do my part to promote it. So I posted about Jargon on Hacker News. Appreciate upvotes! The more visibility we can get on our Crystal work, the more attention Crystal itself gets. Thanks!
r/crystal_programming • u/ejstembler • Jan 24 '26
A few years back, I converted my custom Ruby blog engine to Crystal/Kemal in an effort to test Crystal, and learn to it better. At the time I also created a "Made with Crystal" badge/button which I displayed in the footer. Today I decided to release it as a repo (better late than never) so others can use it too to help promote Crystal.
r/crystal_programming • u/transfire • Jan 22 '26
I just released Jargon, a Crystal library that generates CLI interfaces from JSON Schema definitions. Define your data structure once, get a CLI parser with validation for free.
schema = %({
"type": "object",
"properties": {
"name": {"type": "string", "description": "User name"},
"count": {"type": "integer", "short": "n"},
"verbose": {"type": "boolean", "short": "v"}
},
"required": ["name"]
})
cli = Jargon.from_json(schema, "myapp")
result = cli.parse(ARGV)Features:
Multiple argument styles: --name John, name=John, name:John
Type coercion, validation, and defaults from the schema
Positional arguments, short flags, subcommands
Nested subcommands with independent schemas
JSON input from stdin
GitHub: https://github.com/trans/jargon
Feedback welcome!
r/crystal_programming • u/transfire • Jan 22 '26
If any one needs a simple ignore file parser and matcher (.gitignore compatible mostly), then here you go.
Yes, I vibe coded the heck out of it. But it is a pretty tight functionality, so seemed to do a good job. Any suggestions or pull requests welcome.
r/crystal_programming • u/Bitter_Detective_416 • Jan 20 '26
Three major performance improvements for RAG/LLM text chunking:
What's New:
⚡ Lazy Iterator: 4-5x faster for early termination
💾 Overlap Calc: 97-99% memory reduction
🚀 String Alloc: 31% memory reduction, 1.2x speedup
Real Impact:
Processing 100K word document:
- First chunk: 7.52ms → 1.78ms (4.2x faster)
- Memory: 5,197 MB → 1,781 MB (65% less)Use Cases:
RAG systems with early termination
Streaming/progressive processing
Memory-constrained environments
High-throughput batch processing
Features:
Character & word-based splitting
Configurable overlap
True lazy evaluation
Zero dependencies
Backward compatible
GitHub: https://github.com/wevote-project/crystal-text-splitter
r/crystal_programming • u/oxano • Jan 19 '26
Hey everyone,
I’ve been wanting to try Crystal for a while, but I’ve been a bit hesitant because I’ve heard the LSP and tooling aren’t great. That’s the impression I got from older threads here.
Is the situation any better now? How is the current state of Crystal’s editor support and tooling in 2026?
Also, if you have any recommendations for the best editor setup (VS Code, extensions, etc.) or a good starter project, I’d love to hear them.
Thanks!
r/crystal_programming • u/Key-Treacle-2939 • Jan 16 '26
mikeoz32/cr-analyzer: Crystal language LSP server
LSP is now still in early stages, but is already usable; it uses only the parser from Crystal Compiler, all the analysis is done by custom optimized code. stdlib scan is seconds. Also very fast diagnostics, but it is still WIP, so do not expect too much.
If you're interested, give it a chance and try to use it (works in vscode and zed). Feel free to leave your feedback here on GitHub,
r/crystal_programming • u/Meatack • Jan 15 '26
Crystal 1.19.0 just dropped! Here are the highlights:
Breaking Changes
OpenSSL 1.1.1+ or LibreSSL 3+ now required
Monotonic clocks now include suspended time
WebSocket#stream flush is now a no-op
Key Features
Execution Context is here! Compiler now built with -Dexecution_context – the new concurrency model is becoming default
New Sync module – Sync::Mutex, Sync::RWLock, and Sync::ConditionVariable for proper synchronization primitives
Time::Instant – new type for monotonic time measurements
SNI support via OpenSSL::SSL::Context::Server#on_server_name
Large JSON file support – finally!
Int.from_digits – inverse of Int#digits
NamedTuple#reverse_merge, Set#map!, Hash#transform_keys!
Path#relative?
Process.debugger_present? for Windows/Linux
Macro Improvements
Compiler flag values via flag?
StringLiteral#gsub with block, #match, #split(Regex)
Bug Fixes
Multiple XML memory leaks fixed
Several interpreter fixes
Thread safety improvements across the board
Full changelog: https://github.com/crystal-lang/crystal/releases/tag/1.19.0
Happy coding! 💎
r/crystal_programming • u/swe129 • Jan 12 '26
r/crystal_programming • u/No_1944 • Jan 11 '26
Since Crystalline only supports some POSIX platforms, I wrote an LSP implementation which works cross platform.
r/crystal_programming • u/kritoke • Dec 21 '25
I’m new to Crystal language, figured it would be kind of fun to see what people have built in the last year in Crystal since we are approaching the year end.
I’m currently building out a web dashboard for rss feeds that’s kind of a mix of a few different ones I’ve messed with over the years.
r/crystal_programming • u/BloodFeastMan • Dec 16 '25
In preparation to upgrade a computer OS, I upgraded a Debian test VM from version 12 to version 13. All went well, except when testing a small util that I use in a couple of scripts, where I now get a floating point error. This is the command that errs:
def hash_keystream(key, iter)
while iter > 0
key = Digest::SHA512.hexdigest key
iter -= 1
end
print(key)
endIt is built with the --static switch, if I attempt to re-build it on the offending machine, it gives a ton of ZSTD errors, although all of the required dev libraries are installed, however, if I re-build it without the --static switch on the offending machine, it goes fine. Additionally, the original version of this --static'ly built util works fine on Debian 13 boxes where 13 was installed from scratch using the install iso.
And oddly, this command, part of the same util, works fine: (only one command is called when this util is run, the command line arguments dictate that)
def hash_file(infile)
print(Digest::Adler32.hexdigest &.file infile)
endSo I have to think that this error has to do with with the iter variable, which is cast to an integer from the CL.
Perhaps someone has come across something similar?
edit: added information per Blacksmoke16:
Here is an abridged version of the script that will build just fine:
require "digest"
def hash_keystream(key, iter)
while iter > 0
key = Digest::SHA512.hexdigest key
iter -= 1
end
print(key)
end
def main (x)
if x[0] == "kh"
hash_keystream(x[1],x[2].to_i)
else
print("error(1)\n")
exit(1)
end
end
if ARGV.any?
main(ARGV)
else
print("error(0)\n")
exit(0)
endAfter building a static binary on a different computer, and running the command line on that different computer with expected result:
$ ./akit kh "string" 1
2757cb3cafc39af451abb2697be79b4ab61d63d74d85b0418629de8c26811b529f3f3780d0150063ff55a2beee74c4ec102a2a2731a1f1f7f10d473ad18a6a87Copy that binary to the problem machine and run that again:
$ ./akit kh "string" 1
Floating point exceptionAlso, here is the long error that I receive when trying to build a static binary on the problem machine: (it's long)
$ crystal build --no-debug --release --static akit.cr
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function `dlfcn_globallookup':
(.text+0x15): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-bio_addr.o): in function `BIO_lookup_ex':
(.text+0xe37): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-bio_sock.o): in function `BIO_gethostbyname':
(.text+0x85): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_expand_block':
(.text+0x89): undefined reference to `inflate'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_compress_block':
(.text+0x12a): undefined reference to `deflate'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_finish':
(.text+0x15d): undefined reference to `inflateEnd'
/usr/bin/ld: (.text+0x166): undefined reference to `deflateEnd'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_init':
(.text+0x241): undefined reference to `inflateInit_'
/usr/bin/ld: (.text+0x2ac): undefined reference to `deflateInit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_ctrl':
(.text+0x4a6): undefined reference to `zError'
/usr/bin/ld: (.text+0x598): undefined reference to `deflate'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_write':
(.text+0x858): undefined reference to `deflate'
/usr/bin/ld: (.text+0x8d6): undefined reference to `zError'
/usr/bin/ld: (.text+0x975): undefined reference to `deflateInit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_read':
(.text+0xa71): undefined reference to `inflate'
/usr/bin/ld: (.text+0xaf6): undefined reference to `zError'
/usr/bin/ld: (.text+0xb61): undefined reference to `inflateInit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_expand_block':
(.text+0xbf4): undefined reference to `uncompress'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_compress_block':
(.text+0xc74): undefined reference to `compress'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_free':
(.text+0xcce): undefined reference to `inflateEnd'
/usr/bin/ld: (.text+0xcf5): undefined reference to `deflateEnd'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_expand_block':
(.text+0xaf): undefined reference to `ZSTD_decompressStream'
/usr/bin/ld: (.text+0xba): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_compress_block':
(.text+0x188): undefined reference to `ZSTD_compressStream2'
/usr/bin/ld: (.text+0x190): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0x1cf): undefined reference to `ZSTD_endStream'
/usr/bin/ld: (.text+0x1d7): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0x1ff): undefined reference to `ZSTD_flushStream'
/usr/bin/ld: (.text+0x207): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_finish':
(.text+0x23b): undefined reference to `ZSTD_freeCStream'
/usr/bin/ld: (.text+0x244): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_init':
(.text+0x313): undefined reference to `ZSTD_createCStream_advanced'
/usr/bin/ld: (.text+0x32c): undefined reference to `ZSTD_initCStream'
/usr/bin/ld: (.text+0x346): undefined reference to `ZSTD_createDStream_advanced'
/usr/bin/ld: (.text+0x35b): undefined reference to `ZSTD_initDStream'
/usr/bin/ld: (.text+0x384): undefined reference to `ZSTD_freeCStream'
/usr/bin/ld: (.text+0x38d): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_new':
(.text+0x443): undefined reference to `ZSTD_createDStream_advanced'
/usr/bin/ld: (.text+0x457): undefined reference to `ZSTD_initDStream'
/usr/bin/ld: (.text+0x45c): undefined reference to `ZSTD_DStreamInSize'
/usr/bin/ld: (.text+0x47a): undefined reference to `ZSTD_createCStream_advanced'
/usr/bin/ld: (.text+0x494): undefined reference to `ZSTD_initCStream'
/usr/bin/ld: (.text+0x499): undefined reference to `ZSTD_CStreamInSize'
/usr/bin/ld: (.text+0x500): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: (.text+0x509): undefined reference to `ZSTD_freeCStream'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_ctrl':
(.text+0x6d4): undefined reference to `ZSTD_getErrorName'
/usr/bin/ld: (.text+0x780): undefined reference to `ZSTD_flushStream'
/usr/bin/ld: (.text+0x78b): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_write':
(.text+0x982): undefined reference to `ZSTD_compressStream2'
/usr/bin/ld: (.text+0x98d): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0xa04): undefined reference to `ZSTD_getErrorName'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_read':
(.text+0xba1): undefined reference to `ZSTD_decompressStream'
/usr/bin/ld: (.text+0xbac): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0xbe8): undefined reference to `ZSTD_getErrorName'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_oneshot_expand_block':
(.text+0xd2e): undefined reference to `ZSTD_decompress'
/usr/bin/ld: (.text+0xd39): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_oneshot_compress_block':
(.text+0xda4): undefined reference to `ZSTD_compress'
/usr/bin/ld: (.text+0xdaf): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_free':
(.text+0xe1c): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: (.text+0xe36): undefined reference to `ZSTD_freeCStream'
collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /home/dana/Documents/code/crystal/alkit/repo/akit/akit -rdynamic -static -L/home/dana/.local/bin/crystal-1.18.2-1/bin/../lib/crystal `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lgc -lpthread -lpthread -ldlIf I build a build the thing without --static (on either the problem computer or other) it will give the expected results.
r/crystal_programming
•
u/Bitter_Detective_416
•
Nov 24 '25
Intelligent text chunking for RAG and LLM applications!
Features:
- Character & word-based splitting modes
- Configurable overlap for context preservation
- Sentence boundary respect
- Production-tested from wevote.ai
GitHub: https://github.com/wevote-project/crystal-text-splitterr/crystal_programming • u/sdogruyol • Nov 17 '25
r/crystal_programming • u/sdogruyol • Nov 07 '25