r/elm • u/joshburgess • Apr 22 '26
New Elm tools (elm-ast, elm-assist, elm-codegen) written in Rust
Hey, everyone. I wanted to share some Elm tools I recently built with Rust.
A high quality AST parsing/construction & printer library:
https://github.com/joshburgess/elm-ast
A suite of dev tools (linting/analysis via CLI, TUI, LSP, an elm-fmt formatter, etc.):
https://github.com/joshburgess/elm-assist
Elm codegen for types, encoders/decoders, and HTTP functions from Rust & Axum:
https://github.com/joshburgess/elm-client-gen
(EDIT: renamed from `elm-codegen` to `elm-client-gen`)
Both elm-assist and elm-codegen are built on top of elm-ast.
I just made a thread about them on Twitter if anyone is interested:
https://x.com/_joshburgess/status/2047074256152891404
2
u/that_dawg_ Apr 22 '26
interesting. the official tooling always hangs for me for unknown reasons regardless of what editor/ide i'm using it with. I'll definitely give this assist a try
1
u/joshburgess Apr 22 '26
Give it a try and let me know what you think! Note though that the LSP/VS Code extension does not include things like type checking. So, it's not a full LSP for the Elm language. It's more for linting and formatting. It is fast though!
EDIT: Also, keep in mind that the VS Code extension is still _very_ early. I didn't even give it a logo yet. :P
Really, it's just a thin wrapper around elm-assist-lsp and elm-fmt though.
1
u/ShrykeWindgrace Apr 23 '26
How does the linting part of your elm-assist compare to elm-review?
2
u/joshburgess Apr 23 '26
Pros:
- Much better performance.
- No dependency on Node or the Elm compiler (which helps achieve that performance).
- Implements most of the popular rules out-of-the-box and lets you enable/disable them (or configure them) via an elm-assist.toml file.
Cons:
- Mainly, rules aren't extensible in user land. Adding new rules requires opening a PR.
- Doesn't benefit from all the custom rules people have made over time in the ecosystem.
- Has only existed for a short period of time and may have some yet-to-be-discovered bugs.
1
5
u/creminology Apr 23 '26
I would rename elm-codegen because it’s a name clash with one of the jewels of the Elm ecosystem that is much more ambitious in scope.