lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 26 April 2016 at 10:34, Philipp Janda <siffiejoe@gmx.net> wrote:
> Am 25.04.2016 um 23:04 schröbte Tim Caswell:
>>>
>>> wouldn't it make sense to include the `uv.lua` shim in the rock and use
>>
>> `require( "uv" )` everywhere?
>>
>> Including the shim in the luarock isn't a bad idea.  I just don't know to
>> do that.
>
>
> If there's a "how" missing somewhere, the easiest way is probably to use
> something like
>
>     build = {
>       type = "cmake",
>       variables = {
>         -- ...
>       },
>       install = {
>         lua = {
>           uv = "src/uv.lua"
>         }
>       }
>     }
>
> in the rockspec, but you can also try to convince CMAKE to copy `uv.lua` to
> `$LUADIR`.
>
>
> Philipp
>
>
>
>

Alternatively could you just put it in package.preload in luvit initialisation?

package.preload["uv"] = function() return require "luv" end