Skip to content
This repository has been archived by the owner on Jun 23, 2018. It is now read-only.

Anyway to export custom functions to VM? #66

Open
zacx-z opened this issue Sep 26, 2012 · 2 comments
Open

Anyway to export custom functions to VM? #66

zacx-z opened this issue Sep 26, 2012 · 2 comments

Comments

@zacx-z
Copy link

zacx-z commented Sep 26, 2012

I searched Wiki and didn't find out how to do it.

It will be a very useful feature.

@MaddieM4
Copy link

A vote from me as well. This would be a really big deal for porting LOVE2D-Webplayer to JSREPL.

@max99x
Copy link
Contributor

max99x commented Mar 2, 2013

This is not JSREPL-specific, but emscripted Lua exposes the standard C API. This API is what we used to write the interface between JSREPL and Lua. Although not done in the above code, it's fairly easy to use JS functions inside Lua by implementing a lua_CFunction on the JS side. At one point while experimenting with integration strategies, we even had Lua coroutines yielding to and resuming from JS functions.

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

No branches or pull requests

3 participants