Skip to content

Commit

Permalink
Public release. LuNari 1.6
Browse files Browse the repository at this point in the history
* NEW: Complete .NET Core support.
       .NET Standard 2.0+

* NEW: Implemented LuaD.
        ```
        using(dynamic l = new LuaD("Lua.dll"))
        {
            // Lua now is yours ~
            IntPtr L = l.luaL_newstate<LuaState>();
            var num  = l.lua_tonumber<LuaNumber>(L, 1);
        }
        ```
       Lua via Conari engine [DLR version]
       Requires full name to requested lua function by default (IConfig).

* NEW: Added netfx based target platforms: net472.

* NEW: API. added:

        +`lua_State* luaL_newstate(void);` /Lua 5.1; 5.2; 5.3

* CHANGED: Updated Conari 1.4. More speed and features:
           https://github.com/3F/Conari/releases/tag/1.4

* CHANGED: Added the following tools to nupkg packages for related build processes.

           https://www.nuget.org/packages/LuNari/
           * tools\gnt.bat - https://github.com/3F/GetNuTool
           * tools\hMSBuild.bat - https://github.com/3F/hMSBuild
  • Loading branch information
3F committed Dec 20, 2019
1 parent b0fb2e1 commit 920c7a6
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1
1.6.0
6 changes: 1 addition & 5 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
Extend our API layer or improve all of what you want. It's completely transparent with our flexible architecture.

Here's how to extend API: [in a few steps (Wiki)](https://github.com/3F/LuNari/wiki/API.Dev)

