Stream: beginners

Topic: Full Stack Roc?


view this post on Zulip Nikita Tchayka (Aug 08 2023 at 22:10):

I was wondering if there's any way/library in Roc to write full stack code. I'm in search of a functional language to write isomorphic code for the frontend and backend (used to do this with Haskell, but GHCJS is a mess) and Roc looks like a great candidate.

If there's no library there that could do this but it is doable with Roc, I'd like to try doing so myself :)

I know that there are some Rust libraries that compile to WASM that allow you to write frontends in that way, was wondering if there was something done like this so I don't reinvent the wheel :)

view this post on Zulip Nikita Tchayka (Aug 08 2023 at 22:22):

Aaaand I just found https://github.com/roc-lang/roc/tree/main/examples with all the stuff I need, thanks for getting into this thread and reading these messages :)

view this post on Zulip Luke Boswell (Aug 09 2023 at 01:12):

I'm maintaining a roc awesome page which might be helpful. Also I think @Richard Feldman is working on a webserver at the moment for use at work. Keen to hear how you go with this, sounds like a fun project.

view this post on Zulip Brian Carroll (Aug 09 2023 at 05:48):

Roc compiles to Wasm so it can be a full stack solution.
But the virtual dom example doesn't compile so we put "WIP" in the directory name. When building it last year, we found some very difficult compiler bugs that aren't resolved yet.

view this post on Zulip Brian Carroll (Aug 09 2023 at 09:08):

We got the type checking bugs fixed but there's still some problems in later stages of the compiler (probably monomorphization, possibly code generation). I think we still have open issues on GitHub, which we should probably update!

view this post on Zulip kanishka (Aug 13 2023 at 12:53):

I think as soon as the compiler issues are ironed out, then MVP could be express handlers calling roc wasm library + elm front end. Then gradually replace the non roc parts. I have no experience with roc, just eagerly awaiting

view this post on Zulip Brian Carroll (Aug 13 2023 at 18:00):

That stack could be a cool project. But "full stack Roc" probably wouldn't be the right term for it because it uses Elm for the front end.
And in fact that means it does not require implementing a virtual dom in Roc, so it would not be blocked by the compiler issues I mentioned.

view this post on Zulip kanishka (Sep 18 2023 at 13:31):

I think my dream stack is roc + rest API + jsonschema + json-schema-to-elm + elm-land ( I know it's not full stack roc).


Last updated: Jul 06 2025 at 12:14 UTC