{"id":27307619,"url":"https://github.com/nicholaslyang/wasup","last_synced_at":"2025-04-12T04:11:24.685Z","repository":{"id":39718986,"uuid":"361307201","full_name":"NicholasLYang/wasup","owner":"NicholasLYang","description":"A zero-dependency, isomorphic library for emitting WebAssembly","archived":false,"fork":false,"pushed_at":"2022-06-12T03:11:44.000Z","size":1021,"stargazers_count":40,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T02:16:43.953Z","etag":null,"topics":["typescript","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicholasLYang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-25T01:54:07.000Z","updated_at":"2023-12-22T14:50:00.000Z","dependencies_parsed_at":"2022-08-27T02:15:40.706Z","dependency_job_id":null,"html_url":"https://github.com/NicholasLYang/wasup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasLYang%2Fwasup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasLYang%2Fwasup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasLYang%2Fwasup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasLYang%2Fwasup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicholasLYang","download_url":"https://codeload.github.com/NicholasLYang/wasup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514221,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["typescript","wasm","webassembly"],"created_at":"2025-04-12T04:11:24.013Z","updated_at":"2025-04-12T04:11:24.672Z","avatar_url":"https://github.com/NicholasLYang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasup\n\nwasup is a library for decoding and encoding the WebAssembly binary format. \nIt's zero dependency and entirely written in TypeScript.\n\n\n## Getting Started\n\nInstall with npm or yarn:\n```\nnpm install wasup\nyarn add wasup\n```\n\nwasup exposes a few functions:\n\n`decodeModule` takes in a buffer containing WebAssembly binary code and decodes it \ninto a JavaScript object. This translation is as simple as possible. The module object\ncontains fields for each section, along with an array of custom sections.\n\n`encodeModule` takes a module object and returns WebAssembly binary code in a buffer.\nIt does so by figuring out the necessary size for the binary code, allocating the buffer\nand encoding the module object. For the most part it assumes the module is valid. As\nof right now, wasup does not try to validate the module.\n\n`createModule` creates an empty module object for you to manipulate as you wish.\n\nThere's also [API documentation](https://nicholaslyang.github.io/wasup/) and a [binary search example program](https://github.com/NicholasLYang/wasup/tree/master/examples/binary-search).\n\nIf you want to know more about the structure of a WebAssembly module, check out the [specification](https://webassembly.github.io/spec/core/), \nthe [WASM reference manual](https://github.com/sunfishcode/wasm-reference-manual/blob/master/WebAssembly.md), and \n[this blog post](https://horriblyunderqualified.com/posts/a-mere-mortals-guide-to-webassembly/) written by yours truly.\n\n## Goals\n\nRight now wasup is very bare bones. It provides a way to encode \na JavaScript representation of a WebAssembly module into a binary representation, \nand it provides a way to decode a binary representation into a JavaScript representation.\n\nIn the future, I hope to add support for creating modules and validating them. I'd also like\nto add support for proposals like [memory64](https://github.com/WebAssembly/memory64),\n[branch hinting](https://github.com/WebAssembly/branch-hinting), etc.\n\n## Inspiration\nwasup owes a lot to [walrus](https://github.com/rustwasm/walrus), an excellent library\nfor manipulating WASM binaries in Rust.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholaslyang%2Fwasup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicholaslyang%2Fwasup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholaslyang%2Fwasup/lists"}