Giter Club home page Giter Club logo

kotlin-rust's Introduction

Kotlin - Rust interop

This repository contains some sample code for using Rust together with Kotlin.

Contents

The app runs a simple micro-benchmark between Kotlin and Rust. It consists of sorting a random string lexicographically.

Both the Kotlin and Rust implementation are using functional-programming, with Kotlin using streams and Rust using iterators.

Dependencies

You will need:

  • a Java runtime (such as Oracle's JRE on Windows or OpenJDK on Linux)
  • Kotlin
  • Rust
  • GNU Make

Building / Running

Just run make.

Results

Rust is consistently 3-5 times faster than the equivalent Kotlin code.

Support libraries

The jni-rs crate is used in Rust to access JVM types, and a simple Kotlin app loads and runs the Rust code.

kotlin-rust's People

Contributors

gabrielmajeri avatar

Stargazers

Irfan Ghat avatar  avatar  avatar Amr Saraya avatar David J. Hamilton avatar  avatar sansiny avatar Peter Gulko avatar Zokirjon avatar Czinke Márton avatar  avatar John Cheng avatar KK68HK avatar Thomas Thachil avatar Ellis Breen avatar Miroslav Sobotka avatar Josh Skeen avatar Federico Zanardo avatar Thanos Psaridis avatar Copper Cash avatar  avatar Damon Oehlman avatar Subham K. avatar Houssam Elbadissi avatar  avatar Maksym avatar CryptoPatrick avatar Turry avatar Jiachun Tao avatar Andreas Mattsson avatar Ferrah Aiko avatar ypcpy avatar 题叶 avatar wint avatar  avatar Shailendra Sharma avatar 莯凛 avatar  avatar  avatar Valtteri Vallius avatar tuguzT avatar hamza mohamed ali avatar Geoff Webb avatar Guilherme Werner avatar  avatar Dagur Valberg avatar Daniel Simões avatar Yannick Heinrich avatar Yamaka avatar  avatar Aleksandr avatar Mihail Feraru avatar Shiveen Pandita avatar Dane Wilson avatar Markus Ressel avatar Devin Auclair avatar Mahdi Safarmohammadloo avatar gustin avatar Justin Webb avatar Ellen Teapot avatar  avatar Tyler Parker avatar Cout970 avatar Carol Ng avatar Jakub Błaszczyk avatar

Watchers

James Cloos avatar Maksim Peters avatar tuguzT avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.