Skip to content

formatter: Size assertion is not satisfied for --target wasm32-wasip1-threads #15823

@leaysgur

Description

@leaysgur

#[cfg(debug_assertions)]
const _: () = {
if cfg!(target_pointer_width = "64") {
assert!(
size_of::<FormatElement>() == 40,
"`FormatElement` size exceeds 40 bytes, expected 40 bytes in 64-bit platforms"
);
} else {
assert!(
size_of::<FormatElement>() == 24,
"`FormatElement` size exceeds 24 bytes, expected 24 bytes in 32-bit platforms"
);
}
};
#[cfg(not(debug_assertions))]
const _: () = {
if cfg!(target_pointer_width = "64") {
assert!(
size_of::<FormatElement>() == 24,
"`FormatElement` size exceeds 24 bytes, expected 24 bytes in 64-bit platforms"
);
} else {
assert!(
size_of::<FormatElement>() == 16,
"`FormatElement` size exceeds 16 bytes, expected 16 bytes in 32-bit platforms"
);
}
};

Our playground fails to build.
https://github.com/oxc-project/playground/actions/runs/19424010531/job/55567191331


To reproduce, cargo check --target wasm32-wasip1-threads --release in oxc_formatter.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions