I used duktape (duktape.org) to provide the embedded JavaScript. I originally used Lua but switched to duktape (JavaScript) as it's more C/C++ like. In fact, duktape is very similar to Lua in the C code.
The JavaScript behind each 'game' has at least two functions - initialise and run that get called by the engine.
I keep time consuming operations in C++ but let the JavaScript do the higher level stuff, like creation etc.
To create a box (32 x 32) with physics, you'd do something like
function initialise()
{
box = GameObject.textureObject(1); // create a sprite with texture index 1
box.setOrigin(16, 16); // important for Box2D physics
box.setPosition(100, 100); // set the position
Physics.createDynamicBox(box, { density: 1, friction: 0.6 });
}