{"id":23812544,"url":"https://github.com/devashishdxt/tonic-web-wasm-client","last_synced_at":"2026-02-19T23:31:28.409Z","repository":{"id":41453779,"uuid":"496120309","full_name":"devashishdxt/tonic-web-wasm-client","owner":"devashishdxt","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-13T16:57:06.000Z","size":90,"stargazers_count":75,"open_issues_count":4,"forks_count":22,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-14T07:00:19.080Z","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/devashishdxt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-25T07:06:59.000Z","updated_at":"2024-07-25T09:47:44.644Z","dependencies_parsed_at":"2023-09-27T06:42:32.648Z","dependency_job_id":"2c669ea9-3ad9-44b9-a264-1e71b953bb6c","html_url":"https://github.com/devashishdxt/tonic-web-wasm-client","commit_stats":{"total_commits":39,"total_committers":1,"mean_commits":39.0,"dds":0.0,"last_synced_commit":"2197c6240b5b262972d28b8610534e16b18a9b91"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devashishdxt%2Ftonic-web-wasm-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devashishdxt%2Ftonic-web-wasm-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devashishdxt%2Ftonic-web-wasm-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devashishdxt%2Ftonic-web-wasm-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devashishdxt","download_url":"https://codeload.github.com/devashishdxt/tonic-web-wasm-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441051,"owners_count":20939239,"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-01-02T02:26:29.887Z","updated_at":"2026-02-19T23:31:28.405Z","avatar_url":"https://github.com/devashishdxt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tonic-web-wasm-client\n\nRust implementation of [`grpc-web`](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md) protocol that allows\nusing [`tonic`](https://crates.io/crates/tonic) in browsers via webassembly.\n\n## Usage\n\nTo use `tonic-web-wasm-client`, you need to add the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntonic-web-wasm-client = \"0.8\"\n```\n\n### Example\nTo use `tonic` gRPC clients in browser, compile your code with tonic's `transport` feature disabled (this will disable\nthe default transport layer of tonic). Then initialize the query client as follows:\n\n```rust\nuse tonic_web_wasm_client::Client;\n\nlet base_url = \"http://localhost:9001\"; // URL of the gRPC-web server\nlet query_client = QueryClient::new(Client::new(base_url)); // `QueryClient` is the client generated by tonic\n\nlet response = query_client.status().await; // Execute your queries the same way as you do with defaule transport layer\n```\n\n### Building\n\nSince `tonic-web-wasm-client` is primarily intended for use in browsers, a crate that uses `tonic-web-wasm-client`\ncan only be built for `wasm32` target architectures:\n\n```shell\ncargo build --target wasm32-unknown-unknown\n```\n\nOther option is to create a `.cargo/config.toml` in your crate repository and add a build target there:\n\n```toml\n[build]\ntarget = \"wasm32-unknown-unknown\"\n```\n\n### Custom `Accept` header:\n\nThis library allows you to set a custom `Accept` header for the requests. This can be useful if you need to specify\na different content type for the responses. But, be aware that if you set a custom `Accept` header, the client may\nnot be able to handle the response correctly.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))\n- MIT license ([LICENSE-MIT](LICENSE-MIT))\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as\ndefined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevashishdxt%2Ftonic-web-wasm-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevashishdxt%2Ftonic-web-wasm-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevashishdxt%2Ftonic-web-wasm-client/lists"}