
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@domgell/webgpu-arraybuffer-writer
Advanced tools
Utility for writing data to an ArrayBuffer with correct WebGPU/WGSL alignment
WGSL structs and arrays have specific alignment rules which can make it inconvenient to write data to WebGPU buffers.
This is a utility to make it easier to write correctly aligned data to ArrayBuffers. These can then be written directly to GPUBuffers.
struct Particle {
position: vec3f,
velocity: vec3f,
friction: f32,
}
const particle = {
position: {x: 10, y: 5},
velocity: {x: 0, y: 0},
friction: 0.5,
}
// Create an ArrayBufferWriter with a given size or provide an existing ArrayBuffer
const particleWriter = ArrayBufferWriter(particleByteSize);
// Write each struct member
particleWriter
.vec3f(particle.position)
.vec3f(particle.velocity)
.f32(particle.friction);
// Write the ArrayBuffer to an existing GPUBuffer
device.queue.writeBuffer(particleGPUBuffer, 0, particleWriter.arrayBuffer);
FAQs
Utility for writing data to an ArrayBuffer with correct WebGPU/WGSL alignment
We found that @domgell/webgpu-arraybuffer-writer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.