{"id":17315398,"url":"https://github.com/frando/hypercore-wasm-experiments","last_synced_at":"2025-04-14T14:51:21.748Z","repository":{"id":54143289,"uuid":"343892382","full_name":"Frando/hypercore-wasm-experiments","owner":"Frando","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-09T18:26:28.000Z","size":36,"stargazers_count":15,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-07T18:24:05.583Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Frando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-02T19:42:27.000Z","updated_at":"2022-10-20T08:15:03.000Z","dependencies_parsed_at":"2022-08-13T07:31:02.255Z","dependency_job_id":null,"html_url":"https://github.com/Frando/hypercore-wasm-experiments","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/Frando%2Fhypercore-wasm-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fhypercore-wasm-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fhypercore-wasm-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frando%2Fhypercore-wasm-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frando","download_url":"https://codeload.github.com/Frando/hypercore-wasm-experiments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233819585,"owners_count":18735302,"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-15T13:08:05.323Z","updated_at":"2025-01-13T23:12:55.912Z","avatar_url":"https://github.com/Frando.png","language":"Rust","readme":"# hypercore-protocol in WASM through Rust\n\nThis is a first experiment to compile the Rust implementation of hypercore-protocol to WASM for use in browsers. At the moment, this is a minimal demo that only includes the wire protocol part (with all transport crypto) but not the persistence and verification parts (i.e. the hypercore crate).\n\n- *Update 2021-03-03*: Cleaned the code and fixed README\n- *Update 2021-03-02:* I wrote this some time back, now updated it roughly to the current dev branch of [hypercore-protocol-rs](https://github.com/datrs/hypercore-protocol-rs). and pushed it to share and invite others to experiment with this\n\n\nWhat this does (in Rust compiled to WASM):\n\n- Fetch a key, encoded as hex string, from `/key`\n- Open a Websocket to localhost:9000\n- Open a hypercore-protocol stream on the websocket\n- Open a channel for the key that was fetched before\n- Load all data blocks, and display them on the page (as a string in a `pre` element)\n\nA Node.js server has the simple demo backend:\n\n- Create a hypercore feed in-memory\n- Append the contents of this README file\n- Open an HTTP server\n- On `/key` send the hypercore's key as a hex string\n- Serve the static files (index.html, index.js from this dir plus the WASM created through wasm-pack in `/pkg`)\n- On other requests, open a websocket connection and pipe it to the replication stream of the hypercore\n\n## How to run\n\n```bash\ncargo build\nwasm-pack build --dev --target web\ncd server\nyarn\nnode server.js\n# open http://localhost:9000\n```\n\nIf it works, this should display this README in the browser, loaded over hypercore-protocol in Rust in WASM :-)\n\nCheck the browser console for some logs. It currently needs quite a while until the content is displayed, I don't know yet why this is. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrando%2Fhypercore-wasm-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrando%2Fhypercore-wasm-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrando%2Fhypercore-wasm-experiments/lists"}