Exploratory question: what's the general pattern t...
# help
d
Exploratory question: what's the general pattern to have SST recognize a lambda with a custom runtime? If I can bundle up a lambda that runs on a custom runtime (using the ocaml runtime), bundle it into a cdk.Function, reuse that as part of an sst.Function, I should hypothetically be able to run that along with SST's live lambda dev setup right?
😂 this is me trying to use ocaml for a certain part of our stack.
t
Rewrite it in rescript and compile to js
d
Yes that's a big option to consider. It simplifies all this.
t
We don't have a way to do custom runtimes really well with sst.Function yet. I took some large steps toward it with 0.47.0 but need to do more work to support live debugging. I have a prototype working
definitely something we want to enable, I have all sorts of weird languages I want to try. Serverless makes it easy to try out new languages just in one small area
a
Woah! It’s been a long time seeing someone bring up OCaml. @thdxr can we refer pre-deployed lambdas and connect them to the API Gateway somehow?
d
OCaml 5 may usher in a renaissance of sorts for the ecosystem. But hahah, yes it seems best to just do Rescript just for easy interop.
t
@Ashishkumar Pandey you should be able to import them and then add them manually as integration to the underlying api gateway
a
Ah! That’s lovely, so technically I can use any runtime but the catch is that I probably can’t use live lambda development with it, correct?
d
That's going back to the dark side 😅
t
Yeah but there's definitely a path to enabling live dev for any language without sst's core having to know about the language
a
@Dennis Dang yes lol! Just keeping my options open if I need custom runtimes to deal with something. @thdxr that’d be so powerful, it’d bring a lot of attention to the amazing work you people have been doing here.