Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Support for Lua 5.3 #39

Open
mystise opened this issue Mar 3, 2015 · 4 comments
Open

[Enhancement] Support for Lua 5.3 #39

mystise opened this issue Mar 3, 2015 · 4 comments

Comments

@mystise
Copy link

mystise commented Mar 3, 2015

Integers and bitwise operators are useful for stuff I want to use Lua for.

Not sure how feasible this is, but I thought I'd throw it out there.

@JustAPerson
Copy link

Additionally, 5.1 support for LuaJIT would be neato.

@TyOverby
Copy link
Contributor

TyOverby commented Mar 3, 2015

Both of these would be really cool. Imagine if all it took to move from lua versions was a cargo feature!

@tomaka
Copy link
Owner

tomaka commented Mar 3, 2015

Cargo features are only designed to add optional features, they are different from flags that change the library.

For example:

  • Library A depends on hlua
  • Library B depends on hlua
  • Program depends on both libraries A and B

When you compile the program, if library B requires a Cargo feature in hlua, the same Cargo feature will also be active when compiling library A. This is obviously bad if you use that for lua versions, as it could result in bugs in library A.

@tomaka
Copy link
Owner

tomaka commented Jul 13, 2015

I thought a bit about this.

Cargo features can be appropriate, since Lua 5.3 is backward compatible with Lua 5.1.

By default hlua would link to luajit, but if you activate a Cargo feature it links to Lua 5.3 instead. This would make the library slower, but the essential thing is that it would continue to work.

Regular flags would still be more appropriate for this, but using a Cargo feature can be used for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants