{"id":29037930,"url":"https://github.com/tuemb/ble_wasm_example","last_synced_at":"2025-06-26T13:06:07.211Z","repository":{"id":299961589,"uuid":"1004746356","full_name":"TuEmb/ble_wasm_example","owner":"TuEmb","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-19T06:02:17.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T06:34:53.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/TuEmb.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}},"created_at":"2025-06-19T05:50:40.000Z","updated_at":"2025-06-19T06:02:20.000Z","dependencies_parsed_at":"2025-06-19T06:46:15.927Z","dependency_job_id":null,"html_url":"https://github.com/TuEmb/ble_wasm_example","commit_stats":null,"previous_names":["tuemb/ble_wasm_example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TuEmb/ble_wasm_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fble_wasm_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fble_wasm_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fble_wasm_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fble_wasm_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TuEmb","download_url":"https://codeload.github.com/TuEmb/ble_wasm_example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fble_wasm_example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262072814,"owners_count":23254317,"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":"2025-06-26T13:06:04.837Z","updated_at":"2025-06-26T13:06:07.197Z","avatar_url":"https://github.com/TuEmb.png","language":"Rust","readme":"# Web Bluetooth Rust Example\n\nThis project demonstrates using Rust and WebAssembly to scan for Bluetooth Low Energy (BLE) devices in the browser.\n\n## Prerequisites\n\n- [Rust](https://www.rust-lang.org/tools/install)\n- [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)\n- [npm](https://nodejs.org/) (for running a local web server)\n\n## Build\n\n1. Build the WebAssembly package using `wasm-pack`:\n   \n   **Windows**\n\n    ```sh\n    set RUSTFLAGS=--cfg=web_sys_unstable_apis\n    wasm-pack build --target web\n    ```\n\n   **Linux/MacOS**\n    ```sh\n    export RUSTFLAGS=\"--cfg=web_sys_unstable_apis\"\n    wasm-pack build --target web\n    ```\n\n    This will generate the `pkg/` directory with the necessary JS and WASM files.\n\n## Run\n\n2. Serve the project locally (you need a web server to use Web Bluetooth):\n\n    ```sh\n    npx serve .\n    ```\n\n    Or use any other static file server (e.g., `python -m http.server`).\n\n3. Open [http://localhost:5000](http://localhost:5000) (or the port shown in your terminal) in a supported browser (e.g., Chrome).\n\n4. Click the **Scan BLE Devices** button to start scanning for BLE devices.\n\n## Notes\n\n- Web Bluetooth only works on secure contexts (localhost or HTTPS).\n- Make sure your browser supports the [Web Bluetooth API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API).\n\n## Project Structure\n\n- [`src/lib.rs`](src/lib.rs): Rust source code for BLE scanning.\n- [`index.html`](index.html): Web page UI and JS glue code.\n- [`pkg/`](pkg/): Generated WebAssembly and JS bindings.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuemb%2Fble_wasm_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuemb%2Fble_wasm_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuemb%2Fble_wasm_example/lists"}