File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,13 +236,13 @@ impl Cmd {
236236 target_file_path. clone ( )
237237 } ;
238238
239- #[ cfg( feature = "opt " ) ]
239+ #[ cfg( feature = "additional-libs " ) ]
240240 let mut optimized_path = None ;
241- #[ cfg( not( feature = "opt " ) ) ]
241+ #[ cfg( not( feature = "additional-libs " ) ) ]
242242 let optimized_path = None ;
243243
244244 if self . optimize {
245- #[ cfg( feature = "opt " ) ]
245+ #[ cfg( feature = "additional-libs " ) ]
246246 {
247247 use crate :: wasm:: Args as WasmArgs ;
248248 let optimized_file_path = final_path. with_extension ( "optimized.wasm" ) ;
@@ -252,7 +252,7 @@ impl Cmd {
252252 wasm_args. optimize ( & optimized_file_path) ?;
253253 optimized_path = Some ( optimized_file_path) ;
254254 }
255- #[ cfg( not( feature = "opt " ) ) ]
255+ #[ cfg( not( feature = "additional-libs " ) ) ]
256256 {
257257 print. warnln (
258258 "Must install with \" opt\" feature (e.g. `cargo install --locked soroban-cli --features opt`) to use --optimize" ,
Original file line number Diff line number Diff line change 11use clap:: { arg, command, Parser } ;
22use std:: fmt:: Debug ;
3- #[ cfg( feature = "additional-libs" ) ]
4- use wasm_opt:: { Feature , OptimizationError , OptimizationOptions } ;
53
64use crate :: wasm;
75
@@ -19,9 +17,6 @@ pub struct Cmd {
1917pub enum Error {
2018 #[ error( transparent) ]
2119 Wasm ( #[ from] wasm:: Error ) ,
22- #[ cfg( feature = "additional-libs" ) ]
23- #[ error( "optimization error: {0}" ) ]
24- OptimizationError ( OptimizationError ) ,
2520 #[ cfg( not( feature = "additional-libs" ) ) ]
2621 #[ error( "must install with \" additional-libs\" feature." ) ]
2722 Install ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ pub enum Error {
5050 ContractIsStellarAsset ,
5151 #[ error( transparent) ]
5252 Network ( #[ from] NetworkError ) ,
53- #[ cfg( feature = "opt " ) ]
53+ #[ cfg( feature = "additional-libs " ) ]
5454 #[ error( "optimization error: {0}" ) ]
5555 OptimizationError ( #[ from] wasm_opt:: OptimizationError ) ,
5656}
@@ -96,7 +96,7 @@ impl Args {
9696 Ok ( Hash ( Sha256 :: digest ( self . read ( ) ?) . into ( ) ) )
9797 }
9898
99- #[ cfg( feature = "opt " ) ]
99+ #[ cfg( feature = "additional-libs " ) ]
100100 /// Optimizes the wasm file in place or outputs to another file.
101101 pub fn optimize ( & self , output : & Path ) -> Result < ( ) , Error > {
102102 use wasm_opt:: { Feature , OptimizationOptions } ;
You can’t perform that action at this time.
0 commit comments