Stream: beginners

Topic: How2Platform


view this post on Zulip Phillip Davis (Mar 30 2026 at 00:53):

Hey all,

I have an idea I want to implement as a platform (I still need to play around before I really know what it is so dont ask lol). But I know I want the host layer to be in Rust, so ive been using https://github.com/lukewilliamboswell/roc-platform-template-rust . Whats' the recommended LSP setup for platform dev? for example, im not even sure how to configure the entrypoint.

best,
phillip

view this post on Zulip Phillip Davis (Mar 30 2026 at 00:54):

also, I made a dummy app file at claude's suggestion but then roc-language-server yells:

Language server roc:

initializing server roc, id 14: Server reset the connection
-- stderr --
[ROC CRASHED] Invalid entry_idx 0 >= entry_count 0

view this post on Zulip Luke Boswell (Mar 30 2026 at 03:09):

The Rust platform template is upgraded to the new Zig compiler.... so you will need a release of the Zig compiler or build it from source.

The LSP is a subcommand in the Roc cli

$ roc experimental-lsp --help
Start the experimental Roc language server (LSP)

Usage: roc experimental-lsp [OPTIONS]

Options:
      --debug-transport  Mirror all JSON-RPC traffic to a temp log file
      --debug-build      Log build environment actions to the debug log
      --debug-syntax     Log syntax/type checking steps to the debug log
      --debug-server     Log server lifecycle details to the debug log
  -h, --help            Print help

view this post on Zulip Anton (Mar 30 2026 at 08:43):

so you will need a release of the Zig compiler

Those can be found here: https://github.com/roc-lang/nightlies/releases

view this post on Zulip Phillip Davis (Mar 30 2026 at 12:33):

Ohh I built from the commit in .roc-version etc but I'm 90% sure the issue was not including the experimental-lsp sub-command. One moment...

view this post on Zulip Phillip Davis (Mar 30 2026 at 13:47):

yep, seems to be working now. just needed a good night of sleep lol

view this post on Zulip Phillip Davis (Mar 30 2026 at 13:47):

also if anyone cares, i also whipped up this extremely jank mise plugin to manage the roc install: https://github.com/phdavis1027/mise-roc


Last updated: Apr 10 2026 at 12:38 UTC