profile picture

3 pages tagged with "crystal"

Cross-compiling Crystal applications - Part 1

June 22, 2024 - 2694 words - 14 mins
Exploring simplification on compiling Crystal applications to other platforms and architectures. Native still requires runtime dependencies While Crystal language provides a friendly way to generate native binaries for your current platform (crystal build), the cross-compilation to target other pla… read more

Testing Crystal SQLite3 PRAGMAs usage and some HTTP benchmarks 👨‍🚀🚀

February 11, 2023 - 1317 words - 7 mins
Wanted to test the PRAGMA changes to crystal-sqlite3 and perform some simple HTTP benchmarks, just for fun 😊 This uses the work shown on previous TIL, and the code from [PR #85][pr-85]. ▶️ Similar to previous TIL, I made a recording of this test (and the errors) 💣 here. 1. A simple HTTP app that use… read more

Setting SQLite3 PRAGMA's automatically with crystal-sqlite3

January 14, 2023 - 641 words - 4 mins
For a project in Crystal using SQLite3 (crystal-sqlite3), I wanted to automate setting PRAGMAs on the database connection without having to leverage on DB#setup_connection and hardcoding values in my code. So, instead of doing this: require "sqlite3" DB.open "sqlite3:file.db" do… read more