Skip to content

A Gradle Plugin which provides a build environment for Rust+Cargo projects as well as installs RustUp if not found.

Notifications You must be signed in to change notification settings

RuneBox/rust-gradle-plugin

Repository files navigation

<style> body { font-family: Arial, serif; margin: 0; padding: 0; font-size: 1.1em; color: #333; } h1, h2, h3, h4, h5, h6 { color: #1976D2; cursor: pointer; } .highlight { color: #FF3D00; } a { color: #1976D2; text-decoration: none; } a:hover { text-decoration: underline; } p, ul { margin: 0.8em 0; } #header-banner { color: white; padding: 20px 0; text-align: center; } </style>

Gradle-Rust-Plugin

A plugin for Gradle that provides RustUp, Rustc, and Cargo tasks

About

This project comprises a powerful and flexible Gradle plugin tailored for Rust development. The plugin integrates key Rust tools - RustUp, Rustc, and Cargo - into the Gradle framework, enabling streamlined and coordinated build processes.

Add RuneBox Maven's repository to your build.gradle.kts file.
pluginManagement {
    repositories {
        maven(url = "https://maven.runebox.org/")
        gradlePluginPortal()
    }
}

root.projectName = "my-rootproj"

Add the gradle-plugin and configuration to your build.gradle.kts

plugins {
    id("io.runebox.gradle.rust") version "0.1.0"
}

dependencies {
    ...
}

/*
 * The Rust-Gradle-Plugin Config
 */

rust {
    module("my-library") {
        path = file("src/my-library")
        profile = "release
        targets = listOf("x86_64", "x86", "arm", "arm_64")
        
        buildType("debug") {
            profile = "dev"
        }

        buildType("release") {
            profile = "release"
            runTests = true
            targets = listOf("arm", "arm64", "x86", "x86_64")
        }
    }

    module("another-rust-module") {
        ...
    }
}

About

A Gradle Plugin which provides a build environment for Rust+Cargo projects as well as installs RustUp if not found.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages