<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=IT link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Hi all, <o:p></o:p></p><p class=MsoNormal><span lang=EN-US>I see. I read the possible options. I have been trying to comprehend the various aspects of the topic treated. I have got ten years of java experience but I am new to openjdk developing. The bar is high for me so I ask you be patient. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I have been trying to figure out the subject<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Cheers<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Giovanni<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> mobile-dev <mobile-dev-retn@openjdk.org> <b>On Behalf Of </b>Johan Vos<br><b>Sent:</b> venerdì 13 ottobre 2023 09:18<br><b>To:</b> mobile-dev@openjdk.org<br><b>Subject:</b> Moving forward<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I want to toss a few ideas about how to move OpenJDK on Mobile forward.<o:p></o:p></p></div><div><p class=MsoNormal>There are 2 main areas I want to touch: code organization and validation<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>1. CODE ORGANIZATION<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The git repository for this project is at <a href="https://github.com/openjdk/mobile">https://github.com/openjdk/mobile</a> and it has a single branch (main) which contains a few changes compared to the jdk repository.<o:p></o:p></p></div><div><p class=MsoNormal>The openjdk/jdk repository is not an upstream for openjdk/mobile, but the Skara bot will sync all changes done in openjdk/jdk into openjdk/mobile. This works really well, and only once every few months there are merge conflicts which I solve manually.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>However, the openjdk/mobile repository itself does not have all required changes to build an ios/Android version of the JDK. Gluon has a fork of openjdk/mobile (at gluonhq/mobile) that has 2 branches for building a mobile JDK for Java 11 and Java 19 [1].<o:p></o:p></p></div><div><p class=MsoNormal>The changes introduced in these forks are minimal, but not (yet) upstreamed to openjdk/mobile. The main reason for this is that that might conflict with the "ultimate" goal of having all changes required to build the JDK on mobile are in the upstream openjdk/jdk repository. The quality bar for having changes in the openjdk/jdk repository is (for very good reasons) pretty high, and it requires time and sponsoring from jdk committers/reviewers.<o:p></o:p></p></div><div><p class=MsoNormal>Hence, I want the changes in the openjdk/mobile main branch to be as small as possible, and with a top-quality, preferably already reviewed by a jdk reviewer. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>On the other hand, not having the changes from the gluonhq/mobile repository upstreamed to openjdk/mobile makes it harder for others to build OpenJDK Mobile. A solution I propose is to create a development branch that accepts mobile-specific changes that are reviewed in the Mobile project. Once there is enough experience and consensus, changes can be merged into the openjdk/mobile main branch.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>There are a number of options for this development branch or branches.<o:p></o:p></p></div><div><p class=MsoNormal>1. a single branch from main/HEAD that is automatically or manually being synced from main (which is synced from openjdk/jdk).<o:p></o:p></p></div><div><p class=MsoNormal>2. version-specific branches (e.g. 21-dev) that either are not synced (easiest) or that are synced from the respective jdk repositories (e.g. openjdk/jdk21u). The latter requires help from the Skara team and/or the OpenJDK infrastructure team. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>2. VALIDATION<o:p></o:p></p></div><div><p class=MsoNormal>Successfully building the OpenJDK mobile libraries is 1 thing, but it would be good to have some criteria that determines if a build is ok or not. Given the goal of this project (running Java code on mobile systems), that is not easy. <o:p></o:p></p></div><div><p class=MsoNormal>Again, there are a number of options here:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>1. create a project (for ios/android) and use a no-jit/zero-interpreter mode to run a basic HelloWorld (this is what is described at the project pages [2] and [3]).<o:p></o:p></p></div><div><p class=MsoNormal>2. use an AOT compiled VM + sample code using GraalVM to convert a standard HelloWorld app into a shared library, which is then linked with the compiled VM into an ios/android project (this is what we currently do with Gluon Substrate [4]).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If there are other options we should consider, I would love to hear that.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>In general, feedback/comments are very welcome!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>- Johan<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>[1] <a href="https://github.com/gluonhq/mobile/tree/jdk19">https://github.com/gluonhq/mobile/tree/jdk19</a><o:p></o:p></p></div><div><p class=MsoNormal>[2] <a href="https://openjdk.org/projects/mobile/ios.html">https://openjdk.org/projects/mobile/ios.html</a><o:p></o:p></p></div><div><p class=MsoNormal>[3] <a href="https://openjdk.org/projects/mobile/android.html">https://openjdk.org/projects/mobile/android.html</a><o:p></o:p></p></div><div><p class=MsoNormal>[4] <a href="https://github.com/gluonhq/substrate">https://github.com/gluonhq/substrate</a><o:p></o:p></p></div></div></div></body></html>