Stream: platform development

Topic: Compiler API?


view this post on Zulip Jack Scully (Nov 22 2026 at 09:45):

I started building a Convex-style reactive backend platform on 0.1.0_RC1.

Problem: To dispatch RPCs and generate typed client bindings (api.ts), the platform needs an app's exported endpoints and their resolved arg/return types. Today, without hand-rolling a Roc parser, apps have to maintain a manual string registry and we have to compile + execute the binary in an --introspect mode to extract metadata:

# Today: manual string registry + runtime --introspect pass
app_spec =
    Concave.app("chat")
    |> Concave.query("messages.list", Messages.list!)
    |> Concave.mutation("messages.send", Messages.send!)
    |> Concave.mount("presence", Presence.component)

With a read-only compiler API (like roc glue's TypeTable/TypeRepr, extended to app exports), platform tooling could read the resolved types and structure of api directly at build/check time—no stringly-typed registry, no runtime --introspect step:

# With a compiler API: just export plain Roc records/functions
app [api] { pf: platform concave, presence: pkg presence }

api = {
    messages: { list: Messages.list!, send: Messages.send! },
    presence: Presence.mount().api,
}

Is exposing a read-only compiler/type-table API for app modules on the radar at all?

view this post on Zulip Luke Boswell (Nov 22 2026 at 09:59):

We have talked about roc tooling for a while, but it's not been implemented yet

https://gist.github.com/lukewilliamboswell/b477d6f6024fc43b9c3d5784a5da20af

view this post on Zulip Richard Feldman (Nov 22 2026 at 16:12):

also about type introspection - I forget the thread though :sweat_smile:


Last updated: Nov 26 2026 at 20:35 UTC