All Projects → HewlettPackard → Kraal

HewlettPackard / Kraal

Licence: mit
Enables the use of Kotlin coroutines and GraalVM native-image together

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Kraal

Handle Path Oz
Android Library to handle multiple Uri's(paths) received through Intents.
Stars: ✭ 36 (-46.27%)
Mutual labels:  coroutines
Awesome Android Kotlin Apps
👓 A curated list of awesome android kotlin apps by open-source contributors.
Stars: ✭ 1,058 (+1479.1%)
Mutual labels:  coroutines
Hal
🔴 A non-deterministic finite-state machine for Android & JVM that won't let you down
Stars: ✭ 63 (-5.97%)
Mutual labels:  coroutines
Eyepetizer
🔥基于 Kotlin 语言仿写「开眼 Eyepetizer」的一个短视频 Android 客户端项目,采用 Jetpack + 协程实现的 MVVM 架构。
Stars: ✭ 988 (+1374.63%)
Mutual labels:  coroutines
Sesame
Android architecture components made right
Stars: ✭ 48 (-28.36%)
Mutual labels:  coroutines
Flow
C# co-routine Kernel for .Net. Includes Futures, Barriers, Triggers, Timers and Groups. Gamasutra article provides extra documentation.
Stars: ✭ 59 (-11.94%)
Mutual labels:  coroutines
Ktx
LibKTX: Kotlin extensions for LibGDX games and applications
Stars: ✭ 913 (+1262.69%)
Mutual labels:  coroutines
Plasma
An Android Application written using latest Android Jetpack components and best practices, which displays trending movies/TV shows and cast, user can search movies and TV shows and also add them to watchlist.
Stars: ✭ 67 (+0%)
Mutual labels:  coroutines
Tascalate Javaflow
Continuations / CoRoutines for Java 1.5 - 11, build tools, CDI support. This project is based on completely re-worked Apache Jakarta Commons JavaFlow library.
Stars: ✭ 51 (-23.88%)
Mutual labels:  coroutines
Tascalate Async Await
Async / Await asynchronous programming model for Java similar to the functionality available in C# 5. The implementation is based on continuations for Java (see my other projects).
Stars: ✭ 60 (-10.45%)
Mutual labels:  coroutines
Wanandroid
Jetpack MVVM For Wanandroid 最佳实践 !
Stars: ✭ 1,004 (+1398.51%)
Mutual labels:  coroutines
Mvi Cleanarch
simple code for MVI architecture
Stars: ✭ 45 (-32.84%)
Mutual labels:  coroutines
Disneymotions
🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.
Stars: ✭ 1,105 (+1549.25%)
Mutual labels:  coroutines
Ktor Rest Sample
Sample REST Service written in Kotlin with Ktor Framework
Stars: ✭ 37 (-44.78%)
Mutual labels:  coroutines
Php Ion
Asynchronous PHP
Stars: ✭ 65 (-2.99%)
Mutual labels:  coroutines
Plainupnp
PlainUPnP is an upnp control point application for android.
Stars: ✭ 33 (-50.75%)
Mutual labels:  coroutines
Assure
A Kotlin library that makes biometric authentication quick and easy.
Stars: ✭ 55 (-17.91%)
Mutual labels:  coroutines
Paperplane
📚 PaperPlane - An Android reading app, including articles from Zhihu Daily, Guokr Handpick and Douban Moment.
Stars: ✭ 1,147 (+1611.94%)
Mutual labels:  coroutines
Charly Vm
Fibers, Closures, C-Module System | NaN-boxing, bytecode-VM written in C++
Stars: ✭ 66 (-1.49%)
Mutual labels:  coroutines
Pinboard Kotlin
Unofficial Pinboard android app, developed as a playground to study many topics related to Android. Kotlin + Coroutines + MVVM
Stars: ✭ 60 (-10.45%)
Mutual labels:  coroutines

Kraal

Download Build Status

Attempting to use GraalVM and Kotlin coroutines together fails due to a limitation of GraalVM - it cannot handle some perfectly valid bytecode produced by the Kotlin compiler.

Kraal performs "node splitting" on Java bytecode in order to eliminate the irreducible loops produced by the Kotlin compiler that GraalVM doesn't handle. The result is a functionally-equivalent bytecode which can be successfully processed with GraalVM.

Eventually, GraalVM may support irreducible loops, or the Kotlin compiler may add a flag to produce bytecode without them. Until then, Kraal allows the usage of these two technologies together.

Usage

Gradle

Using the Kotlin DSL:

plugins {
    id("com.hpe.kraal") version "0.0.15"
}

The Kraal Gradle plugin by default takes all jars produced by the build and their runtime dependencies, processes them to remove irreducible loops, and leaves processed copies of the jars under build/kraal.

The kraal extension is provided for convenient configuration of the default execution of KraalTask:

kraal {
    input = files(...) // *replace* set of input files
    from(...)          // or, *add* to set of input files

    outputDirectory = file(...)
}

The task and extension expose properties that create a Provider of a zipTree of the processed versions of all of the files. This can be used as a convenient way to create a "fat jar" of the processed classes:

val fatjar by tasks.creating(Jar::class) {
    from(kraal.outputZipTrees) {
        exclude("META-INF/*.SF")
        exclude("META-INF/*.DSA")
        exclude("META-INF/*.RSA")
    }
}

See the example directory for a complete working example with Ktor and GraalVM.

Maven

Use the exec-maven-plugin to execute the Kraal driver application com.hpe.kraal.MainKt:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.6.0</version>
    <dependencies>
        <dependency>
            <groupId>com.hpe.kraal</groupId>
            <artifactId>kraal</artifactId>
            <version>0.0.15</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <goals>
                <goal>java</goal>
            </goals>
            <phase>package</phase>
            <configuration>
                <mainClass>com.hpe.kraal.MainKt</mainClass>
                <arguments>
                    <argument>${project.build.directory}/${project.build.finalName}.${project.packaging}</argument>
                </arguments>
                <includePluginDependencies>true</includePluginDependencies>
            </configuration>
        </execution>
    </executions>
</plugin>

See the maven-example directory for a complete working example with Ktor and GraalVM.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].