diff --git a/src/project.cc b/src/project.cc index 64b6863..b36baaf 100644 --- a/src/project.cc +++ b/src/project.cc @@ -768,6 +768,14 @@ void Project::HTML::compile_and_run() { #endif } +void Project::Rust::compile() { + std::string command=build->get_compile_command(); + Terminal::get().print("Running "+command+"\n"); + Terminal::get().async_process(command, Notebook::get().get_current_view()->file_path.parent_path(), [command](int exit_status) { + Terminal::get().async_print(command+" returned: "+std::to_string(exit_status)+'\n'); + }); +} + void Project::Rust::compile_and_run() { std::string command="cargo run"; Terminal::get().print("Running "+command+"\n"); diff --git a/src/project.h b/src/project.h index 674f6d7..aeffc4a 100644 --- a/src/project.h +++ b/src/project.h @@ -147,6 +147,7 @@ namespace Project { public: Rust(std::unique_ptr &&build) : LLDB(std::move(build)) {} + void compile() override; void compile_and_run() override; };