b-fuze / deno-dom

Browser DOM & HTML parser in Deno
https://jsr.io/@b-fuze/deno-dom
MIT License
423 stars 47 forks source link

Broken on 32-bit systems: mismatched types ... expected an array with a fixed size of 4 elements, found one with 8 elements #178

Open yurivict opened 3 months ago

yurivict commented 3 months ago
error[E0308]: mismatched types
    --> html-parser/plugin/src/lib.rs:72:30
     |
72   |         usize::from_be_bytes(src_buf_ptr_bytes_owned)
     |         -------------------- ^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 4 elements, found one with 8 elements
     |         |
     |         arguments to this function are incorrect
     |
note: associated function defined here
    --> /usr/local/lib/rustlib/src/rust/library/core/src/num/mod.rs:1244:5
     |
1244 | /     uint_impl! {
1245 | |         Self = usize,
1246 | |         ActualT = u32,
1247 | |         SignedT = isize,
...    |
1261 | |         bound_condition = " on 32-bit targets",
1262 | |     }
     | |_____^
     = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> html-parser/plugin/src/lib.rs:74:30
     |
74   |         usize::from_le_bytes(src_buf_ptr_bytes_owned)
     |         -------------------- ^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 4 elements, found one with 8 elements
     |         |
     |         arguments to this function are incorrect
     |
note: associated function defined here
    --> /usr/local/lib/rustlib/src/rust/library/core/src/num/mod.rs:1244:5
     |
1244 | /     uint_impl! {
1245 | |         Self = usize,
1246 | |         ActualT = u32,
1247 | |         SignedT = isize,
...    |
1261 | |         bound_condition = " on 32-bit targets",
1262 | |     }
     | |_____^
     = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `plugin` (lib) due to 2 previous errors

Caused by:
  process didn't exit successfully: `CARGO=/usr/local/bin/cargo CARGO_CRATE_NAME=plugin CARGO_MANIFEST_DIR=/wrkdirs/usr/ports/www/deno-dom/work/deno-dom-0.1.47/html-parser/plugin CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=plugin CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH=/wrkdirs/usr/ports/www/deno-dom/work/target/release/deps OUT_DIR=/wrkdirs/usr/ports/www/deno-dom/work/target/i686-unknown-freebsd/release/build/plugin-a7182ccbbf5cf00c/out /usr/local/bin/rustc --crate-name plugin --edition=2021 html-parser/plugin/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --emit=dep-info,link -C opt-level=2 -C panic=abort -C lto -C codegen-units=1 -C metadata=e738fb8dee074fda --out-dir /wrkdirs/usr/ports/www/deno-dom/work/target/i686-unknown-freebsd/release/deps --target i686-unknown-freebsd -C linker=cc -C strip=debuginfo -L dependency=/wrkdirs/usr/ports/www/deno-dom/work/target/i686-unknown-freebsd/release/deps -L dependency=/wrkdirs/usr/ports/www/deno-dom/work/target/release/deps --extern core=/wrkdirs/usr/ports/www/deno-dom/work/target/i686-unknown-freebsd/release/deps/libcore-d3ab0a55a6c695a7.rlib -C link-arg=-fstack-protector-strong` (exit status: 1)
*** Error code 101

Version: 0.1.47 FreeBSD 14.1