Thanks to visit codestin.com
Credit goes to lib.rs

3 stable releases

1.2.0 May 3, 2026
1.1.0 Mar 19, 2025
1.0.0 Jul 29, 2024

#809 in Text processing

GPL-3.0-or-later

35KB
771 lines

Simple QR Code Generator

Versions

Version Released Change
1.0.0 29-Jul-2024 Initial version.
1.1.0 19-Mar-2025 Print space around QR codes.
1.2.0 03-May-2026 Use extended Unicode characters.

Introduction

QRSimple is a command line QR code generator, which outputs codes to the console. It operates in one of three modes:

  • If passed no arguments, it reads standard input.
  • If passed a valid filename, it reads data from that file.
  • If passed anything else, it uses that text.
$ qrsimple https://en.wikipedia.org/wiki/QR_code

  █▀▀▀▀▀█ ██▄▀█   ▀  ▀▀ █▀▀▀▀▀█
   ███ █ ▄  █ ▀▀▄ ▄ ▄▀ █ ███ █
   ▀▀▀ █  ▄▄▄▀▀█▀▀█▄█  █ ▀▀▀ █
  ▀▀▀▀▀▀▀ █ █ ▀▄█▄█▄█▄▀ ▀▀▀▀▀▀▀
  █▄▀▀▄█▀█▄▀███▀▀▀██▄▄ ▄█▄▄▀ ▀█
   █ █▄▀▀▄▀▄▄█▄█▄█ █▄ ▄█▄▀ ▀▀▄
   ▄▀▄ █▀▄█▄▀█▄▄ █▄█▄▄  ▄▀ ▀█▄▄
  █▀▀ █ ▀▄██   ▄▀ ▄▀▀▀▀ ▄▄▀ ▀█▀
    ▀ ▀▀▄▄▀▄▀█▄ ▀▀▄▀▀█▀ ▀▀█▄█ 
   █▄▀▄▀▀▄▀███  █ ▄█  █▀ ▄ █  
       ▀ ██   █▄▄▄██▀█▀▀▀███▄▄
  █▀▀▀▀▀█ █▀▄▀█▀  █ ▄▀█ ▀ ██ █▄
   ███ █ ▄▀ ██▄█▀█▀ ▄██▀██▄▀ ▄
   ▀▀▀ █ ▀▀  ▄   ▄   ▄█ █▄▄▀▄▀
  ▀▀▀▀▀▀▀ ▀ ▀▀▀ ▀▀   ▀▀      ▀ 

Additional Unicode Characters

If additional "sextant" characters (containing grids of six smaller blocks) from the Unicode Legacy Computing Block, or "octant" characters (containing grids of eight) from the Legacy Computing Block Supplement, are supported by installed fonts, smaller QR codes can be printed, with options --render large, --render medium or --render small:

$ qrsimple https://en.wikipedia.org/wiki/QR_code --render small

  𜵊𜷝𜵇▌𜵄𜶔𜴝𜶀𜵱𜵲𜴊𜵊𜷝𜵇▌
  𜴬𜴪𜴨𜴍𜵋𜵎𜶃𜷂𜷆𜷉𜴉𜴬𜴪𜴨𜴍
  𜴕𜵇𜷉𜴲𜵗𜶺𜷂𜶾▛𜷇𜵸𜷈𜴎𜴩𜴺
  𜵩𜴑▞𜶉𜷤𜴅𜵼𜴒𜵟𜴳𜴉𜶱𜴋𜶩🯦
  𜴐𜶽𜶂𜴰𜵗𜷟𜵏𜶑𜵹𜵇𜶕𜴋𜵀𜵐 
  𜵣𜴧𜴧𜵅𜵰𜵑𜵫𜴆𜵐𜵘𜵊𜴌█𜶚𜴹
  ▌🮅𜴍▌𜴭▝𜵂𜴂𜴼𜴃𜷚𜶘𜶸𜶁🯦
  🮂🮂🮂𜺨𜺨🮂𜺨🮂 𜺫𜺨  𜺫 

If built on Linux with feature "fontconfig", installed fonts are automatically scanned for required characters, and the smallest available render size is chosen.

N.B. At time of writing, the Legacy Computing Block Supplement is not supported by Noto Sans Mono, so (contrary to some advice on the internet) installing the latest version of this will not help. However, it is supported by Cascadia Mono.

Installation

To install with base functionality or on Windows:

$ cargo install qrsimple-cli

To install with character detection on Debian Linux, including the fontconfig library if not already present:

$ sudo apt update
$ sudo apt install fontconfig
$ sudo apt install libfontconfig1-dev
$ cargo install qrsimple-cli --features fontconfig

Dependencies

~8–11MB
~224K SLoC