Skip to content

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

Description

@kcsampson

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions