Stream: show and tell

Topic: roc-just and the seahaven platform


view this post on Zulip Karl (Aug 24 2026 at 22:18):

roc-just is a port of the just task runner to Roc. I like just for doing build tasks, had some extra tokens, and thought "it might be nice if I didn't require people to install Rust to use my stuff" so I kicked it off not realizing how big just really was. It worked out to be around 32k lines of Roc.

Along the way it hit a considerable number of compiler issues so one of the reasons this is open sourced now is to provide a fairly large app to test the compiler against. This will probably not compile for you. I have a number of local patches to work around exponential blowups . Most of these are reported but this is still a ~3 minute build on my machine with my patches before the LLVM pass and the root cause is complicated enough that I'm not sure how much of it is intentional and how much is not.

view this post on Zulip Karl (Aug 24 2026 at 22:19):

In the process of the port I decided to try to make a constrained platform for it. The seahaven platform mostly mimics the basic-cli API but it executes on a virtual root in the real filesystem and is set up to only run a limited set of applications that are patched to interact with the VFS. This includes brush, a Rust port of Bash along with the uutils implementations of most of the utilities you'd expect to run in a build script.

view this post on Zulip Luke Boswell (Aug 24 2026 at 23:03):

Cool :rock_on:

view this post on Zulip Luke Boswell (Aug 24 2026 at 23:04):

I noticed you dropped Path for Str, what was the issue you ran into with Path? alAnything we should change on that?

view this post on Zulip Karl (Aug 24 2026 at 23:09):

No. I wanted this to cross platform and OsStr is there for the per-platform corner cases. Since I'm not trying for full coverage of every file name I dropped back to Str. It makes more sense for the "stdlib" to have OsStr.

view this post on Zulip Richard Feldman (Aug 24 2026 at 23:14):

I have a design for a Path that can work across operating system edge cases, but it's not currently a builtin. Probably should be though!

view this post on Zulip Luke Boswell (Aug 24 2026 at 23:26):

@Karl is this usable now? If we can build it locally, would it help you if we test it out?

view this post on Zulip Luke Boswell (Aug 24 2026 at 23:27):

Or are you sharing as a WIP thing

view this post on Zulip Karl (Aug 24 2026 at 23:28):

It works for me locally. I don't have my full UI platform ported over to run on it because there's some local binary execution there which the platform doesn't currently support.

view this post on Zulip Karl (Aug 24 2026 at 23:29):

I'm sharing it mostly as an idea and because Richard was asking about build times in a thread earlier. Most of my apps aren't that large but this takes a while for a variety of reasons.

view this post on Zulip Luke Boswell (Aug 24 2026 at 23:29):

Karl said:

I like just for doing build tasks, had some extra tokens, and thought "it might be nice if I didn't require people to install Rust to use my stuff" so I kicked it off not realizing how big just really was

I can really relate with this ... :sweat_smile:

view this post on Zulip Karl (Aug 24 2026 at 23:30):

My main UI platform is very large on the Rust side but only low thousands of lines on the Roc side. Largest app there is ~10k and most of the compiler issues that are triggered by my apps have been fixed.

view this post on Zulip Karl (Aug 24 2026 at 23:34):

@Luke Boswell I have a branch that replaces the clap emulation with weaver but I had to do some patches to get some just patterns expressable. Are you interested in pull requests for weaver?

view this post on Zulip Luke Boswell (Aug 24 2026 at 23:51):

Yes please!

view this post on Zulip Luke Boswell (Aug 30 2026 at 21:50):

@Karl would love to know if we've resolved the Roc side bugs and you think now is a good time to use this? I'm keen to test it out :smile:

view this post on Zulip Karl (Aug 30 2026 at 21:57):

The bugs I filed for it are still open so probably not. If the Roc part doesn't complete within 90s or it passes 10GB of memory it's probably not going to complete. I say probably because there was an arrangement that completed after 12 minutes on my M1 but most of the blowups are exponential. I run builds under a script that polls memory use and terminates if it crosses the 10GB cap.

view this post on Zulip Karl (Aug 30 2026 at 21:58):

To my knowledge it works fine, just hits ~5 exponential compilation bugs. I also haven't tested on Linux or on Windows.

view this post on Zulip Luke Boswell (Aug 30 2026 at 21:59):

Any chance you could give me a list to burn down?

view this post on Zulip Karl (Aug 30 2026 at 21:59):

https://github.com/roc-lang/roc/issues?q=is%3Aissue%20state%3Aopen%20author%3A%40grayrest


Last updated: Sep 03 2026 at 15:16 UTC