@NotNull
@Override
protected ProcessHandler startProcess() throws ExecutionException {
final Sdk sdk = RustSdkUtil.getSdk(project);
if ( sdk == null ) {
throw new CantRunException("No Rust sdk defined for this project");
}
final RustSdkData sdkData = (RustSdkData)sdk.getSdkAdditionalData();
if ( sdkData == null ) {
throw new CantRunException("No Rust sdk defined for this project");
}
String projectDir = project.getBasePath();
if (projectDir == null) {
throw new CantRunException("Could not retrieve the project directory");
}
final SimpleProgramParameters params = new SimpleProgramParameters();
ProgramParametersUtil.configureConfiguration(params, rustConfiguration);
String outputPath = CompilerPaths.getModuleOutputPath(rustConfiguration.getModules()[0], false);
if (outputPath == null) {
throw new CantRunException("Could not retrieve the output directory");
}
// Build and run
String execName = outputPath.concat("/").concat(rustConfiguration.getName());