Building luasec as native extensions

Eh no, but I can send it through this message. :slight_smile: luasec.zip (3.1 MB)

It’s based on LuaSec 0.6 plus OpenSSL 1.0.2k and I did just very few tests with it so far. :slight_smile:

G.

2 Likes

Ah, forgot, it works only on MacOS at the moment, but it should be pretty easy add static libraries for iOS.

1 Like

New version here luasec.zip (3.1 MB)

I fixed few things and removed the https module, it was redundant. It has been tested against socket implementation in Defold and these samples and it works well on MacOS at least.

G.

3 Likes

Working on iOS and it will be available very soon. Ah, I updated OpenSSL static libraries to 1.1.0e, because the older ones don’t support 64-bit build for iOS.

2 Likes

Excellent! Good to hear that you are making progress!

1 Like

Here’s the new package. :slight_smile: luasec.zip (6.0 MB)
… with some tests tests.zip (68.1 KB)
Going towards the Android version now. :slight_smile:

4 Likes

How’s it going? Have you been making any progress on the Android version?

Hey, I was in holiday and still working on it. :stuck_out_tongue:

3 Likes

Hello, I’m having an “internal server error” when I try to make an Android bundle, is there a way to show a less generic message error? Are there particular steps to build static libs for Android here?

Thanks.

Sadly, some of the errors are lacking to say the least.
The error reporting is something we’ll look into very soon.

In the mean time, what if you double click on the error you’re getting, do you get a more detailed log? (i’m assuming you’re still using Editor 1?)

Yes, it points to the ext.manifest file, first line exactly, where it declares the name of the module. Tried to remove static libs for Android (and its platform declaration in that file), but nothing changed.

If you double click on that error icon on the first line, do you get a more detailed log in a popup window then?

No, sorry, I don’t see any popup window. I’m using the Editor v1, too.

Hmm, ok. Perhaps you can try this:
Right click on the problem, and select “Properties”:

In the tiny tiny window, under “Description” you can see more detailed log from the server:

In my case, I got this by adding an invalid tag “platforms2” in my manifest:

Again, sorry for the poor error handling

EDIT:
I also could see it by hovering with the mouse over the error:

2 Likes

Sorry, at the end it’s some kind of problem with my static libraries. Does Defold require particular settings for Android? They’re elf32 files for armv7, of course.

Hmm, nothing I can think of directly. We use NDK-10e with API version 14, and GCC 4.8

What error did you get?

I noticed our extension-android example is lacking a c++ lib example, so I’ll add that right away, hopefully it should help in debugging this.

EDIT:
I’ve now updated the extension-android with a C++ library, with a build.sh script. It show how to build a C++ lib from scratch.

1 Like

Thank you, I figured out why it wasn’t working: basically I had removed any reference of Android platform in ext.manifest file, put its static libs in lib/armv7-android rather than lib/android and finally the error disappeared.

1 Like

Done! :slight_smile: Here’s the final luasec extension for Android, MacOS and iOS.
luasec.zip (7.4 MB)
tests.zip (68.1 KB)

7 Likes

Well done!

Any plans on releasing the extension as a library? (e.g. via github)
Perhaps someone can help adding Windows support to it :slight_smile:

3 Likes

No problem, it’s here now. :slight_smile:
Is there already the native support for Windows?

3 Likes