Toots du Jour (Apr 8)
- Giving Back to the Ecosystem: JetBrains Supports Volar #jetbrains #typescript #volar #vue blog.jetbrains.com/webstorm/20… #
- JavaScript toolkit Bun 1.1 delivers improved performance and debuts on Windows #bun #javascript #windows www.notebookcheck.net/JavaScri… #
- Why Spring Matters to Jakarta EE — and Vice Versa #jakarataee #java #spring newsroom.eclipse.org/eclipse-n… #
- Gestalt is a powerful Java configuration library designed to simplify handling and managing configurations in software projects. #config #java #kotlin github.com/gestalt-config/gest… #
- Big Tech passkey implementations are a trap. They embrace passkeys to maintain their walled gardens. #apple #google #passkey #proton proton.me/blog/big-tech-passke… #
- Distributed SQLite: Paradigm shift or hype? #database #distributed #postgresql #sqlite kerkour.com/distributed-sqlite… #
- Query Your C Code. ClangQL is a tool that allow you to run SQL-like query on C/C++ Code. #clang #clangql #cpluplus hackaday.com/2024/04/08/query-… #
Fly to the Moon
A sharp, stylish comedy-drama set against the high-stakes backdrop of NASA’s historic Apollo 11 moon landing. Brought in to fix NASA’s public image, sparks fly in all directions as marketing maven Kelly Jones (Johansson) wreaks havoc on launch director Cole Davis’s (Tatum) already difficult task. When the White House deems the mission too important to fail, Jones is directed to stage a fake moon landing as back-up and the countdown truly begins…
Toots du Jour (Apr 7)
- rPGP: Pure Rust implementation of OpenPGP #openp #rustland github.com/rpgp/rpgp?utm_mediu… #
GraalVM Native Image & bld
Someone asked us if bld could be used to generate native application with GraalVM. Our first reaction was, sure, you can create an extension to do just that. But after a bit of reflection, it dawned on me that it could easily be done using the bld-exec extension. The extension allows for executing applications from the command line.
The Maven plugin configuration given to us, as an example, looked something like:
<profile>
<id>native-image</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>native-image-maven-plugin</artifactId>
<version>21.2.0</version>
<configuration>
<imageName>ExampleApp</imageName>
<mainClass>com.example.ExampleApp</mainClass>
<buildArgs>
<!-- Reduces the image size - Ensures the native image doesn't include the
JVM as a fallback option -->
<buildArg>--no-fallback</buildArg>
<!-- Disables the use of the GraalVM compilation server -->
<buildArg>--no-server</buildArg>
<!-- Improve startup time - Initialize classes at build time rather than at
runtime -->
<buildArg>--initialize-at-build-time</buildArg>
<!-- Include all files under /resources -->
</buildArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>native-image</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
That's a handful at first glance. But once you understand how the native-image utility options work, it is pretty easy to convert:
@BuildCommand(value = "native-exec", summary = "Builds a native executable")
public void nativeExec() throws Exception {
new ExecOperation()
.fromProject(this)
.timeout(120)
.workDir(buildMainDirectory().getAbsolutePath())
.command("native-image",
"--no-fallback",
"--no-server",
"--initialize-at-build-time",
"com.example.ExampleApp",
new File(workDirectory(), "ExampleApp").getAbsolutePath())
.execute();
}
Just use ./bld compile native-exec, and you're off to the races.
I've created a full example to demonstrate how to build a native executable using a class or JAR.
After converting over 60 projects, I'm still impressed with how flexible (yet, simple) bld truly is.
Toots du Jour (Apr 5)
- Writing a Unix-like OS in Rust #octox #rustlang #unix vmm.dev/en/rust/osinrust.md?ut… #
- Google's Jpegli open-source library can compress high quality images 35% more than traditional JPEG codecs #compression #google #jpeg www.cnx-software.com/2024/04/0… #
- The Ktor Plugin Registry Has Launched! #jetbrains #kotlin #ktor blog.jetbrains.com/kotlin/2024… #
- JetBrains IDEs add AI-powered code autocompletion #ai #ide #jetbrains www.infoworld.com/article/3715… #
