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
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 --
[31m[ROC CRASHED][0m Invalid entry_idx 0 >= entry_count 0
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
so you will need a release of the Zig compiler
Those can be found here: https://github.com/roc-lang/nightlies/releases
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...
yep, seems to be working now. just needed a good night of sleep lol
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