{"id":31363802,"url":"https://github.com/sauravyadav19/bubble-sort-visualizer","last_synced_at":"2025-09-27T05:21:45.865Z","repository":{"id":316170268,"uuid":"1062251359","full_name":"sauravyadav19/Bubble-Sort-Visualizer","owner":"sauravyadav19","description":"A web-based Bubble Sort visualizer using C++ compiled to WebAssembly via Emscripten.","archived":false,"fork":false,"pushed_at":"2025-09-23T10:54:47.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-23T12:37:42.969Z","etag":null,"topics":["cpp","data-structures-and-algorithms","sorting-visualization","web-assembly"],"latest_commit_sha":null,"homepage":"https://sauravyadav19.github.io/Bubble-Sort-Visualizer/","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/sauravyadav19.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-09-23T02:42:38.000Z","updated_at":"2025-09-23T10:54:50.000Z","dependencies_parsed_at":"2025-09-23T12:37:45.122Z","dependency_job_id":null,"html_url":"https://github.com/sauravyadav19/Bubble-Sort-Visualizer","commit_stats":null,"previous_names":["sauravyadav19/visualizer","sauravyadav19/bubble-sort-visualizer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sauravyadav19/Bubble-Sort-Visualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravyadav19%2FBubble-Sort-Visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravyadav19%2FBubble-Sort-Visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravyadav19%2FBubble-Sort-Visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravyadav19%2FBubble-Sort-Visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sauravyadav19","download_url":"https://codeload.github.com/sauravyadav19/Bubble-Sort-Visualizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravyadav19%2FBubble-Sort-Visualizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277184144,"owners_count":25775286,"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","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"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":["cpp","data-structures-and-algorithms","sorting-visualization","web-assembly"],"created_at":"2025-09-27T05:21:42.116Z","updated_at":"2025-09-27T05:21:45.861Z","avatar_url":"https://github.com/sauravyadav19.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bubble Sort Visualizer\n\nA web-based Bubble Sort visualizer using **C++ compiled to WebAssembly** via Emscripten.\n\n---\n\n## Features\n- Step-by-step visualization of Bubble Sort\n- Highlighting bars being compared\n- Beginner-friendly and interactive\n\n---\n\n## How to Run Locally\n\n1. **Clone the repository:**\n    ```bash\n    git clone https://github.com/sauravyadav19/Visualizer.git\n    cd Visualizer/01_bubbleSort/\n    ```\n2. **Open `index.html` in a web browser.**  \n   *(No server required; works directly in Chrome/Firefox/Edge/Safari.)*\n\n---\n\n### Optional: Recompile the C++ Code (Emscripten)\n\nIf you want to **modify the Bubble Sort logic** or rebuild the WebAssembly file:\n\n1. **Install Emscripten** (if not already installed).  \n   Follow the official guide: [Emscripten Official Site](https://emscripten.org/)\n\n2. **Compile the C++ file to WebAssembly:**\n    ```bash\n    emcc bubble_sort.cpp -O3 -s WASM=1 \\\n    -s EXPORTED_FUNCTIONS='[\"_malloc\",\"_free\",\"_set_array\",\"_get_array_value\",\"_get_array_size\",\"_bubble_sort_step\"]' \\\n    -s EXPORTED_RUNTIME_METHODS='[\"cwrap\",\"ccall\",\"HEAP32\"]' \\\n    -o bubble_sort.js\n    ```\n\n3. **Explanation of Flags:**\n    - `-O3` → Maximum optimization for faster execution  \n    - `-s WASM=1` → Compile to WebAssembly  \n    - `EXPORTED_FUNCTIONS` → Functions your JS code will call  \n    - `EXPORTED_RUNTIME_METHODS` → Runtime helpers for memory access  \n    - `-o bubble_sort.js` → Output JavaScript glue file (also produces `bubble_sort.wasm`)\n\n4. **After compilation, you will get:**\n    ```\n    bubble_sort.js   \u003c-- JS glue code\n    bubble_sort.wasm \u003c-- WebAssembly binary\n    ```\n   *Make sure these files are in the same folder as your `index.html`, replacing the previous ones if needed.*\n\n---\n\n## Live Demo\n\nYou can view the live demo using GitHub Pages here:\n- [Live Demo](https://sauravyadav19.github.io/Bubble-Sort-Visualizer/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauravyadav19%2Fbubble-sort-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsauravyadav19%2Fbubble-sort-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauravyadav19%2Fbubble-sort-visualizer/lists"}