GithubHelp home page GithubHelp logo

lua-c-api-examples's Introduction

Lua-C-API

A personal repo where I push things while I'm learning the Lua C API! Feel free to contribute :)

NOTE: I really think that the Lua C API and this examples can be highly self-explained, BUT I recommend you to always check the Reference Manual to see in detail how every thing works

Building

If you want to build this, you'll need Meson and Lua 5.1 development files and then:

meson . _BUILD
ninja -C _BUILD

And in the _BUILD folder you'll see the compiled files

Running tests

Just:

meson test -C _BUILD

References

I mainly readed the Official Reference Manual but I also saw this:

And finally, thanks to the members of the Telegram Group!

Why Lua 5.1?

Yes ✔️

lua-c-api-examples's People

Contributors

miqueas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lua-c-api-examples's Issues

Make this project more portable

This is something I've been considering for a while. Since some linux distros doesn't have all versions of Lua in their repositories (see Fedora and openSUSE) or the user is on Windows, building this project can be a bit hard or may require to modify the meson.build files to work.

So, to solve this I have a couple of ideas:

  • Create a Meson .wrap file and make Lua a dependency of this project
  • Use minilua
  • Something else (a custom solution)

I already tried the first one, but... It was more complicated than I expected so I never continued; plus, I never uploaded the changes made, but I'm still considering that option.

The 2nd options looks better tho, but it's only Lua 5.4, but the solution that proposes minilua is pretty smart (IMO) and very simple.

To be honest, I'll probably use the minilua solution, but custom: I'll take the gen.sh script from minilua to generate C headers for all major Lua versions.

Hopefully, I'll fix this soon. I'm gonna update this issue with a task list if I make some progress.

  • Translate Lua 5.4 Makefile to Meson. Done, see #3
  • Add support for Lua 5.1, 5.2 and 5.3
  • Maybe test it a little and ensure it works?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.