Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
That's one of the topics of discussion for RFC 3352: Relax const-eval restrictions.
While it certainly won't eliminate the problem entirely, RFC 3323: Restrictions (tracking issue) was recently accepted, which proposes allowing mutability restrictions to be specified on fields so that you don't need getters to enforce read-only access if your goal is merely to ensure that modifying a field must occur through a setter function which preserves necessary invariants.
A library author concerned about this can use the semver trick. TL;DR: if your current version is 0.42, you can do a 1.0 release, then do a 0.43 release that depends upon your 1.0 release and re-exports all the symbols.
In addition to thiserror and anyhow, our resident superhuman Rust-improving Robot, dtolnay, also developed an experiment in distributing precompiled proc macros as WebAssembly named Watt and, though I never bothered to create a Zulip account so I don't know what was said, I'm told there has been discussion around the idea of implementing something in that vein.