Dei here, from the team behind Error Stack [1] (a similarly named existing, context-aware error-handling library for Rust that supports arbitrary attachments). How does Stack Error, here, compare?
Interesting approach! We had a similar journey at HASH to figuring out how we deal with stacked errors (as well as collecting parallel errors), developed the `error-stack` crate to solve for it. It works by abstracting over the boilerplate needed to stack errors by wrapping errors in a `Report`. Each time you change the context (which is equivalent to wrapping an error) the location is saved as well, with optional spantrace and backtrace support. It also supports supplying additional attachments, to enrich errors. We spent quite a bit of time on the user output, as well (both for `Debug` and `Display`) so hopefully the results are somewhat pleasant to work with and read.
This is a fair criticism of the public spec in its current form and we’re working on documentation to help folks deal with this.
We actively want to talk approaches through with more interested parties, and welcome contributions to the spec and docs.
Sidebar — for our part at HASH - we’re optimistic about the role WebAssembly might play, having used it extensively in building the wider ecosystem of simulation tooling.
We’ve spent a lot of time thinking and talking to folks about the incentive structures around this, and think they stand on their own - although your skepticism was an initial worry we had, too. As it stands the Block Protocol enables embedding applications to make their products more useful to consumers. And block developers reach a wider audience with their tools than they would otherwise. There’s a lot more to this that we’ll write up nicely later.
I can see how, if you get to critical mass, the network effect will drive adoption. For example, building a Blocks-based project management system becomes much, much easier if it can tie into one of many (hypothetical) Blocks-based HR information systems, so that you can pre-populate a list of employees at the company. As much as big companies love lock-in, there's tremendous potential value in enabling small companies to build open value-add tools that focus on solving a narrow problem extremely well.
Introductory guide to various topics in computational economics by Saku Panditharatne, in the browser-based HASH simulation platform (disclaimer: I'm one of the founders of HASH)
[1]: https://crates.io/crates/error-stack