Is there any way to read file right now?
I dont see file read inside Zig-template platform. Is there a way to try new basic cli and read file from it?
https://github.com/roc-lang/basic-cli/pull/423
No there isn't. I've intentionally kept that platform very slim -- it's purpose is to be simple and easy to fork and add features to.
The goal is to get a release of an updated basic-cli sometime soon. I've been working my way up the stack starting with the simplest platforms and getting a release of those working before I switch focus to helping with basic-cli again.
@gavr if you do anticipate any writing to the file during your program's execution, you can import it.
The goal is to get a release of an updated basic-cli sometime soon.
Yeah, it's still quite easy to encounter bugs in Roc when porting basic-cli so progress has been slow.
Anton said:
@gavr if you do anticipate any writing to the file during your program's execution, you can import it.
oh, thanks! yea, and I can do writing by printing to stdout + piping to file >> sas.txt
if you do anticipate any writing to the file during your program's execution
Oh sorry I just noticed, this should have been "if you do not anticipate any writing ...."
The import is only done once, so you can't write-read-write-read etc, only read once.
ya, I wanna do a little interpreter or just parser, so reading only once is ok
Last updated: Jul 23 2026 at 13:15 UTC