I'll use this issue to log my thoughts on how to properly implement an Android port. The way it works today is: - The glutin port (`/ports/servo/`) is built as a library (even though `Cargo.toml` says it's a binary) by hijacking the linker (see `fake-ld.sh`) - a basic java app creates a SurfaceView - it loads the servo libary which will create the GL context - the loop is in the library The way I'd like it to work: - remove the ugly hack where the executable is transformed into a library - do not use `/ports/servo/` or Glutin - introduce `/ports/libsimpleservo/` where we wrap `/components/servo/` in a simpler API with JNI symbols - the java app will create a SurfaceView - the java app will also create the GL context and start the loop This is how the Klar and Crow ports work.
Activity
paulrouget commentedon May 30, 2018
TODO:
paulrouget commentedon May 30, 2018
Initial work can be found here: https://github.com/paulrouget/servo/tree/androidv2
paulrouget commentedon May 31, 2018
Current status:
./mach build -d --androidbuilds libservojni.so./mach package --dev --androidbuilds servo.apk./mach install --dev --android && ./mach run --androidinstalls and runs the apkThe ServoView is a regular Android widget that can be used in the design view:
Auto merge of #20912 - paulrouget:androidv2, r=<try>
Auto merge of #20912 - paulrouget:androidv2, r=jdm
Auto merge of #20912 - paulrouget:androidv2, r=jdm
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…