Hello, I've wanted to try out roc-start
and noticed that it is not distributed as flake. I've managed to package it (I didn't see any nix buildRocPackage so I've quickly hacked something together) but when I've tried to test it it seems like basic-cli platform doesn't capture CLI arguments passed in correctly.
I've added some basic output to see what arguments does CLI platform see
https://github.com/nxy7/roc-start/blob/9ccd05d0b84f7ca53b898947331abe902a411cd5/src/main.roc#L39-L51
And it seems like it doesn't see anything (see the top of the screenshot where args list is empty)
image.png
Any ideas what might be the problem here?
Should be fixed with the next release. Might also be fixed if you use --linker legacy
(or potentially remove it)
Its a problem with rust argument capture and musl libc
Rust uses special initializer functions to capture the args (instead of getting them from main). Musl libc doesn't support the initializers.
In our next release, we directly pipe in args which fixes the issue.
Oh, so it's known issue. Cool. If that's the case then I'll patiently wait for next release. Thanks :-)
Dawid Danieluk has marked this topic as resolved.
I think we should have a pre-release in the couple of days
Last updated: Jul 06 2025 at 12:14 UTC