Skip to content

sharp 0.35.5-ohos.2 for HarmonyOS ARM64

Latest

Choose a tag to compare

@kdada kdada released this 17 Oct 18:21
Immutable release. Only release title and notes can be modified.

sharp 0.35.5-ohos.2 fixes initialization when HarmonyOS Node creates Unix socket pairs for stdin, stdout, stderr, or fork IPC. The previous package could fail before exporting the image API because Node's statx path rejects valid standard socket descriptors with EBADF.

The package still uses the pinned official @img/sharp-wasm32 0.35.5 engine and libvips 8.18.7. One JavaScript standard-stream initialization fragment calls a local helper: it tries fstat first, and only on OpenHarmony EBADF for fd 0–2 may it initialize the NODERAWFS node with a validated kernel socket inode and type. It does not create fs.Stats, alter Node fs functions, or change the WASM binary. Other errors and closed descriptors remain failures.

Validated on HarmonyOS ARM64 with Node 24.21.0:

  • Two independent offline builds produce identical archives.
  • 36 related stdio cases pass: spawn/fork/eval, CJS/ESM, IPC request/ack, file/FIFO controls, and closed-descriptor rejection.
  • Live cases compare each inherited descriptor with Python os.fstat, exercise the actual engine's WASI stdin/stdout/stderr, and check exact PNG pixels and asymmetric rotation.
  • Private npm installation and relocation to a path with spaces each pass all eight native image acceptance cases.

Archive: sharp-0.35.5-ohos.2.tgz (3,939,677 bytes).
SHA-256: 531aaf2dcc74f0242ff481a5210eabc36a220fa9bf01ea13ab3ea21dac265fcb.
Source: 6b121e2; upstream: 51a990f.

The archive contains a complete npm package under package/. It provides no command-line executable. The official WASM engine's format, memory, and text-rendering limitations still apply. General Node socket fstat behavior remains unchanged. The previous 0.35.5-ohos.1 release remains intact.