{"id":22609030,"url":"https://github.com/bitfinexcom/grenache-rust","last_synced_at":"2025-04-11T06:19:52.834Z","repository":{"id":141634137,"uuid":"167840570","full_name":"bitfinexcom/grenache-rust","owner":"bitfinexcom","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-16T14:31:35.000Z","size":16,"stargazers_count":6,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T04:17:18.418Z","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/bitfinexcom.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}},"created_at":"2019-01-27T18:03:18.000Z","updated_at":"2021-05-19T05:03:02.000Z","dependencies_parsed_at":"2023-03-13T10:30:26.848Z","dependency_job_id":null,"html_url":"https://github.com/bitfinexcom/grenache-rust","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/bitfinexcom%2Fgrenache-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fgrenache-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fgrenache-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitfinexcom%2Fgrenache-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitfinexcom","download_url":"https://codeload.github.com/bitfinexcom/grenache-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248352028,"owners_count":21089373,"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-12-08T15:10:39.570Z","updated_at":"2025-04-11T06:19:52.824Z","avatar_url":"https://github.com/bitfinexcom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Grenache](https://github.com/bitfinexcom/grenache) Rust HTTP implementation\n\n\u003cimg src=\"https://raw.githubusercontent.com/bitfinexcom/grenache-nodejs-http/master/logo.png\" width=\"15%\" /\u003e\n\nGrenache is a micro-framework for connecting microservices. Its simple and optimized for performance.\n\nInternally, Grenache uses Distributed Hash Tables (DHT, known from Bittorrent) for Peer to Peer connections. You can find more details how Grenche internally works at the [Main Project Homepage](https://github.com/bitfinexcom/grenache)\n\n - [Setup](#setup)\n - [Examples](#examples)\n\n## Setup\n\n### Install\nAdd grenache-rust to your `cargo.toml` file:\n```\ngrenache-rust = { git = \"https://github.com/bitfinexcom/grenache-rust.git\" }\n```\n\n### Other Requirements\n\nInstall `Grenache Grape`: https://github.com/bitfinexcom/grenache-grape:\n\n```bash\nnpm i -g grenache-grape\n```\n\n```\n// Start 2 Grapes\ngrape --dp 20001 --aph 30001 --bn '127.0.0.1:20002'\ngrape --dp 20002 --aph 40001 --bn '127.0.0.1:20001'\n```\n\n### Examples\nThe following will annonce the `rest:net:util` service on port 31337 and then confirm that the service can be looked up using the `GrenacheClient` object.\n```rust\nextern crate grenache_rust;\n\nuse grenache_rust::GrenacheClient;\nuse grenache_rust::Grenache;\nuse std::{thread, time};\n\nfn main(){\n    let service = \"rest:net:util\";\n    let service_port = 31_337u16;\n    let api_url = \"http://127.0.0.1:30001\";\n    let mut client = GrenacheClient::new(api_url);\n    client.start_announcing(service, service_port ).unwrap();\n    thread::sleep(time::Duration::from_secs(1));\n    println!(\"Service at: {}\",client.lookup(service).unwrap());\n    client.stop_announcing(service).unwrap();\n}\n```\n\n## Licensing\nLicensed under Apache License, Version 2.0\n \n### Licenses for dependencies\n- Rust - [\nRust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.](https://github.com/rust-lang/rust#license)\n- serde_json - [Apache License, Version 2.0 or MIT](https://github.com/serde-rs/json/tree/493bad102fa42fea6f1365fc5809bacfbd423adb#license)\n- uuid - [Apache License, Version 2.0 or MIT](https://github.com/uuid-rs/uuid/blob/cdd5528d46ec8f7c7595615b366b4fe301818f9f/COPYRIGHT)\n- log - [Apache License, Version 2.0](https://github.com/rust-lang-nursery/log/blob/1a9a8275f5d84d50b756437524da5ff8273ef99b/LICENSE-APACHE) or [MIT](https://github.com/rust-lang-nursery/log/blob/1a9a8275f5d84d50b756437524da5ff8273ef99b/LICENSE-MIT)\n- hyper - [MIT license](https://github.com/hyperium/hyper/blob/fdd04134187fe0c1a0b446577300e0bb391183ae/LICENSE)\n- tokio - [MIT license](https://github.com/tokio-rs/tokio/blob/11e2af66a82c1cb710f9a07ae9450fcb25e67a1e/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfinexcom%2Fgrenache-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitfinexcom%2Fgrenache-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitfinexcom%2Fgrenache-rust/lists"}