{"id":20332504,"url":"https://github.com/permutationlock/raylib_wasm_rs_example","last_synced_at":"2026-06-08T16:04:56.145Z","repository":{"id":63883687,"uuid":"571217371","full_name":"permutationlock/raylib_wasm_rs_example","owner":"permutationlock","description":"A simple example showing how to make a Rust Raylib application cross platform with the web using emscripten.","archived":false,"fork":false,"pushed_at":"2022-12-02T11:48:43.000Z","size":447,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-22T10:05:14.668Z","etag":null,"topics":["emscripten","raylib","rust","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/permutationlock.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-27T14:44:24.000Z","updated_at":"2023-02-14T23:09:31.000Z","dependencies_parsed_at":"2023-01-22T22:16:09.937Z","dependency_job_id":null,"html_url":"https://github.com/permutationlock/raylib_wasm_rs_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/permutationlock/raylib_wasm_rs_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2Fraylib_wasm_rs_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2Fraylib_wasm_rs_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2Fraylib_wasm_rs_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2Fraylib_wasm_rs_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permutationlock","download_url":"https://codeload.github.com/permutationlock/raylib_wasm_rs_example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2Fraylib_wasm_rs_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["emscripten","raylib","rust","wasm"],"created_at":"2024-11-14T20:27:02.754Z","updated_at":"2026-06-08T16:04:56.121Z","avatar_url":"https://github.com/permutationlock.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cross-platform Rust apps using Raylib and Emscripten\n\nThe goal of this repository is to create a simple graphical Rust\napplication that can be compiled to target native platforms and web\nbrowsers.\n\nTo cross-compile to wasm I use a\n[Raylib](https://github.com/raysan5/raylib) library file compiled\nwith [emcc](https://emscripten.org), combined with a Rust wrapper\naround the Raylib functionality needed in the project.\n\nA custom Cargo config file is needed to pass emcc\nbuild flags via the EMCC_CFLAGS environment variable.\n\nFinally, in order to get applications to fill the browser window and\nresize with it, we need to export an on_resize function from Rust to\nJavaScript. This function is set as an event listener for the\nBrowser's window resize event.\n\n## Dependencies\n\nIn order to compile to native Unix and/or Windows systems it is\nassumed that you have the\n[Raylib](https://github.com/raysan5/raylib) C library installed.\nThe web server provided to test wasm builds requires\n[Go](https://go.dev).\n\n## Building\n\nBuilding native applications should work as normal:\n```console\ncargo build\n```\nTo build for web:\n```console\ncargo build --target wasm32-unknown-emscripten\n```\nYou can then test your web builds using the included Go server and shell\nscripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermutationlock%2Fraylib_wasm_rs_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermutationlock%2Fraylib_wasm_rs_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermutationlock%2Fraylib_wasm_rs_example/lists"}