qr-code
Version, currently 1.0.04 versions
- 1.0.3latestJan 4, 2024
- 1.0.2not indexedJul 9, 2026
- 1.0.1not indexedJul 9, 2026
- 1.0.0not indexedJul 9, 2026
github.com/spider-gazelle/qr-code
a QR Code implementation written in crystal lang
23 stars
1 dependent
License: MIT
Nothing has been indexed for 1.0.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
qr-code:
github: spider-gazelle/qr-code
version: ~> 1.0.0Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# Crystal Lang QR Code
[](https://github.com/spider-gazelle/qr-code/actions/workflows/ci.yml)
Native crystal lang QR code, no external dependencies
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
qr-code:
github: spider-gazelle/qr-code
```
2. Run `shards install`
## Usage
```crystal
require "qr-code"
qr = QRCode.new("my string to generate", size: 4, level: :h)
puts qr.to_s
```
output
```
xxxxxxx x x x x x xx xxxxxxx
x x xxx xxxxxx xxx x x
x xxx x xxxxx x xx x xxx x
... etc
```
### Doing your own rendering
```crystal
require "qr-code"
qr = QRCode.new("my string to generate", size: 4, level: :h)
qr.modules.each do |row|
row.each do |col|
print col ? '#' : ' '
end
print "\n"
end
```
### Rendering a SVG
```crystal
require "qr-code"
svg_string = QRCode.new("my string to generate").as_svg
```
### Rendering a PNG
you'll need to add [stumpy_png](https://github.com/stumpycr/stumpy_png) to your `shard.yml` dependencies
```crystal
require "qr-code"
require "qr-code/export/png"
# size == width, and QR codes are square
png_bytes = QRCode.new("my string to generate").as_png(size: 256)
```
## Credits
Based off the ruby gem: https://github.com/whomwah/rqrcode_core
Which was adapted from the javascript library: https://github.com/kazuhikoarase/qrcode-generator
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Jul 9, 2026
- Commit
1b782e18e675- Indexed
- not yet
Dependents
Repository
github.com/spider-gazelle/qr-code
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 4