# TOML library with writer

**URL:** <https://racket.discourse.group/t/toml-library-with-writer/2495>\
**Category:** Show & Tell\
**Created:** [November 12, 2023, 11:28pm UTC](https://racket.discourse.group/t/toml-library-with-writer/2495 "2023-11-12T23:28:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bzyeung](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bzyeung](https://racket.discourse.group/u/bzyeung)\
**Post date:** [November 12, 2023, 11:28pm UTC](https://racket.discourse.group/t/toml-library-with-writer/2495/1 "2023-11-12T23:28:27Z")

</div>

Don't know how many of you are interested in TOML, but the [Racket TOML library](https://pkgs.racket-lang.org/package/toml) has been updated and is v1.0 compliant now. An eye is on the upcoming TOML v1.1 so that it shouldn't take too long to update it once the spec has been finalized.

The library also a very rudimentary feature to write out TOML. Would love feedback on people's preferred formatting, along with any other comments!

---

<div class="post-metadata">

**Author:** ![shawnw](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/shawnw/32/1031_2.png) [@shawnw](https://racket.discourse.group/u/shawnw)\
**Post date:** [November 13, 2023, 12:36am UTC](https://racket.discourse.group/t/toml-library-with-writer/2495/2 "2023-11-13T00:36:18Z")

</div>

I have a mostly abandoned idea for a project to make a toml parser with `#lang` support. I suspect that would be fairly easy to add to yours if you're looking for ideas to enhance it.

---

<div class="post-metadata">

**Author:** ![bzyeung](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bzyeung](https://racket.discourse.group/u/bzyeung)\
**Post date:** [November 13, 2023, 3:55am UTC](https://racket.discourse.group/t/toml-library-with-writer/2495/3 "2023-11-13T03:55:26Z")

</div>

Do you have anything started, or was this just an idea?

Also, did you have plans to use the `#lang` in some other project?

---

<div class="post-metadata">

**Author:** ![shawnw](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/shawnw/32/1031_2.png) [@shawnw](https://racket.discourse.group/u/shawnw)\
**Post date:** [November 13, 2023, 7:54am UTC](https://racket.discourse.group/t/toml-library-with-writer/2495/4 "2023-11-13T07:54:11Z")

</div>

A half written parser; kept getting distracted by other things before I could finish it.

Idea was that if the first line of the toml file is `#lang toml`, you'd be able to `(require "foo.toml")` to get its contents in a hash table named `data` or something (Intended to be used with `rename-in` or `prefix-in` to get a more appropriate name). Inspired a bit by the jsond package.

---

<div class="post-metadata">

**Author:** ![joeld](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joeld/32/38_2.png) [@joeld](https://racket.discourse.group/u/joeld)\
**Post date:** [November 28, 2025, 5:47pm UTC](https://racket.discourse.group/t/toml-library-with-writer/2495/5 "2025-11-28T17:47:59Z")

</div>

I've created my own package `toml/config` that builds on `toml` and adds `#lang` support to TOML files, along with facilities for creating custom `#lang`s that validate their TOML contents. (That last part was my main reason for writing it, for another project of mine.)

- GitHub: [GitHub - otherjoel/toml-config: 👓📃 TOML #lang for Racket with schema validation](https://github.com/otherjoel/toml-config/)
- Docs: [TOML Config: Configuration Languages for Racket](https://joeldueck.com/what-about/toml-config/index.html)
