
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.