Hi all,

currently "x/mobile" support Android platform by generating AAR files, it 
can be easily support other platforms like Desktop (Windows, Linux, MacOS) 
for Java/Kotlin by generating a JAR file and .(so/dll/dylib), it only need 
to include the right headers to be compiled to the right platform.

I can add the support for desktop, my initial thoughts:


   - Add new option to `-target desktop` in `gomobile bind`, or ` -target 
   jar`
   - Add new flag to `gobind` called `platform` which default to `android` 
   for backward compatibility and new option `desktop`.
   - If `desktop` selected, `gomobile` will check for JAVA_HOME not android 
   SDK.
   - If `desktop` selected, it will check for `GOOS` to compile the current 
   version of the JAR and shared library, and check if the JNI header exist in 
   JAVA_HOME.
   - Create new file `SeqDesktop.java` which doesn't include Android 
   Context `setContext`, or generate `Seq.java` on the fly like other .support 
   files.
   - Create new seq_desktop.{c,go} with the appropriate headers (e.g. 
   stdio.h instead of log.h) and include the correct flags CFLAGS, LDFLAGS per 
   desktop platform based on `GOOS`.
   - Change all auto-generated files to match the correct platform.


Personally I want to use Go with the Kotlin Desktop Compose.

I want to ask before I start, are any of it interesting to the "x/mobile" 
team or not?

K

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/bc1d1cd1-afd8-4c35-af23-ad6c5f56124cn%40googlegroups.com.

Reply via email to