title: How to let lua load another lua script?
body: <p>I'm trying to embed <strong>Lua 5.2</strong> into my C program.</p>
  
  <p>I want to let the Lua script to be able to <code>require</code> and load another script. How to do it?</p>
  
  <p>Suppose the Lua part has such file structure:</p>
  
  <pre><code>lua_script
    - main.lua
    + utils
      - custom_loader.lua
    + globals
      - scene_globals.lua
      - scene_levels.lua
  </code></pre>
  
  <p>The <code>main.lua</code> will try to <code>require</code> and import functions from <code>custom_loader.lua</code>, and so on...</p>
  
  <p>Is it possible to do this without writing a kind-of wrapper in C?
  Can the Lua script automagically just load everything it needs?</p>
  
  <p>(Ps. I don't really <em>need</em> sandboxing for now, so it's okay for the script to do what it want.)</p>