Fix "can't find crate for std" for stm32-metapac-gen deps.
This commit is contained in:
		
							
								
								
									
										16
									
								
								stm32-metapac-gen/src/assets/build.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								stm32-metapac-gen/src/assets/build.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| use std::env; | ||||
|  | ||||
| fn main() { | ||||
|     let _chip_name = env::vars_os() | ||||
|         .map(|(a, _)| a.to_string_lossy().to_string()) | ||||
|         .find(|x| x.starts_with("CARGO_FEATURE_STM32")) | ||||
|         .expect("No stm32xx Cargo feature enabled") | ||||
|         .strip_prefix("CARGO_FEATURE_") | ||||
|         .unwrap() | ||||
|         .to_ascii_lowercase(); | ||||
|  | ||||
|     #[cfg(feature = "rt")] | ||||
|     println!("cargo:rustc-link-search=src/chips/{}", _chip_name); | ||||
|  | ||||
|     println!("cargo:rerun-if-changed=build.rs"); | ||||
| } | ||||
							
								
								
									
										6
									
								
								stm32-metapac-gen/src/assets/lib_inner.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								stm32-metapac-gen/src/assets/lib_inner.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| // GEN PATHS HERE | ||||
| mod inner; | ||||
|  | ||||
| pub mod common; | ||||
|  | ||||
| pub use inner::*; | ||||
		Reference in New Issue
	
	Block a user