
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
@plasius/gpu-lock-free-queue
Advanced tools
A minimal WebGPU lock-free MPMC ring queue using a per-slot sequence counter (Vyukov-style). This is a starter implementation focused on correctness, robustness, and low overhead.
Apache-2.0. ESM + CJS builds. WGSL assets are published in dist/.
npm install @plasius/gpu-lock-free-queue
import { loadQueueWgsl, queueWgslUrl } from "@plasius/gpu-lock-free-queue";
const shaderCode = await loadQueueWgsl();
// Or, fetch the WGSL file directly:
// const shaderCode = await fetch(queueWgslUrl).then((res) => res.text());
Bindings are:
@binding(0) queue header: { head, tail, capacity, mask }@binding(1) slot array (Slot with seq, job_type, payload_offset, payload_words)@binding(2) input jobs (array<JobMeta> with job_type, payload_offset, payload_words)@binding(3) output jobs (array<JobMeta> with job_type, payload_offset, payload_words)@binding(4) input payloads (array<u32>, payload data referenced by input_jobs.payload_offset)@binding(5) output payloads (array<u32>, length job_count * output_stride)@binding(6) status flags (array<u32>, length job_count)@binding(7) params (Params with job_count, output_stride)output_stride is the per-job output stride (u32 words) used when copying payloads into output_payloads.
WebGPU requires a secure context. Use a local server, for example:
python3 -m http.server
Then open http://localhost:8000 and check the console/output.
npm run build emits dist/index.js, dist/index.cjs, and dist/queue.wgsl.
npm run test:unit
npm run test:coverage
npm run test:e2e
npm run lint
npm run typecheck
npm run test:coverage
npm run build
npm run pack:check
demo/index.html: Loads the demo.demo/main.js: WebGPU setup, enqueue/dequeue test, FFT spectrogram, and randomness heuristics.src/queue.wgsl: Lock-free queue implementation.src/index.js: Package entry point for loading the WGSL file.Payloads are variable-length chunks stored in a caller-managed buffer. Each job specifies job_type, payload_offset, and payload_words in input_jobs; dequeue copies payloads from input_payloads into output_payloads using output_stride and mirrors the metadata into output_jobs. If you need f32, store bitcast<u32>(value) and reinterpret on the consumer side.
FAQs
WebGPU lock-free queue assets for flat and DAG-ready GPU job scheduling.
The npm package @plasius/gpu-lock-free-queue receives a total of 306 weekly downloads. As such, @plasius/gpu-lock-free-queue popularity was classified as not popular.
We found that @plasius/gpu-lock-free-queue 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.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.