Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml.cross-wasm32p1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-wasip1]
runner = "wasmtime --dir . --dir src --dir /"
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ jobs:
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- run: cargo build --target wasm32-wasip1
# -p libwild prevents integration tests from running. they depend on
# spawning processes, which isn't supported on wasi.
- run: cargo test --profile ci -p libwild

spelling:
name: Spell Check with Typos
Expand Down
4 changes: 4 additions & 0 deletions libwild/src/args/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "wasi", ignore = "wasi doesn't have a temp dir")]
fn test_parse_file_only_options() {
// Create a temporary file containing the same options (one per line) as INPUT1
let file = NamedTempFile::new().expect("Could not create temp file");
Expand All @@ -2111,6 +2112,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "wasi", ignore = "wasi doesn't have a temp dir")]
fn test_parse_mixed_file_and_inline_options() {
// Create a temporary file containing some options
let file = NamedTempFile::new().expect("Could not create temp file");
Expand All @@ -2130,6 +2132,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "wasi", ignore = "wasi doesn't have a temp dir")]
fn test_parse_overlapping_file_and_inline_options() {
// Create a set of file options that has a duplicate of an inline option
let mut file_options = FILE_OPTIONS.to_vec();
Expand All @@ -2152,6 +2155,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "wasi", ignore = "wasi doesn't have a temp dir")]
fn test_parse_recursive_file_option() {
// Create a temporary file containing a @file option
let file1 = NamedTempFile::new().expect("Could not create temp file");
Expand Down
5 changes: 4 additions & 1 deletion libwild/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4902,7 +4902,10 @@ fn test_no_disallowed_overlaps() {
output_sections.output_order(crate::output_kind::OutputKind::StaticExecutable(
crate::args::RelocationModel::NonRelocatable,
));
let args = crate::args::elf::ElfArgs::default();
let mut args = crate::args::elf::ElfArgs::default();
if args.arch == crate::arch::Architecture::Unsupported {
args.arch = crate::arch::Architecture::X86_64;
}
let section_part_sizes = output_sections.new_part_map::<u64>().map(|_, _| 7);

let section_part_layouts = layout_section_parts::<Elf>(
Expand Down
4 changes: 3 additions & 1 deletion wild/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ serde-keyvalue = { workspace = true }
strum = { workspace = true }
tempfile = { workspace = true }
toml = { workspace = true }
wait-timeout = { workspace = true }
which = { workspace = true }

[target.'cfg(not(target_os = "wasi"))'.dev-dependencies]
wait-timeout = { workspace = true }

[features]
default = ["fork"]

Expand Down
Loading