{"id":50300433,"url":"https://github.com/rhodey/lock.host-wasm-rust","last_synced_at":"2026-05-28T12:34:12.983Z","repository":{"id":342119556,"uuid":"1166723089","full_name":"rhodey/lock.host-wasm-rust","owner":"rhodey","description":"Lock.host WASM Rust example","archived":false,"fork":false,"pushed_at":"2026-03-18T21:36:14.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-17T17:06:23.936Z","etag":null,"topics":["crypto","enclave","wasm"],"latest_commit_sha":null,"homepage":"https://lock.host","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/rhodey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-02-25T14:35:55.000Z","updated_at":"2026-03-18T21:36:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rhodey/lock.host-wasm-rust","commit_stats":null,"previous_names":["rhodey/lock.host-wasm-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhodey/lock.host-wasm-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-wasm-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-wasm-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-wasm-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-wasm-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhodey","download_url":"https://codeload.github.com/rhodey/lock.host-wasm-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-wasm-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33609237,"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-05-28T02:00:06.440Z","response_time":99,"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":["crypto","enclave","wasm"],"created_at":"2026-05-28T12:34:12.331Z","updated_at":"2026-05-28T12:34:12.979Z","avatar_url":"https://github.com/rhodey.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lock.host-wasm-rust\nLock.host WASM Rust example, see [Lock.host](https://github.com/rhodey/lock.host)\n\nThis demonstration uses OpenAI to control a Solana wallet:\n+ OpenAI API calls\n+ Solana API calls\n+ Hit /api/joke?message=your best joke\u0026addr=abc123\n+ OAI is asked \"You are to decide if a joke is funny or not\"\n+ If so 0.001 SOL is sent to addr\n+ jokes are written to SQLite by [SQLiteWasmWasi](https://github.com/rhodey/sqlitewasmwasi)\n\n## Why\n[Lock.host-node](https://github.com/rhodey/lock.host-node) demonstrates the same features but is expensive to host\n\n[Lock.host-python](https://github.com/rhodey/lock.host-python) also demonstrates the same features and is expensive to host\n\nIt is very efficient to host WASM apps and so Lock.host has started in this direction\n\n## Setup\nInstall [just](https://github.com/casey/just) then [wasmtime](https://github.com/bytecodealliance/wasmtime):\n```\napt install just (or brew install just)\ncurl https://wasmtime.dev/install.sh -sSf | bash\n```\n\nYou also need [wac](https://github.com/bytecodealliance/wac) and this one takes a few minutes:\n```\ncargo install wac-cli\n```\n\n## Run\n+ [http://localhost:8080](http://localhost:8080)\n+ [app wallet](https://explorer.solana.com/address/DohcaGiBiC3yuPz4gHtoA7QJhyL5N7hk3EpnfFyHZR2S?cluster=devnet)\n+ [user wallet](https://explorer.solana.com/address/CFf6SMjR3eNKR7me9CGHhRNE1SwSQaPi5r4MWZQFGB2W?cluster=devnet)\n```\ncp example.env .env\njust build\njust run\njust joke 'why did the worker quit his job at the recycling factory? because it was soda pressing.'\n\u003e {\"from\":\"DohcaGiBiC3yuPz4gHtoA7QJhyL5N7hk3EpnfFyHZR2S\",\"signature\":\"2DF5yVe1dHoTa51RCDUDHzWGnNGbQVsmfieiQRn3hcYgADX4u8rezGrbVhfc4MwWKTiBBqjwaSGHkaueuzGTVXvq\",\"thoughts\":\"The play on words with 'soda pressing' and 'so depressing' is clever and adds a humorous twist, making it a fun pun.\",\"to\":\"CFf6SMjR3eNKR7me9CGHhRNE1SwSQaPi5r4MWZQFGB2W\"}\nsqlite3 mount/app.db \"select * from jokes;\"\n\u003e 1|CFf6SMjR3eNKR7me9CGHhRNE1SwSQaPi5r4MWZQFGB2W|why did the worker quit his job at the recycling factory? because it was soda pressing.|The play on words with 'soda pressing' and 'so depressing' is clever and adds a humorous twist, making it a fun pun.|1\n```\n\n## Notes\nThe Rust target [wasm32-wasip2](https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip2.html) is getting more support everyday but still many crates are not allowed\n\nAdditionally many crates do not support [async features](https://doc.rust-lang.org/book/ch17-00-async-await.html) and should not be considered for server use\n\nThe use of OpenAI and Solana in this example does not involve friendly crates-- but is async!\n\n[SQLiteWasmWasi](https://github.com/rhodey/sqlitewasmwasi) is using [rusqlite](https://crates.io/crates/rusqlite) internally\n\n## Performance\n1. npx loadtest -n 10000 http://localhost:8080 == 14620 RPS\n2. npx loadtest -n 10000 -k http://localhost:8080 == 22075 RPS\n\n## License\nhello@lock.host\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhodey%2Flock.host-wasm-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhodey%2Flock.host-wasm-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhodey%2Flock.host-wasm-rust/lists"}