Skip to main content

Posts

Showing posts from 2022

How to compile Electron from source (for arm64 / x64)?

Sometimes if prebuilt binaries of electron are not available for your platform or if you want to modify the electron source to customize to your need, you are at the right place. I had a requirement to have a <webview> tag inside another <webview> tag. Seems it is not supported out of the box. As per the suggestion provided in the above link, I thought I could modify a couple of lines and see if it works. Coincidentally I am running Kubuntu arm64 build on M1 mac via parallels. So I wanted a aarch64 (a.k.a arm64 ) build. So I provisioned a  t4g.medium (2vCPU , 4 GB RAM)   with Ubuntu 22.04 LTS.   I tried checking out the code as mentioned below. But within 30 mins I ran out of CPU credits and had to switch to   r6g.large (2vCPU , 16 GB RAM) . Code was checked out pretty fast (fast for 50GB of code). Yes you will need at least 60GB of disk. Ok, lets go through the steps for checking out and compiling. Step-1: Prepare the build environment sudo apt-get update &&

How to use Groovy + GraalVM + Quarkus together?

If you are one among those who like Groovy for its simplicity and tight integration with Java (and not for its dynamic capabilities) and wondered how to write Groovy code in a Quarkus application and compile it to native using GraalVM? I have you covered. You dont have to look anywhere else. Scope groovy code as part of quarkus application statically compilable groovy code with no dynamic feature compile the final application to native code using graalvm Code example can be found here . Steps Create a quarkus application as outlined here Add your groovy class under src/main/java Annotate your groovy class with @groovy.transform. CompileStatic create a file called application.properies under src/main/resources folder with the following content. quarkus.native.additional-build-args=\ --allow-incomplete-classpath, \ --report-unsupported-elements-at-runtime, \ --initialize-at-build-time, \ --initialize-at-run-time=org.codehaus.groovy.control.XStreamUtils\\,groov