DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
431 stars 58 forks source link

Drop support for 32bit windows with MSVC. #311

Closed DelSkayn closed 1 month ago

DelSkayn commented 1 month ago

Turns out alignment on i686 MSVC is basically broken right now as MSVC is inconsistent. A 64bit integer on i686 can have a 4 byte alignment when clang and rust assume it is 8. This causes slice::from_raw_parts to panic since it will see 4 byte aligned values originating from the stack as misaligned.

For more info see rust-lang/rust#112480.

This makes is basically impossible to correctly call QuickJS functions on that platform. Any pointer returned from QuickJS might be misaligned according Clang. Working around this would be a lot of work for a quite old platform which could still be supported with a different toolchain. So I opted to drop support for i686 MSVC.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.31%. Comparing base (613b82a) to head (aca7969).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #311 +/- ## ======================================= Coverage 68.31% 68.31% ======================================= Files 83 83 Lines 12237 12237 ======================================= Hits 8360 8360 Misses 3877 3877 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.