Calling GoLang from Typescript

We’re wondering if it’s possible to make GoLang functions available in TypeScript or if there is any other way to call GoLang code from TypeScript. We would like to run some GoLang functions and get the output of those functions in TypeScript.

Hello @RobinM

It’s not possible to invoke Go code directly from the TS runtime. There’s a way around it, which is to declare RPCs in the Go runtime and then invoke them from TS as http calls to 127.0.0.1, however this pattern is not ideal and should be used sparingly, plus, it may not be suitable for performance critial code paths as it incurs in the additional overhead of the http stack.

Best.

@sesposito Thanks a lot, that should work fine for us!