From c698d81b4d6868f3c5e26d2d7c3b39fe97209ec0 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 26 Jan 2023 17:17:12 +1100 Subject: [PATCH] Update README.md, doc/changelog.md --- README.md | 45 +++++++++++++++++++++++++++++++-------------- doc/changelog.md | 15 ++++++++++++--- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7a4db370..ebf83175 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,20 @@ ![WUFFS Logo](./doc/logo/wuffs-acronym-logo-1536x1024.png) -Wuffs (Wrangling Untrusted File Formats Safely) is [formerly known as -Puffs](https://groups.google.com/d/topic/puffslang/ZX-ymyf8xh0/discussion) -(Parsing Untrusted File Formats Safely). - Wuffs is a **memory-safe programming language** (and a **standard library** -written in that language) for wrangling **untrusted file formats** safely. +written in that language) for **Wrangling Untrusted File Formats Safely**. Wrangling includes parsing, decoding and encoding. Example file formats include images, audio, video, fonts and compressed archives. -It is also **fast**. On many of its GIF decoding -[benchmarks](/doc/benchmarks.md), Wuffs measures **2x faster than "giflib" (C), -3x faster than "image/gif" (Go) and 7x faster than "gif" (Rust)**. +It is **fast**. Per its [benchmarks](/doc/benchmarks.md) and other docs: + +- It can decode bzip2 **[1.3x faster than `/usr/bin/bzcat` + (C)](https://nigeltao.github.io/blog/2022/wuffs-bzip2-decoder.html)**. +- It can decode deflate up to **1.4x faster [than zlib-the-library (C)**. +- It can decode GIF **2x-6x faster than "giflib" (C), "image/gif" (Go) and + "gif" (Rust)**. +- It can decode PNG **[1.2x-2.7x faster than "libpng" + (C)](https://nigeltao.github.io/blog/2021/fastest-safest-png-decoder.html), + "image/png" (Go) and "png" (Rust)**. ## Goals and Non-Goals @@ -44,11 +47,21 @@ the increment would otherwise overflow. Similarly, an integer arithmetic expression like `x / y` is a compile time error unless the compiler can also prove that `y` is not zero. + +## Hermeticity + Wuffs is not a general purpose programming language. **It is for writing -libraries, not programs**. The idea isn't to write your whole program in Wuffs, -only the **parts that are both performance-conscious and security-conscious**. -For example, while technically possible, it is unlikely that a Wuffs compiler -would be worth writing entirely in Wuffs. +libraries, not programs**. Wuffs code is [hermetic](/doc/note/hermeticity.md) +and can only compute (e.g. convert "compressed bytes" to "decompressed bytes"). +**It cannot make any syscalls** (e.g. it has no ambient authority to read your +files), implying that it cannot allocate or free memory (and is therefore +trivially safe against things like memory leaks, use-after-frees and +double-frees). + +The idea isn't to write your whole program in Wuffs, **only the parts that are +both performance-conscious and security-conscious**. For example, while +technically possible, it is unlikely that a Wuffs compiler would be worth +writing entirely in Wuffs. ## What Does Wuffs Code Look Like? @@ -187,12 +200,16 @@ The [Note](/doc/note) directory also contains various short articles. # Status -Version 0.2. The API and ABI aren't stabilized yet. The compiler undoubtedly +Version 0.3. The API and ABI aren't stabilized yet. The compiler undoubtedly has bugs. Assertion checking needs more rigor, especially around side effects and aliasing, and being sufficiently well specified to allow alternative implementations. Lots of detail needs work, but the broad brushstrokes are there. +Nonetheless, Wuffs' GIF decoder has shipped in the Google Chrome web browser +[since June +2021](https://chromium-review.googlesource.com/c/chromium/src/+/2940044). + # Discussion @@ -223,4 +240,4 @@ owned by Google. --- -Updated on December 2019. +Updated on January 2023. diff --git a/doc/changelog.md b/doc/changelog.md index e924a8a5..bf6f0cae 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -1,7 +1,16 @@ # Changelog -## Work In Progress +## 2023-01-26 version 0.3.0 + +The headline feature is that we have a production quality PNG decoder. It's +also [the fastest, safest PNG decoder in the +world](https://nigeltao.github.io/blog/2021/fastest-safest-png-decoder.html). +There's also a [memory-safe, zero-allocation JSON +decoder](https://nigeltao.github.io/blog/2020/jsonptr.html). + +The dot points below probably aren't of interest unless you're upgrading from +Wuffs version 0.2. - Added `0b` prefixed binary numbers. - Added `WUFFS_BASE__PIXEL_BLEND__SRC_OVER`. @@ -14,6 +23,7 @@ - Added `cpu_arch`. - Added `doc/logo`. - Added `endwhile` syntax. +- Added `example/bzcat`. - Added `example/cbor-to-json`. - Added `example/convert-to-nia`. - Added `example/imageviewer`. @@ -37,7 +47,6 @@ - Added double-curly blocks. - Added interfaces. - Added iterate advance parameter. -- Added preprocessor. - Added single-quoted strings. - Added slice `uintptr_low_12_bits` method. - Added tokens. @@ -156,4 +165,4 @@ Wuffs version 0.1. --- -Updated on January 2020. +Updated on January 2023.