Photon is one Rust crate published under four different package names
⚡ Rust/WebAssembly image processing library
At a glance
- What is it?
- silvia-odwyer/photon is a pure Rust image processing library that compiles to WebAssembly. The interesting part is the packaging: a Cargo workspace with a single member called crate, two npm scopes plus a Workers package, and a published version number that lives in the README rather than in a release.
- Who is it for?
- Photon suits a team that already writes Rust and needs the same image operations in a browser bundle, a Node script and a Cloudflare Worker without maintaining three implementations, and it suits a JavaScript team that wants image editing rather than a full canvas library.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 65 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 21, 2026, and from our analysis. They are not legal advice.
Star history
- silvia-odwyer/photon3,915 ★ · +21
| Repository | 2026-09-24 | 2026-11-21 |
|---|---|---|
| silvia-odwyer/photon | 3.9k | 3.9k |
21 Stars in the last 58 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The workspace declares one member and names it crate
The root manifest is a workspace with a single entry in its members list, and that entry is the directory called crate rather than the project name. The published crate is called photon-rs, so that name is declared inside the member manifest rather than in the file you would expect to find it in. Everything else in the tree is documentation or a demo: a docs directory, a photon-docs directory, a site directory, a webpack_demo and a react_app_demo, plus a formatting config, a changelog and a security policy. That layout is the reason the WebAssembly build command points at the generic directory name, because the build tool is told which member to compile and the member is the one called crate:
wasm-pack build ./crateThe build step needs wasm-pack installed beforehand, and the README points at the wasm-pack installation guide rather than shipping a command for it.
Four install paths, two npm scopes and one outside the author scope
The same library reaches four different runtimes through four packages, and the names are not a variation on one string. A project built with a bundler installs the browser package, a Node project installs the node package, and a Cloudflare Workers project installs a third package published under a different scope entirely. The version numbers are not tied together in the documentation, so a project that mixes runtimes can end up on two different builds of the same library:
npm install @silvia-odwyer/photon
npm install @silvia-odwyer/photon-node
npm install @cf-wasm/photonFor the browser path the documentation names the four engines that can run the compiled output: Chrome, Firefox, Safari and Edge. Each of the three packages points at its own getting started page, and the Workers package points at npm for the remaining steps instead of hosting a tutorial.
The native example changes the file format on the way out
The Rust sample is ten lines and does three things: open a file, shift one channel, write a file. The file it opens is named with a PNG extension and the file it writes is named with a JPEG extension, so the sample converts format as a side effect of the example rather than saying that it does. The channel call takes a signed offset and the sample passes a positive number, which raises the red channel. The offset is the only tunable in the snippet, and the README does not document the range a caller can pass or what happens when the result leaves the zero to two hundred and fifty five range:
extern crate photon_rs;
use photon_rs::native::{open_image, save_image};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Open the image (a PhotonImage is returned)
let mut img = open_image("test_image.PNG")?;
// Increment the red channel by 40
photon_rs::channels::alter_red_channel(&mut img, 40);
// Write file to filesystem.
save_image(img, "raw_image.JPG")?;
Ok(())
}Because the functions return a Result, the two operations that touch the filesystem are the ones that can fail at runtime, which makes the error type in the signature the part worth copying rather than skipping.
Six formats are named, and the direction of support is left open
The supported format list has six entries: PNG, JPEG, BMP, ICO, TIFF and WEBP. The list sits under a heading about supported formats and does not say whether reading and writing are both covered for each one, whether every function accepts every format, or whether any of them is lossy in a way a caller has to handle. Combined with a sample that reads one format and writes another, that leaves a real question for a caller: whether the conversion in the example is a documented behaviour of the library or simply what happened to be convenient for the author. ICO in particular appears in a list of raster formats without a note about multi-size files, and TIFF appears without a note about pages. Neither question is answered anywhere in the documentation.
Ninety six functions, and the newest effects are ahead of the packages
The function count given is ninety six, grouped by category: image correction, resizing, convolutions, channel manipulation, transform, monochrome effects, colour manipulation, filters, watermarking, blending and special effects. The filter category is described as over thirty preset filters rather than thirty named ones. What matters for an adopter is a parenthetical note attached to the special effects line: film grain, vignette and Bayer dither effects are described as being in the repository and as being released through NPM and Crates.io in the next library release in 2026. That sentence tells a reader that the source tree is ahead of the published packages, and it is the only signal in the repository that this gap exists. A project that needs one of those three effects and installs from npm is relying on a release that had not been cut when this documentation was written.
Colour work is organised by named colour space
The category list is not a flat set of ninety six names, it is a set of operations grouped by the space they operate in. Image correction covers hue rotation, sharpening, brightness, saturation and lightening or darkening, and each is described as working within various colour spaces. Colour manipulation names three of them explicitly: HSL, LCh and sRGB. Monochrome effects include tints, several forms of greyscaling, thresholding, sepia and averaging the RGB values. Convolutions cover Sobel filters, blurs, Laplace effects and edge detection. Blending is described as ten different techniques plus the ability to change an image background, and watermarking accepts multiple formats. Anyone choosing between this library and a general purpose canvas library should note that the operations are expressed in perceptual terms, which is the actual reason the colour spaces are named rather than left as raw channel arithmetic.
The version number is written into prose because there are no releases
The README has a section headed with a version number and says that version was released on Crates.io and on NPM, naming what arrived in it: a duotone filter with preset duotone effects, image rotation, a dithering filter, and an update to image cropping that points at a pull request by number. That release is not published as a GitHub release, so the repository has no release entries at all and the tag list is not the place to look for what changed. The same number appears again in the installation snippet, where the dependency line pins that exact version rather than a range:
[dependencies]
photon-rs = "0.3.2"A changelog file exists at the top level of the tree, which is where a reader has to go to reconcile a version against its changes. The consequence for an adopter is that the README's version prose and the published package are two separate claims about the same thing, and only one of them is verifiable at install time.
Three documentation sites, each answering a different question
There are three separate places to learn the library and they do not overlap. The generated API reference on docs.rs answers what a function takes and returns. The project website carries a getting started guide with tutorials and installation instructions, split into separate pages for the native path, the browser path and the Node path. A third page lists every available function, which is the closest thing to an index of the ninety six operations. The README itself is mostly a landing page that points at those three and at a chat room. For judging adoption, the two claims worth checking are the featured projects: the library is named as the image processor behind an assistant called OpenClaw through a service called Rastermill, and behind a coding agent distributed as an npm package. Both are claims about adoption, not benchmarks, and the performance claims point at a wiki page rather than reproducing any numbers here.
Editorial conclusion
Photon suits a team that already writes Rust and needs the same image operations in a browser bundle, a Node script and a Cloudflare Worker without maintaining three implementations, and it suits a JavaScript team that wants image editing rather than a full canvas library. It does not suit someone who needs a feature that is described as sitting in the repository rather than in the published package, because the split between the tree and the packages is not documented anywhere. Before adopting it, pin the version you tested, check that the specific function you need is in that release rather than only in the repository, and confirm which of the four packages matches your runtime.
Frequently asked questions
How do I install Photon for a Node project?
The Node build is a separate npm package from the browser build, and the install line is `npm install @silvia-odwyer/photon-node`. The browser package for bundler based projects is `npm install @silvia-odwyer/photon`, and a separate `@cf-wasm/photon` package covers Cloudflare Workers.
Which image formats does Photon read and write?
Six formats are named as supported: PNG, JPEG, BMP, ICO, TIFF and WEBP. The documentation does not say which of them are supported for reading as well as writing, or whether every function accepts every format.
Is the film grain and vignette filter available in the published Photon package?
Not according to the documentation. Film grain, vignette and Bayer dither effects are described as being in the repository and as being released through NPM and Crates.io in the next library release in 2026, so the published package may not contain them.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/silvia-odwyer-photon)Star history chart for your README
[](https://hysenlabs.com/projects/silvia-odwyer-photon)Was this useful?