
Enables creation of sub-processes with redirected I/O using a unified, easy-to-use API. Offers inheritance, piped, and null I/O modes, along with timeout detection, ensuring excellent performance and maintainability.
Kotlin Native library for create sub-process and redirect their I/O.
Rust is an excellent language that takes into account both performance and engineering.
In version 1.x, we use the following API to provide the function of creating child processes
fork of [POSIX api]CreateChildProcess of [win32 api]java.lang.ProcessBuilder of JVMIn version 2.x, we use the Rust standard library to provide the function of creating child processes.
std::process::Command of Rustjava.lang.ProcessBuilder of JVMIt will bring
build.gradle.kts:
// ……
repositories {
mavenCentral()
}
// ……
dependencies {
// should replace with the latest version
implementation("com.kgit2:kommand:2.x")
}
Full example check kommand-examples/timeout.
Dependency:
required kotlinx-coroutines
cargo install just)Recommend build all platforms in macOS.
Kotlin Multiplatform gets the most complete support on macOS.
If you are using macOS, you can install the cross-compile toolchain with
just prepareOtherwise, you need to install the cross-compile toolchain yourself.
git clone https://github.com/kgit2/kommand.gitcd kommand-core
just all./gradlew buildOnly linux support cross-platform test.
# for x86_64
just linuxX64Test
# for aarch64
just linuxArm64Test@XJMiada.(Original Picture)
Apache2.0 © BppleMan
Kotlin Native library for create sub-process and redirect their I/O.
Rust is an excellent language that takes into account both performance and engineering.
In version 1.x, we use the following API to provide the function of creating child processes
fork of [POSIX api]CreateChildProcess of [win32 api]java.lang.ProcessBuilder of JVMIn version 2.x, we use the Rust standard library to provide the function of creating child processes.
std::process::Command of Rustjava.lang.ProcessBuilder of JVMIt will bring
build.gradle.kts:
// ……
repositories {
mavenCentral()
}
// ……
dependencies {
// should replace with the latest version
implementation("com.kgit2:kommand:2.x")
}
Full example check kommand-examples/timeout.
Dependency:
required kotlinx-coroutines
cargo install just)Recommend build all platforms in macOS.
Kotlin Multiplatform gets the most complete support on macOS.
If you are using macOS, you can install the cross-compile toolchain with
just prepareOtherwise, you need to install the cross-compile toolchain yourself.
git clone https://github.com/kgit2/kommand.gitcd kommand-core
just all./gradlew buildOnly linux support cross-platform test.
# for x86_64
just linuxX64Test
# for aarch64
just linuxArm64Test@XJMiada.(Original Picture)
Apache2.0 © BppleMan