Move build logic to lib (#97)

* refactored out build to lib

* save_raw returns

* fix indentations and other small fixes

* fix build API

* rename Target to SourceTarget

* fix formatting

* make join runtime_type into runtime_type and runtime_version
This commit is contained in:
Alexey
2018-08-01 17:26:22 +03:00
committed by Nikolay Volf
parent 3e7946ab1c
commit e491789127
5 changed files with 166 additions and 97 deletions

View File

@ -3,12 +3,7 @@
pub const UNKNOWN_TRIPLET: &str = "wasm32-unknown-unknown";
pub const EMSCRIPTEN_TRIPLET: &str = "wasm32-unknown-emscripten";
/// Target configiration of previous build step
#[derive(Debug, Clone, Copy)]
pub enum SourceTarget {
Emscripten,
Unknown,
}
use utils::SourceTarget;
/// Configuration of previous build step (cargo compilation)
#[derive(Debug)]
@ -59,4 +54,4 @@ impl<'a> SourceInput<'a> {
pub fn target(&self) -> SourceTarget {
self.target
}
}
}