|
|
@ -1,8 +1,6 @@ |
|
|
|
//! Initializing a crate for packing `.wasm`s.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use bindgen; |
|
|
|
use bindgen; |
|
|
|
use build; |
|
|
|
use build; |
|
|
|
use command::utils::{set_crate_path, create_pkg_dir}; |
|
|
|
use command::utils::{create_pkg_dir, set_crate_path}; |
|
|
|
use emoji; |
|
|
|
use emoji; |
|
|
|
use error::Error; |
|
|
|
use error::Error; |
|
|
|
use indicatif::HumanDuration; |
|
|
|
use indicatif::HumanDuration; |
|
|
@ -60,7 +58,6 @@ pub struct BuildOptions { |
|
|
|
#[structopt(long = "debug")] |
|
|
|
#[structopt(long = "debug")] |
|
|
|
/// Build without --release.
|
|
|
|
/// Build without --release.
|
|
|
|
debug: bool, |
|
|
|
debug: bool, |
|
|
|
|
|
|
|
|
|
|
|
// build config from manifest
|
|
|
|
// build config from manifest
|
|
|
|
// build_config: Option<BuildConfig>,
|
|
|
|
// build_config: Option<BuildConfig>,
|
|
|
|
} |
|
|
|
} |
|
|
@ -85,7 +82,7 @@ impl From<BuildOptions> for Build { |
|
|
|
type BuildStep = fn(&mut Build, &Step, &Logger) -> Result<(), Error>; |
|
|
|
type BuildStep = fn(&mut Build, &Step, &Logger) -> Result<(), Error>; |
|
|
|
|
|
|
|
|
|
|
|
impl Build { |
|
|
|
impl Build { |
|
|
|
/// Execute this `Init` command.
|
|
|
|
/// Execute this `Build` command.
|
|
|
|
pub fn run(&mut self, log: &Logger, mode: BuildMode) -> Result<(), Error> { |
|
|
|
pub fn run(&mut self, log: &Logger, mode: BuildMode) -> Result<(), Error> { |
|
|
|
let process_steps = Build::get_process_steps(mode); |
|
|
|
let process_steps = Build::get_process_steps(mode); |
|
|
|
|
|
|
|
|
|
|
@ -148,7 +145,6 @@ impl Build { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn step_check_crate_config(&mut self, step: &Step, log: &Logger) -> Result<(), Error> { |
|
|
|
fn step_check_crate_config(&mut self, step: &Step, log: &Logger) -> Result<(), Error> { |
|
|
|
info!(&log, "Checking crate configuration..."); |
|
|
|
info!(&log, "Checking crate configuration..."); |
|
|
|
manifest::check_crate_config(&self.crate_path, step)?; |
|
|
|
manifest::check_crate_config(&self.crate_path, step)?; |
|
|
|