Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to interact with Go runtime without interpreter? #174

Closed
yingfeng opened this issue Apr 13, 2021 · 4 comments
Closed

Is it possible to interact with Go runtime without interpreter? #174

yingfeng opened this issue Apr 13, 2021 · 4 comments

Comments

@yingfeng
Copy link

Similar with this issue, suppose there is an IR generated from other languages, since there does not exist an official Golang interpreter right now, is it possible to interact with go runtime through other mechanism? For example, to build IR into golang shared library or plugin such that it could be dynamically loaded?

@mewmew
Copy link
Member

mewmew commented Apr 13, 2021

Hi @yingfeng,

As for interpreting Go, I'd very much recommend Yaegi [1], [2]. It supports the full Go language specification and is a production quality interpreter.

When it comes to having LLVM IR generated from other languages interact with LLVM IR of Go (and the Go runtime), I would recommend taking a look at Gollvm [3], the official LLVM-based Go frontend. It should be possible to hook these up to work and interact as you see fit, of course taking careful consideration of calling conventions, memory handling, etc.

Oh, and if you do venture into trying this out, I'd definitely be curious to learn of your experiences and how it went! Even if it did not work, so we get more insight into what works and what doesn't.

Wish you all the best and happy hacking!

Cheerful regards,
Robin

@yingfeng
Copy link
Author

Thanks a lot for your suggestion !

@mewmew
Copy link
Member

mewmew commented Apr 13, 2021

Thanks a lot for your suggestion !

Glad to. Remember to report back on how your experiments go :)

@yingfeng
Copy link
Author

We plan to provide user defined functions for sql engine, but it's not our current focus right now since we need to deliver the engine itself at first, we might return to this issue several months later. If you are interested in our work, you could ping me through my email :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants