Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to embed Guile in a C++ app on iOS or Android?

Guile looks somewhat straightforward to embed into a C/C++ project, but how does it fare on iOS or Android? Does it require 3rd party libraries that are unavailable for those platforms?

How is it as an embeddable scripting language as opposed to JavaScript or Lua?

like image 506
GrooveStomp Avatar asked Jan 15 '11 07:01

GrooveStomp


People also ask

Can I code an iPhone app with C++?

You can build native C++ apps for iOS, Android, and Windows devices by using the cross-platform tools available in Visual Studio. Mobile development with C++ is a workload available in the Visual Studio installer.

How do I make an app for both iOS and Android?

With the help of Flutter It is a mobile UI framework offered by Google that makes it possible to build iOS & Android native apps on both platforms, using a single codebase in a fast and expressive way. Flutter development is carried out using the Dart – a programming language proposed by Google as well.

Can Android Studio apps run on iOS?

In Android Studio, click File | New | New Module. In the list of templates, select Kotlin Multiplatform Shared Module, enter the module name shared , and select the Regular framework in the list of iOS framework distribution options. This is required for connecting the shared module to the iOS application.

How can I use Android apps in iOS?

The first way is to use an emulator. This is software that simulates the functionality of a specific device, like an iPhone, so you can test your apps on it. Among the emulators available are Andyroid, Bluestacks, and Genymotion. The second way to run Android apps on an iPhone is to use a jailbroken device.


1 Answers

On iOS, C++ (apparently) works for back-end code, however, you'll need Objective-C for the GUI/event handling. (Corrected). In addition, Android code is usually Java. While you can write native-code, it is often slower because of the communication overhead between native code and Dalvik code on Android.

Guile builds with the GCC, and Apple's Xcode contains a variation of the GCC, so you might get it to work. However, I would be careful about a few things:

1) Apple's GCC fork may not contain all of the features necessary to build modern versions of Guile. 2) While Guile itself is licensed under the LGPL (GNU Lesser General Public License), and is therefore allowed to be used in iOS apps, many Guile libraries could be under the GPL, rendering them unusable (for legal, rather than technical, reasons).

I haven't been able to test this (don't have access to a Mac), however, Guile should at least build in Xcode.

As for Guile's performance as an embedded scripting language, personal preference takes precedence. Guile is a full-featured, modern Scheme, however, you must consider your target market. If they are likely to reject Scheme, JavaScript (especially) may be a better choice.

like image 100
nickname Avatar answered Sep 28 '22 05:09

nickname