-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
6 changed files
with
170 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.5.1 | ||
1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,84 @@ | ||
# LuNari | ||
# [LuNari](https://github.com/3F/LuNari) | ||
|
||
[](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;* | ||
|
||
[](https://ci.appveyor.com/project/3Fs/lunari/branch/master) | ||
[](https://ci.appveyor.com/project/3Fs/lunari-0b02o/branch/master) | ||
[](https://github.com/3F/LuNari/releases/latest) | ||
[](https://www.nuget.org/packages/LuNari/) | ||
[](https://github.com/3F/LuNari/blob/master/LICENSE) | ||
|
||
**Easy to start**: | ||
[](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 < [email protected] > :: github.com/3F | ||
Copyright (c) 2016,2017,2019 Denis Kuzmin < [email protected] > GitHub/3F | ||
``` | ||
|
||
[ ☕](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 | ||
|
||
|
@@ -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: [](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: | ||
|
||
|
@@ -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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters