[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ann] Blog post on Luvit without Luvit
- From: Daurnimator <quae@...>
- Date: Tue, 26 Apr 2016 11:01:51 +1000
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