{"id":17100634,"url":"https://github.com/jakobhellermann/wasm-server-runner","last_synced_at":"2025-05-15T16:05:28.722Z","repository":{"id":38845602,"uuid":"437113135","full_name":"jakobhellermann/wasm-server-runner","owner":"jakobhellermann","description":"cargo run for the browser","archived":false,"fork":false,"pushed_at":"2025-03-24T22:43:10.000Z","size":101,"stargazers_count":160,"open_issues_count":0,"forks_count":36,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T21:44:41.329Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakobhellermann.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2021-12-10T21:01:54.000Z","updated_at":"2025-03-29T04:19:22.000Z","dependencies_parsed_at":"2025-03-11T23:30:53.770Z","dependency_job_id":null,"html_url":"https://github.com/jakobhellermann/wasm-server-runner","commit_stats":{"total_commits":47,"total_committers":8,"mean_commits":5.875,"dds":"0.42553191489361697","last_synced_commit":"fdbc4f2de673be491852c7e1838582cb67ffb0c1"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fwasm-server-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fwasm-server-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fwasm-server-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fwasm-server-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakobhellermann","download_url":"https://codeload.github.com/jakobhellermann/wasm-server-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737770,"owners_count":20987718,"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-14T15:14:18.897Z","updated_at":"2025-04-07T22:05:13.772Z","avatar_url":"https://github.com/jakobhellermann.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasm-server-runner\n\nAllows you to run programs in the browser using web assembly using a simple `cargo run`.\n\n## Usage\n\n### Step 1.\n\n```sh\nrustup target add wasm32-unknown-unknown\ncargo install wasm-server-runner\n```\n\n### Step 2.\n\nAdd this to your `~/.cargo/config.toml` (**not** the `Cargo.toml` of your project!):\n\n```toml\n[target.wasm32-unknown-unknown]\nrunner = \"wasm-server-runner\"\n```\n\n### Step 3.\n\nRun programs in the browser using\n```sh\ncargo run --target wasm32-unknown-unknown\ncargo run --target wasm32-unknown-unknown --example example\n\nwasm-server-runner path/to/file.wasm\n```\n\nExample output:\n```yaml\nINFO wasm_server_runner: wasm output is 49.79kb large\nINFO wasm_server_runner: starting webserver at http://127.0.0.1:1334\n```\n\nThe website will reload when the server is restarted and serve files relative to the current directory.\n\n## Configuration options\n\nAll configuration options can be specified via environment variables.\n\n\u003cdetails\u003e\n\u003csummary\u003eWASM_SERVER_RUNNER_ADDRESS\u003c/summary\u003e\n\nDefault: `127.0.0.1`\nControl the address that the server listens on. Set to `0.0.0.0` to allow access from anywhere.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWASM_SERVER_RUNNER_DIRECTORY\u003c/summary\u003e\n\nDefault: `.`\n\nCan be used to specify where relative path requests are loaded from.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWASM_SERVER_RUNNER_CUSTOM_INDEX_HTML\u003c/summary\u003e\n\nDefault: _none_\n\nWhen set, will try to load the custom `index.html` from that path instead of [the\ndefault](static/index.html). Can be relative to the directory.\n\n*Note*: To support both module and non-module style the `index.html` needs to have specific string that will be replaced at runtime. The body should contain something like\n```html\n{{ NO_MODULE }}\n\u003cscript type=\"module\"\u003e\n    // {{ MODULE }}\n\u003c/script\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWASM_SERVER_RUNNER_HTTPS\u003c/summary\u003e\n\nDefault: `false`\n\nControls whether https is used.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWASM_SERVER_RUNNER_NO_MODULE\u003c/summary\u003e\n\nDefault: `false`\n\nControls whether the wasm-bindgen output uses `module`s or not.\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobhellermann%2Fwasm-server-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakobhellermann%2Fwasm-server-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobhellermann%2Fwasm-server-runner/lists"}