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

Ability to call a CompiledFunc from a UserFunc @kcsampson this functionality is now available in the tengo2 branch. The Callable interface and CallableFunc signatures have changed, so you might need to update your code to support that, but you will be able to call back to tengo code from go code provided you make the call from the same goroutine the VM is running on. #420

Open
kcsampson opened this issue Apr 12, 2023 · 1 comment

Comments

@kcsampson
Copy link

Hi Sorry to bring this old issue back up.

But now I really could use this feature, but can't find it implemented as noted at the time from Jacob's response to the old ticket in December 2019.

Looking for an implemented of *CompiledFunc.Call() that actually does something instead of return nil,nil. (The base object implementation)

          @kcsampson this functionality is now available in the `tengo2` branch. The `Callable` interface and `CallableFunc` signatures have changed, so you might need to update your code to support that, but you will be able to call back to tengo code from go code provided you make the call from the same goroutine the VM is running on.

Originally posted by @mccolljr in #94 (comment)

@geseq
Copy link
Collaborator

geseq commented Apr 15, 2023

Here is the PR/branch for the change you're looking for, but it's not yet in a state to be merged

#372

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