Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit df8ab39

Browse files
committed
Less aggressive build script rerunning, doc clarification
1 parent 81dc4b2 commit df8ab39

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
114114
implementation with a global maximum size fixed at compile time.
115115
Suitable for deploying to non-WASM/Unix/Windows `#![no_std]` environments,
116116
such as on embedded devices with esoteric or effectively absent operating
117-
systems. The size defaults to 32 MB (33554432 bytes), and may be controlled
117+
systems. The size defaults to 32 MiB (33554432 bytes), and may be controlled
118118
at build-time by supplying an optional environment variable to cargo,
119119
`WEE_ALLOC_STATIC_ARRAY_BACKEND_BYTES`
120120

wee_alloc/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,3 @@ version = "0.2"
4949
[target.'cfg(target_os = "windows")'.dependencies.winapi]
5050
version = "0.3"
5151
features = ["memoryapi", "synchapi", "winbase"]
52-
53-
[build-dependencies]
54-
globwalk = "0.3"

wee_alloc/build.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate globwalk;
2-
31
use std::env::{self, VarError};
42
use std::fs::File;
53
use std::io::Write;
@@ -23,7 +21,6 @@ fn create_static_array_backend_size_bytes_file() {
2321
VarError::NotUnicode(_) => { panic!("Could not interpret WEE_ALLOC_STATIC_ARRAY_BACKEND_BYTES as a string representing a 32 bit unsigned integer")},
2422
},
2523
};
26-
println!("Setting the static_array_backend size to {} bytes", size);
2724
let mut f = File::create(&dest_path)
2825
.expect("Could not create file to store wee_alloc static_array_backend size metadata.");
2926
write!(f, "{}", size)
@@ -36,15 +33,13 @@ fn export_rerun_rules() {
3633
"cargo:rerun-if-env-changed={}",
3734
WEE_ALLOC_STATIC_ARRAY_BACKEND_BYTES
3835
);
39-
for entry_result in
40-
globwalk::glob("*.{toml,rs}").expect("Could not create a valid rust-file-finding glob")
36+
for path in [
37+
"./Cargo.toml",
38+
"./build.rs",
39+
"./src/lib.rs",
40+
"./src/imp_static_array.rs",
41+
].iter()
4142
{
42-
match entry_result {
43-
Ok(file) => println!("cargo:rerun-if-changed={}", file.path().display()),
44-
Err(e) => println!(
45-
"Failed to read file information for rerun preparation: {:?}",
46-
e
47-
),
48-
}
43+
println!("cargo:rerun-if-changed={}", path);
4944
}
5045
}

wee_alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
114114
implementation with a global maximum size fixed at compile time.
115115
Suitable for deploying to non-WASM/Unix/Windows `#![no_std]` environments,
116116
such as on embedded devices with esoteric or effectively absent operating
117-
systems. The size defaults to 32 MB (33554432 bytes), and may be controlled
117+
systems. The size defaults to 32 MiB (33554432 bytes), and may be controlled
118118
at build-time by supplying an optional environment variable to cargo,
119119
`WEE_ALLOC_STATIC_ARRAY_BACKEND_BYTES`
120120

0 commit comments

Comments
 (0)