{"id":29871623,"url":"https://github.com/benoitpetit/wasm-modules-repository","last_synced_at":"2026-05-18T02:35:20.701Z","repository":{"id":299523503,"uuid":"1003263177","full_name":"benoitpetit/wasm-modules-repository","owner":"benoitpetit","description":"High-performance WebAssembly modules collection written in Go.","archived":false,"fork":false,"pushed_at":"2026-02-07T08:40:49.000Z","size":112591,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-07T18:10:52.321Z","etag":null,"topics":["gowm","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://gowm.vercel.app","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benoitpetit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-16T22:03:53.000Z","updated_at":"2026-02-07T08:40:52.000Z","dependencies_parsed_at":"2025-07-30T20:34:51.612Z","dependency_job_id":null,"html_url":"https://github.com/benoitpetit/wasm-modules-repository","commit_stats":null,"previous_names":["benoitpetit/wasm-modules-repository"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benoitpetit/wasm-modules-repository","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitpetit%2Fwasm-modules-repository","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitpetit%2Fwasm-modules-repository/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitpetit%2Fwasm-modules-repository/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitpetit%2Fwasm-modules-repository/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benoitpetit","download_url":"https://codeload.github.com/benoitpetit/wasm-modules-repository/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitpetit%2Fwasm-modules-repository/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gowm","wasm","webassembly"],"created_at":"2025-07-30T20:01:21.434Z","updated_at":"2026-05-18T02:35:20.688Z","avatar_url":"https://github.com/benoitpetit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WASM Modules Repository 🚀\n\nHigh-performance WebAssembly modules collection written in Go, designed for use with [GoWM (Go Wasm Manager)](https://github.com/benoitpetit/gowm).\n\nBuilt with a **Go-based build system** featuring parallel processing, advanced optimizations, and integrated toolchain management.\n\n## Available Modules\n\n| Module              | Description                   | Functions                                                                                                                                        | Size (wasm → gzip) |\n| ------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |\n| **math-wasm**       | Mathematical calculations     | add, subtract, multiply, divide, power, factorial, sqrt, gcd, fibonacci, mean, median... (25)                                                    | 2.5M → 720K        |\n| **crypto-wasm**     | Cryptographic operations      | hashSHA256, encryptAES, generateRSAKeyPair, generateJWT, bcryptHash, generateUUID... (19)                                                        | 6.1M → 1.7M        |\n| **text-wasm**       | Advanced text processing      | textSimilarity, levenshtein, slugify, camelCase, extractEmails, wordCount, readingTime... (17)                                                   | 3.8M → 1.1M        |\n| **image-wasm**      | Image processing              | compressJPEG, compressPNG, convertToWebP, resizeImage, getImageInfo (5)                                                                          | 3.0M → 864K        |\n| **qr-wasm**         | QR Codes \u0026 Barcodes           | generateQRCode, decodeQRCode, generateBarcode, decodeBarcode, generateVCard, generateWiFiQR (6)                                                  | 3.3M → 920K        |\n| **pdf-wasm**        | PDF generation \u0026 manipulation | createPDF, mergePDFs, splitPDF, generateInvoice, generateReport, htmlToPDF, analyzePDF... (18)                                                   | 5.4M → 1.5M        |\n| **jsonxml-wasm**    | JSON/XML/CSV/YAML conversion  | parseJSON, validateJSON, parseXML, xmlToJSON, csvToJSON, yamlToJSON, jsonToYAML... (14)                                                          | 7.5M → 2.3M        |\n| **goxios-wasm**     | HTTP client (axios-like)      | get, post, put, delete, patch, request, create, setDefaults (8)                                                                                  | 11M → 2.7M         |\n| **compress-wasm**   | Compression \u0026 archiving       | gzipCompress, deflateCompress, lz4Compress, snappyCompress, zipCreate, tarCreate, analyzeCompression... (19)                                     | TBD                |\n| **validation-wasm** | Data validation               | validateEmail, validateURL, validatePhoneNumber, validateIBAN, validateCreditCard, validatePostalCode, validateJSONSchema, validateRegex... (16) | TBD                |\n\nEach module also exposes the utility functions `setSilentMode`, `getAvailableFunctions`, and `getModuleInfo`.\n\n## Quick Start\n\n### Prerequisites\n\n- Go 1.21+\n- (Optional) [Binaryen](https://github.com/WebAssembly/binaryen) for wasm-opt optimization\n\n### Setup\n\n```bash\n# Install dependencies and build the manager\nmake setup\n\n# Or manually:\ngo mod tidy\ngo build -o wasm-manager .\n```\n\n### Building Modules\n\n```bash\n# Build all modules (parallel)\n./wasm-manager build\n\n# Build a specific module\n./wasm-manager build math-wasm\n\n# Build multiple modules\n./wasm-manager build math-wasm crypto-wasm qr-wasm\n\n# Build without optimization (faster for development)\n./wasm-manager build --optimize=false\n\n# Clean build\n./wasm-manager build --clean\n\n# Custom worker count\n./wasm-manager build --workers 8\n```\n\n### Available Commands\n\n| Command         | Description                | Key Options                                                       |\n| --------------- | -------------------------- | ----------------------------------------------------------------- |\n| `build`         | Build WASM modules         | `--workers`, `--optimize`, `--clean`, `--compress`, `--integrity` |\n| `validate`      | Validate module structure  | `--strict`, `--fix`                                               |\n| `test`          | Test implementations       | `--integration`, `--coverage`                                     |\n| `clean`         | Remove build artifacts     | `--all`, `--cache`                                                |\n| `install-tools` | Install optimization tools | `--check`, `--force`, `--binaryen`                                |\n\n```bash\n./wasm-manager --help    # Full help\n```\n\n## Build System\n\n### Parallel Processing\n\n- **Configurable worker pools** (defaults to CPU core count)\n- Simultaneous multi-module builds\n- Error isolation: a failed build doesn't stop others\n\n### Optimization Pipeline\n\n- WASM optimization via `wasm-opt` (Binaryen)\n- Gzip and brotli compression\n- SHA256 hash generation (`.wasm.integrity` files)\n- Size reporting and compression ratios\n\n### Example Output\n\n```\n🚀 Building 8 modules with 8 workers\n\n✅ math-wasm        2.5M → 720K (30s)\n✅ crypto-wasm      6.1M → 1.7M (40s)\n✅ image-wasm       3.0M → 864K (35s)\n✅ qr-wasm          3.3M → 920K (36s)\n✅ text-wasm        3.8M → 1.1M (38s)\n✅ pdf-wasm         5.4M → 1.5M (40s)\n✅ jsonxml-wasm     7.5M → 2.3M (44s)\n✅ goxios-wasm       11M → 2.7M (45s)\n\n📊 Statistics:\n   Successful: 8\n   Failed: 0\n   Compression ratio: 27%\n```\n\n## Module Structure\n\nEach WASM module follows the same structure:\n\n```\nmodule-wasm/\n├── main.go              # Go source code\n├── go.mod               # Go dependencies\n├── module.json          # Metadata (functions, examples, config)\n├── main.wasm            # Compiled binary\n├── main.wasm.gz         # Gzip compressed version\n└── main.wasm.integrity  # SHA256 hash (SRI)\n```\n\n### module.json\n\nThe `module.json` file describes the module for GoWM integration:\n\n- **Metadata**: name, version, description, author, license\n- **Functions**: list with parameters, return types, descriptions\n- **Examples**: ready-to-use code snippets\n- **GoWM config**: readySignal, standard functions, auto-detection\n- **Build info**: language, build command, target\n\n## Development Workflow\n\n```bash\n# 1. Edit the Go source code of a module\n# 2. Build and test\n./wasm-manager build math-wasm --verbose\n./wasm-manager test math-wasm\n\n# 3. Validate compliance\n./wasm-manager validate math-wasm --strict\n\n# 4. Full production build\n./wasm-manager clean --all\n./wasm-manager install-tools --check\n./wasm-manager build --workers 8\n./wasm-manager validate --strict\n```\n\n## Creating a New Module\n\n1. Create a `my-module-wasm/` directory\n2. Add `main.go` with functions exported via `js.Global().Set()`\n3. Add `go.mod` with the Go module\n4. Add `module.json` with metadata\n5. End `main()` with `js.Global().Set(\"__gowm_ready\", js.ValueOf(true))` and a blocking channel\n6. Build with `./wasm-manager build my-module-wasm`\n\n### Minimal Template\n\n```go\n//go:build js \u0026\u0026 wasm\n\npackage main\n\nimport (\n    \"fmt\"\n    \"syscall/js\"\n)\n\nfunc myFunction(this js.Value, args []js.Value) interface{} {\n    // Implementation\n    return js.ValueOf(\"result\")\n}\n\nfunc main() {\n    c := make(chan struct{})\n\n    js.Global().Set(\"myFunction\", js.FuncOf(myFunction))\n    js.Global().Set(\"__gowm_ready\", js.ValueOf(true))\n\n    fmt.Println(\"Module loaded\")\n    \u003c-c\n}\n```\n\n## Project Structure\n\n```\nwasm-modules-repository/\n├── main.go              # Build manager entry point\n├── go.mod               # Dependencies\n├── Makefile             # Build automation\n├── wasm-manager         # Compiled manager binary\n├── cmd/                 # CLI commands (build, clean, test, validate, install)\n├── internal/            # Internal logic (builder, cleaner, tester, validator)\n├── shared/              # Shared resources (wasm_exec.js)\n└── *-wasm/              # Individual WASM modules\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitpetit%2Fwasm-modules-repository","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenoitpetit%2Fwasm-modules-repository","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitpetit%2Fwasm-modules-repository/lists"}