diff --git a/Readme.markdown b/Readme.markdown index 0e341db..13d1a1c 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -15,7 +15,7 @@ Features Core features: -* Available in 5 programming languages, all with nearly equal functionality: Java, JavaScript, Python, C++, C +* Available in 6 programming languages, all with nearly equal functionality: Java, JavaScript, Python, C++, C, Rust * Significantly shorter code but more documentation comments compared to competing libraries * Supports encoding all 40 versions (sizes) and all 4 error correction levels, as per the QR Code Model 2 standard * Output formats: Raw modules/pixels of the QR symbol (all languages), SVG XML string (all languages except C), `BufferedImage` raster bitmap (Java only), HTML5 canvas (JavaScript only) @@ -144,6 +144,29 @@ C language: ok = qrcodegen_encodeBinary(dataAndTemp, 3, qr1, qrcodegen_Ecc_HIGH, 2, 7, qrcodegen_Mask_4, false); +Rust language: + + extern crate qrcodegen; + use qrcodegen::QrCode; + use qrcodegen::QrCodeEcc; + use qrcodegen::QrSegment; + + // Simple operation + let qr0 = QrCode::encode_text("Hello, world!", + QrCodeEcc::Medium).unwrap(); + let svg = qr0.to_svg_string(4); + + // Manual operation + let chrs: Vec = "3141592653589793238462643383".chars().collect(); + let segs = QrSegment::make_segments(&chrs); + let qr1 = QrCode::encode_segments_advanced( + &segs, QrCodeEcc::High, 5, 5, 2, false).unwrap(); + for y in 0 .. qr1.size() { + for x in 0 .. qr1.size() { + (... paint qr1.get_module(x, y) ...) + } + } + More information about QR Code technology and this library's design can be found on the project home page. diff --git a/python/setup.py b/python/setup.py index 52f5a56..6026451 100644 --- a/python/setup.py +++ b/python/setup.py @@ -27,7 +27,7 @@ import setuptools setuptools.setup( name = "qrcodegen", description = "High quality QR Code generator library for Python 2 and 3", - version = "1.1.0", + version = "1.2.0", platforms = "OS Independent", license = "MIT License", @@ -66,7 +66,7 @@ Features Core features: -* Available in 5 programming languages, all with nearly equal functionality: Java, JavaScript, Python, C++, C +* Available in 6 programming languages, all with nearly equal functionality: Java, JavaScript, Python, C++, C, Rust * Significantly shorter code but more documentation comments compared to competing libraries * Supports encoding all 40 versions (sizes) and all 4 error correction levels, as per the QR Code Model 2 standard * Output formats: Raw modules/pixels of the QR symbol, SVG XML string diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b81eefc..d497eb7 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,4 +1,4 @@ [package] name = "qrcodegen" -version = "0.0.0" +version = "1.2.0" authors = ["Project Nayuki"]