Building Privacy-First Browser Tools with WebAssembly
February 20, 2026by Ichiban Team
webassemblyprivacybrowserjavascript
#클라이언트 사이드 PDF 조작
PDF 에디터에는 pdf-lib를 도입했습니다. 서버와의 통신 없이도 PDF 문서를 생성하고 수정할 수 있는 순수 JavaScript 라이브러리입니다.
import { PDFDocument } from 'pdf-lib';
const pdfDoc = await PDFDocument.load(existingPdfBytes);
const pages = pdfDoc.getPages();
const firstPage = pages[0];
firstPage.drawText('Hello, World!', {
x: 50,
y: firstPage.getHeight() - 100,
size: 30,
});
#Transformers.js를 활용한 온디바이스 AI
요약 및 번역 도구에는 Hugging Face Transformers.js를 활용합니다. 이를 통해 WebAssembly와 WebGPU를 기반으로 브라우저에서 직접 AI 모델을 구동할 수 있습니다.
import { pipeline } from '@huggingface/transformers';
const summarizer = await pipeline(
'summarization',
'Xenova/distilbart-cnn-12-6'
);
const result = await summarizer(longText, {
max_length: 130,
min_length: 30,
});