# Eliminate environment modifications

**URL:** <https://forum.crystal-lang.org/t/eliminate-environment-modifications/8533>\
**Category:** Crystal Contrib\
**Tags:** rfc\
**Created:** [November 5, 2025, 9:10am UTC](https://forum.crystal-lang.org/t/eliminate-environment-modifications/8533 "2025-11-05T09:10:48Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [November 13, 2025, 5:25pm UTC](https://forum.crystal-lang.org/t/eliminate-environment-modifications/8533/29 "2025-11-13T17:25:42Z")

</div>

Yeah, perhaps throwing a RWLock on environ access could be good enough. And explicit documentation that we cannot protect against interference with non-Crystal code in the process and advise against mutating the environment entirely if possible.

It might still be interesting to implement a fiber-local overlay for mocking in order to test Crystal code that reads `ENV`. But this could entirely be a spec-only feature.

---

_[View the full topic](https://forum.crystal-lang.org/t/eliminate-environment-modifications/8533)._
