solverforge-service
JVM lifecycle management for SolverForge's embedded solver service.
Overview
This crate provides automatic management of the Timefold solver service JVM process:
- JAR Management - Downloads and caches the solver service JAR from Maven
- Embedded Service - Spawns and manages the JVM process lifecycle
- Configuration - Port, Java options, timeouts, and paths
Usage
Add to your Cargo.toml:
[]
= "0.1"
Start Embedded Service
use ;
// Start with default configuration
let service = start?;
// Get the solver service client
let solver_service = service.solver_service;
// Service URL for manual use
println!;
// Service is automatically stopped on drop
Custom Configuration
use ServiceConfig;
use Duration;
let config = ServiceConfig ;
let service = start?;
Service Lifecycle
let mut service = start?;
// Check if running
if service.is_running
// Explicit stop (also called on drop)
service.stop?;
JAR Source
The solver service JAR is:
- Downloaded from Maven Central on first use
- Cached in
~/.cache/solverforge/ - Reused for subsequent runs
Requirements
- Java 24+ - Must be installed and in PATH (or set
java_home) - Network - Required for initial JAR download
Documentation
License
Apache-2.0