Current state
- qrcode: wraps
libqrencode (C library, with_qrencode conan option, default off). 92 lines of wrapper code.
- png:
with_png conan option exists. Used for QR code output as PNG.
- uri: hand-written RFC 3986 parser (~200 lines). No external dependency.
Goal
Replace these with the best available external libraries, keeping them as optional conan dependencies (same pattern as today). Evaluate:
QR code
- If there's a library that generates QR codes directly as PNG (or SVG), that would eliminate the need for a separate PNG dependency. Candidates:
nayuki/QR-Code-generator — header-only C/C++, generates QR matrix (no image output)
libqrencode (current) — C library, generates QR matrix, needs separate PNG lib for image
- Look for a single lib that does QR → PNG in one step
PNG
- Only needed if the QR library doesn't produce PNG directly
libpng (likely current), stb_image_write (header-only, simpler), etc.
URI
ada-url — fast, standards-compliant URL parser (used by Node.js). Available on conan.
- Or keep the hand-written parser if it's sufficient (it's small and works)
Conan integration pattern
Follow the existing with_qrencode pattern:
options = {"with_qrencode": [True, False]}
default_options = {"with_qrencode": False}
def requirements(self):
if self.options.with_qrencode:
self.requires("libqrencode/4.1.1", ...)
All three should remain optional — the node works without QR/PNG/URI support.
Current state
libqrencode(C library,with_qrencodeconan option, default off). 92 lines of wrapper code.with_pngconan option exists. Used for QR code output as PNG.Goal
Replace these with the best available external libraries, keeping them as optional conan dependencies (same pattern as today). Evaluate:
QR code
nayuki/QR-Code-generator— header-only C/C++, generates QR matrix (no image output)libqrencode(current) — C library, generates QR matrix, needs separate PNG lib for imagePNG
libpng(likely current),stb_image_write(header-only, simpler), etc.URI
ada-url— fast, standards-compliant URL parser (used by Node.js). Available on conan.Conan integration pattern
Follow the existing
with_qrencodepattern:All three should remain optional — the node works without QR/PNG/URI support.