Skip to content

Commit 14182f4

Browse files
committed
Solve PR comments.
1 parent b183486 commit 14182f4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

builder/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ cmake = "0.1.50"
2727
pico-args = "0.5.0"
2828
tar = "0.4.41"
2929
tools = { path = "../tools" }
30-
toml = "0.8.22"
31-
serde = "1.0.219"
30+
toml = "0.8.19"
31+
serde = "1.0.209"
3232

3333
[[bin]]
3434
name = "release"

builder/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ pub mod crashtracker;
99
pub mod module;
1010
pub mod utils;
1111

12-
// #[cfg(feature = "profiling")]
12+
#[cfg(feature = "profiling")]
1313
pub mod profiling;

builder/src/profiling.rs

+4
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,15 @@ impl Module for Profiling {
174174
cargo_args.push("--release");
175175
}
176176

177+
// Parse profiling-ffi manifest in order to get the crate-type array.
177178
let prof_path: PathBuf = [project_root().to_str().unwrap(), CRATE_FOLDER, "Cargo.toml"]
178179
.iter()
179180
.collect();
181+
// Buffer the manifest file.
180182
let cargo_toml = fs::read_to_string(prof_path).unwrap();
183+
// Use serde to get access to the lib section.
181184
let parsed: CargoFile = toml::from_str(&cargo_toml).unwrap();
185+
// Iterate over all the crate types in order to build the artifacts for each one.
182186
for crate_type in parsed.lib.crate_type.iter() {
183187
// Ignore lib crate-type
184188
if crate_type == "lib" {

0 commit comments

Comments
 (0)