If you ready to contribute, please use [Pull Requests](https://help.github.com/articles/creating-a-pull-request/) (please through non-master branches). Other ways like .patch files are possible, but it may take more time to review the changes.

*Also note: if it's not a simple binding to cover API, please provide related unit-tests. Thanks.*
Here's how to extend API: [in a few steps (Wiki)](https://github.com/3F/LuNari/wiki/API.Dev). Please use [Pull Requests](https://help.github.com/articles/creating-a-pull-request/) if you ready to contribute.

The Application Program Interface of Lua:

Expand Down
68 changes: 58 additions & 10 deletions LuNari/LuNari.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.5.1</Version>
<Version>1.6.0</Version>
<BuildInfoVSSBE></BuildInfoVSSBE>
</PropertyGroup>

Expand All @@ -19,17 +19,65 @@
<IconUrl>https://raw.githubusercontent.com/3F/LuNari/master/LuNari/Resources/LuNari.png</IconUrl>
<Description>

Lua for .NET on Conari engine
Provides support* for all popular versions, like: 5.4, 5.3, 5.2, 5.1, ...
🗦🌔 LuNari is Lua for .NET on Conari engine
All actual Lua versions, like: Lua 5.4, 5.3, 5.2, 5.1, ...

* There are several methods to use LuNari:
API-layer and binding at runtime (DLR, Lambda expressions) with any Lua functions;
_ _ _ _ _ _
MIT License: https://github.com/3F/LuNari


## Why LuNari ?

Most popular features that will be adapted to your needs on the fly.

🔍 Easy to start:

```csharp
using(var l = new Lua&lt;ILua53&gt;("Lua.dll")) { /* ILua51, ILua52, ILua53, ... */ }
_ _ _ _ _ _
Source code and all details here: https://github.com/3F/LuNari

```

🚀 Awesome speed:

Based on the fast versions of Conari engine with caching of 0x29 opcodes (Calli).
https://github.com/3F/Conari#why-conari-


🔨 Its amazing dynamic features:

```csharp
using(dynamic l = new LuaD("Lua.dll"))
{
// Lua now is yours ~
IntPtr L = l.luaL_newstate&lt;LuaState&gt;();
var num = l.lua_tonumber&lt;LuaNumber&gt;(L, 1);
}
```

🍱 Damn customizable:

```csharp
var l = new Lua&lt;ILua52&gt;("Lua52.dll");

l.API.pushcclosure(L, onProc, 0);
l.bind&lt;Action&lt;LuaState, LuaCFunction, int&gt;&gt;("pushcclosure")(L, onProc, 0);
l.v&lt;ILua53&gt;().pushcclosure(L, onProc, 0);
...
```

🔖 Modern .NET Core

LuNari is ready for .NET Core starting from 1.6.
Its awesome dynamic features are also available even for .NET Standard 2.0
https://github.com/3F/Conari/issues/13


🌚 Unlimited extensible features:

Since this works through Conari ( https://github.com/3F/Conari ),
you can access to all newest features of the Lua immediately after introducing this in draft.
Just use it without waiting for release.



=======================================
gnt /p:ngpackages="LuNari/$(Version)"
================== https://github.com/3F/GetNuTool
Expand All @@ -42,7 +90,7 @@
<PackageProjectUrl>https://github.com/3F/LuNari</PackageProjectUrl>
<RepositoryUrl>https://github.com/3F/LuNari</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Lua API dll Lua54 Lua53 Lua52 Lua51 LuNari LunaRoad KeraLua NLua LuaInterface Conari API dll dotnet</PackageTags>
<PackageTags>Lua Lua54 Lua53 Lua52 Lua51 LuNari LunaRoad KeraLua NLua LuaInterface Conari API dll dotnet dotnetcore</PackageTags>
<PackageReleaseNotes>changelog: https://github.com/3F/LuNari/blob/master/changelog.txt </PackageReleaseNotes>
<Authors>github.com/3F/LuNari</Authors>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion LuNari/LuNariVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct LuNariVersion
{
public static readonly Version number = new Version(S_NUM_REV);

public const string S_NUM = "1.5.1";
public const string S_NUM = "1.6.0";
public const string S_REV = "0";

public const string S_NUM_REV = S_NUM + "." + S_REV;
Expand Down
125 changes: 74 additions & 51 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,84 @@
# LuNari
# [LuNari](https://github.com/3F/LuNari)

[![](./LuNari/Resources/LuNari.png)](https://github.com/3F/LuNari)

[Lua](https://www.lua.org) for .NET on [Conari engine](https://github.com/3F/Conari)
🗦🌔 ***LuNari*** is [Lua](https://www.lua.org) for .NET on [Conari engine](https://github.com/3F/Conari)

Provides *support** for all popular versions, like: 5.4, 5.3, 5.2, 5.1, ...
All actual Lua versions, like: Lua 5.4, 5.3, 5.2, 5.1, ...

*A few ways: API-layer and binding at runtime (DLR, Lambda expressions) with any Lua functions;*

[![Build status](https://ci.appveyor.com/api/projects/status/yw1dt77o9ynqehc4/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/lunari/branch/master)
[![Build status](https://ci.appveyor.com/api/projects/status/c016k5fdc3lm4191/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/lunari-0b02o/branch/master)
[![release-src](https://img.shields.io/github/release/3F/LuNari.svg)](https://github.com/3F/LuNari/releases/latest)
[![NuGet package](https://img.shields.io/nuget/v/LuNari.svg)](https://www.nuget.org/packages/LuNari/)
[![License](https://img.shields.io/badge/License-MIT-74A5C2.svg)](https://github.com/3F/LuNari/blob/master/LICENSE)

**Easy to start**:
[![Build history](https://buildstats.info/appveyor/chart/3Fs/lunari-0b02o?buildCount=15&includeBuildsFromPullRequest=true&showStats=true)](https://ci.appveyor.com/project/3Fs/lunari-0b02o/history)

## Why LuNari ?

Most popular features that will be adapted to your needs on the fly.

🔍 Easy to start:

```csharp
using(var l = new Lua<ILua53>("Lua.dll")) { // ILua51, ILua52, ILua53, ...
// l. { request anything to Lua }
// ...
}
```

## License
🚀 Awesome speed:

Based on the fast versions of Conari engine with caching of 0x29 opcodes (Calli). [[?](https://github.com/3F/Conari#why-conari-)]


🔨 Its amazing dynamic features:

```csharp
using(dynamic l = new LuaD("Lua.dll"))
{
// Lua now is yours ~
IntPtr L = l.luaL_newstate<LuaState>();
var num = l.lua_tonumber<LuaNumber>(L, 1);
}
```

🍱 Damn customizable:

```csharp
var l = new Lua<ILua52>("Lua52.dll");

l.API.pushcclosure(L, onProc, 0);
l.bind<Action<LuaState, LuaCFunction, int>>("pushcclosure")(L, onProc, 0);
l.v<ILua53>().pushcclosure(L, onProc, 0);
...
```

🔖 Modern **.NET Core**

LuNari is ready for .NET Core starting from 1.6. Its awesome dynamic features are also available even for [.NET Standard **2.0**](https://github.com/3F/Conari/issues/13).


🌚 Unlimited extensible features:

Since this works through [Conari](https://github.com/3F/Conari), you can access to all newest features of the Lua immediately after introducing this in draft. Just use it without waiting for release.


## 🗸 License

The [MIT License (MIT)](https://github.com/3F/LuNari/blob/master/LICENSE)

```
Copyright (c) 2016,2017,2019 Denis Kuzmin < entry.reg@gmail.com > :: github.com/3F
Copyright (c) 2016,2017,2019 Denis Kuzmin < entry.reg@gmail.com > GitHub/3F
```

[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://3F.github.io/Donation/)
[ [ ☕ Donate ](https://3F.github.com/Donation/) ]

LuNari contributors: https://github.com/3F/LuNari/graphs/contributors

We're waiting for your awesome contributions!

## Take a look closer

## There are several methods to use LuNari
There are several ways to use LuNari: API-layer and binding at runtime (DLR, Lambda expressions)

### Dynamic features /DLR

Expand Down Expand Up @@ -132,33 +179,26 @@ using(var l = new Lua<ILua51>(
}
```

and **more!**
and more!

## How to Get LuNari

## How to Get

* NuGet PM: `Install-Package LuNari`
* [GetNuTool](https://github.com/3F/GetNuTool): `msbuild gnt.core /p:ngpackages="LuNari"` or [gnt](https://3f.github.io/GetNuTool/releases/latest/gnt/) /p:ngpackages="LuNari"
* NuGet Commandline: `nuget install LuNari`
* [/releases](https://github.com/3F/LuNari/releases) [ [latest](https://github.com/3F/LuNari/releases/latest) ]
* [Nightly builds](https://ci.appveyor.com/project/3Fs/LuNari/history) (`/artifacts` page). It can be unstable or not work at all. Use this only for tests of latest changes.
* Artifacts [older than 6 months](https://www.appveyor.com/docs/packaging-artifacts/#artifacts-retention-policy) you can also find as `Pre-release` with mark `🎲 Nightly build` on [GitHub Releases](https://github.com/3F/LuNari/releases) page.

* NuGet: [![LuNari](https://img.shields.io/nuget/v/LuNari.svg)](https://www.nuget.org/packages/LuNari/)
* Old packages before 1.5: [LunaRoad](https://www.nuget.org/packages/LunaRoad/)
* [GetNuTool](https://github.com/3F/GetNuTool): `msbuild gnt.core /p:ngpackages="LuNari"` or **[gnt](https://3f.github.io/GetNuTool/releases/latest/gnt/)** /p:ngpackages="LuNari"
* [GitHub Releases](https://github.com/3F/LuNari/releases) [ [latest](https://github.com/3F/LuNari/releases/latest) ]
* CI builds: [`CI /artifacts`](https://ci.appveyor.com/project/3Fs/lunari-0b02o/history) ( [old CI](https://ci.appveyor.com/project/3Fs/lunari/history) ) or find `🎲 CI build` on [GitHub Releases](https://github.com/3F/LuNari/releases) page.

## Roadmap

LuNari already provides flexible binding at runime. That is, as you can see above, you already can do anything between different versions via lambda-functions and DLR features.
However, the main goal for this project is to provide fully compatible API layer for more comfortable work with any popular Lua version like: 5.1, 5.2, 5.3 ...
However, an important goal of this project is also to provide a fully compatible API layer for more comfortable work with any popular Lua versions like: Lua 5.1, 5.2, 5.3 ...

## Contribute

Extend our API layer or improve all of what you want. It's completely transparent with our flexible architecture.

Here's how to extend API: [in a few steps (Wiki)](https://github.com/3F/LuNari/wiki/API.Dev)

If you ready to contribute, please use [Pull Requests](https://help.github.com/articles/creating-a-pull-request/) (please through non-master branches). Other ways like .patch files are possible, but it may take more time to review the changes.

*Also note: if it's not a simple binding to cover API, please provide related unit-tests. Thanks.*
Here's how to extend API: [in a few steps (Wiki)](https://github.com/3F/LuNari/wiki/API.Dev). Please use [Pull Requests](https://help.github.com/articles/creating-a-pull-request/) if you ready to contribute.

The Application Program Interface of Lua:

Expand All @@ -167,31 +207,14 @@ The Application Program Interface of Lua:
* [v5.3](https://www.lua.org/manual/5.3/manual.html#4)
* [v5.4](https://www.lua.org/manual/5.4/) *( preview )*

## How to Build
## How to Build LuNari

Use command:
Our build was based on [vssbe](https://github.com/3F/vsSolutionBuildEvent) scripts.

```
.\build Debug
```

*This will generate Zip & NuGet packages as `LuNari.<version>.nupkg` etc.*

**Please note:** current repository contains [git submodules](https://git-scm.com/book/en/Git-Tools-Submodules). Our build-scripts will restore this automatically instead of you:

* Inside IDE by [vsSBE](https://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/) v0.12.8+
* With msbuild tools by `submodules.bat`.

But just a note, how to do it manually:

* For initial cloning repo:
You don't need to do anything else, just navigate to root directory of this project, and:

```bat
.\build Debug
```
git clone --recursive https://github.com/3F/LuNari.git
```

* For already cloned:

```
git submodule update --init --recursive
```
**Or** please use v1.14+ plugin for [Visual Studio](https://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/)
38 changes: 35 additions & 3 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
- - - - -
LuNari
_ _ _ _ _
LuNari - https://github.com/3F/LuNari
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


[v1.6] 2019.12.21

* NEW: Complete .NET Core support.
.NET Standard 2.0+

* NEW: Implemented LuaD.
```
using(dynamic l = new LuaD("Lua.dll"))
{
// Lua now is yours ~
IntPtr L = l.luaL_newstate<LuaState>();
var num = l.lua_tonumber<LuaNumber>(L, 1);
}
```
Lua via Conari engine [DLR version]
Requires full name to requested lua function by default (IConfig).

* NEW: Added netfx based target platforms: net472.

* NEW: API. added:

+`lua_State* luaL_newstate(void);` /Lua 5.1; 5.2; 5.3

* CHANGED: Updated Conari 1.4. More speed and features:
https://github.com/3F/Conari/releases/tag/1.4

* CHANGED: Added the following tools to nupkg packages for related build processes.

https://www.nuget.org/packages/LuNari/
* tools\gnt.bat - https://github.com/3F/GetNuTool
* tools\hMSBuild.bat - https://github.com/3F/hMSBuild


[v1.5.1] 2019.01.30

* FIXED: Fixed nuget Conari version: "(1.3.0,)" > "1.3.0"
Expand Down

0 comments on commit 920c7a6

Please sign in to comment.