{"id":16959797,"url":"https://github.com/maxinteger/mandelbrot-wams","last_synced_at":"2025-04-05T15:26:38.333Z","repository":{"id":44050880,"uuid":"196469202","full_name":"maxinteger/mandelbrot-wams","owner":"maxinteger","description":"Experiment with WASM and WebWorker","archived":false,"fork":false,"pushed_at":"2022-12-06T17:25:42.000Z","size":57,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T12:23:16.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mandelbrot-wasm.web.app/","language":"JavaScript","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/maxinteger.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}},"created_at":"2019-07-11T21:48:52.000Z","updated_at":"2021-01-10T15:00:58.000Z","dependencies_parsed_at":"2023-01-24T10:31:54.915Z","dependency_job_id":null,"html_url":"https://github.com/maxinteger/mandelbrot-wams","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/maxinteger%2Fmandelbrot-wams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxinteger%2Fmandelbrot-wams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxinteger%2Fmandelbrot-wams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxinteger%2Fmandelbrot-wams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxinteger","download_url":"https://codeload.github.com/maxinteger/mandelbrot-wams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247356353,"owners_count":20925809,"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":[],"created_at":"2024-10-13T22:46:13.617Z","updated_at":"2025-04-05T15:26:38.313Z","avatar_url":"https://github.com/maxinteger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mandelbrot set with WASM\n\nExperimental project to test WASM and WebWorkers\n[https://mandelbrot-wasm.web.app/](https://mandelbrot-wasm.web.app/)\n\n## Install\n\n```bash\n    npm install\n```\n\nFor rust, make sure you installed [Rust lang](https://www.rust-lang.org/), then run:\n\n```bash\n    cargo install wasm-pack\n    cargo install wasm-snip\n``` \n\n## Run locally\n\n```bash\n    npm run server\n```\n\nthen open [http://127.0.0.1:8080](http://127.0.0.1:8080)\n\n## Build all render engines\n\n```bash\n    npm run build\n```\n\n\n# Render engines\n\n## Native JS\n\nThe baseline implementation of the Mandelbrot set rendering\n\n## Native WASM\n\nWASM has human readable [text format](https://webassembly.org/docs/text-format/), the file extension is usually `wat`.\nThis format must be transformed into binary WASM\n \n- [Official site](https://webassembly.org/)\n- [Specification](https://webassembly.github.io/spec/core/index.html)\n- [Old but informative reference](https://github.com/sunfishcode/wasm-reference-manual/blob/master/WebAssembly.md)\n- [WAT ot WASM compiler](https://github.com/AssemblyScript/wabt.js)\n- [Good step by step tutorial](https://blog.scottlogic.com/2018/04/26/webassembly-by-hand.html)\n\n## AssemblyScript -\u003e WASM\n\nAssemblyScript is a TypeScript like language what we can compile to WASM\n\n- [Project repo](https://github.com/AssemblyScript/docs/blob/master/README.md)\n- [The AssemblyScript Book](https://docs.assemblyscript.org/) \n\n## Rust -\u003e WASM\n\nRust is a modern system language (like C, C++). With **wasm-pack** we can compile rust code to WASM\n\n- [wasm-pack site](https://rustwasm.github.io/wasm-pack/)\n- [Rust and WebAssembly book](https://rustwasm.github.io/docs/book/)\n- [wasm-snip - wasm optimiser](https://github.com/rustwasm/wasm-snip)\n\n# Limitations / bugs\n\n- The app works only in chromium based browsers right now\n\n# Other\n\n## More link\n\n- [Rust lang site](https://www.rust-lang.org/)\n- [WASM by examples](https://wasmbyexample.dev/)\n- [Webassembly Studio](https://webassembly.studio)\n\n## Takeaways:\n\n- WASM average execution time is a little slower then native JS (with the current implementation of WASM + Mandelbrot is very specific problem the engine can optimise JS very well)\n- Naive hand written WASM can not beat the compiled and optimized code\n- WASM *not* start new thread, you have to run it in webWorker for that.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxinteger%2Fmandelbrot-wams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxinteger%2Fmandelbrot-wams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxinteger%2Fmandelbrot-wams/lists"}