Crates.io | jcargo |
lib.rs | jcargo |
version | 0.2.0 |
source | src |
created_at | 2021-11-23 15:45:05.759744 |
updated_at | 2022-01-13 10:30:54.328323 |
description | An attempt at making an equivalent to Rust's excellent build tool for the JVM ecosystem. |
homepage | https://github.com/Gui-Yom/jcargo/ |
repository | https://github.com/Gui-Yom/jcargo/ |
max_upload_size | |
id | 486303 |
size | 100,116 |
An attempt at making an equivalent to Rust's excellent build tool for the JVM ecosystem.
Maven is awful, who wants to write xml. Gradle is a step in the right direction, but you need a degree to use it (and it requires a damn daemon to hide the fact that it is painfully slow).
Jcargo doesn't run on the JVM, it doesn't suffer long boot times (essential for a CLI). It comes with another project of mine : https://github.com/Gui-Yom/native-jdktools, an attempt at compiling the jdk tools (javac, javadoc, jar ...) with GraalVM to improve boot times.
Jcargo is configured from a single jcargo.toml
file that is simple to write and read. It follows
the principle of "Simple and efficient enough for 90% of use cases", for the remaining 10% we may
need a build script or something (to be explored later).
For 90% of use cases, you just need to bootstrap a project that pulls up some dependencies without any special processing of any sort.
The project is very far from being usable in practice on anything real. It can successfully compile projects without any dependencies tho.
See the Releases page.
Requires at least Rust 1.56
.
cargo install jcargo
git clone https://github.com/Gui-Yom/jcargo
cd jcargo
cargo install --path .
For now, JDK_HOME/bin
must be in your path for jcargo to find the jdk tools. If you want to
compile kotlin sources, set KOTLINC_HOME
to point to the installation directory of kotlinc.
If using native-jdktools, please set NATIVE_JDKTOOLS
to point to the native-jdktools executable.
Please also set JDKTOOLS_HOME
to a jdk home directory.
Configuration is definitely not frozen. I particularly don't like how dependencies are specified. Example :
group = "marais"
artifact = "testproject"
version = "0.1.0"
[dependencies]
# Compile and runtime dependencies
compileRuntime = [
"org.apache.logging.log4j:log4j-api:2.17.1"
]
# Runtime only dependencies
runtime = [
{ group = "org.apache.logging.log4j", artifact = "log4j-core", version = "2.17.1" }
]
# Compile only
compile = []
transitive = []
[[entrypoints]]
class = "Main"
[[entrypoints]]
name = "Other"
class = "OtherMain"
Read some of the designs of jcargo.
means a feature is partially implemented, not completely finished
means a feature is completely absent
Project model, configuration and management
target
dirJava support
Kotlin support
Packaging
IDE Support