{"id":16451543,"url":"https://github.com/pauldraper/bazel-dev-tcp","last_synced_at":"2026-06-13T17:31:52.906Z","repository":{"id":67767052,"uuid":"172957400","full_name":"pauldraper/bazel-dev-tcp","owner":"pauldraper","description":"An addition to ibazel that helps developing TCP services.","archived":false,"fork":false,"pushed_at":"2019-02-28T08:30:34.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-19T17:30:24.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/pauldraper.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-02-27T17:14:14.000Z","updated_at":"2019-02-28T08:30:35.000Z","dependencies_parsed_at":"2023-06-03T15:45:21.610Z","dependency_job_id":null,"html_url":"https://github.com/pauldraper/bazel-dev-tcp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pauldraper/bazel-dev-tcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldraper%2Fbazel-dev-tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldraper%2Fbazel-dev-tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldraper%2Fbazel-dev-tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldraper%2Fbazel-dev-tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauldraper","download_url":"https://codeload.github.com/pauldraper/bazel-dev-tcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldraper%2Fbazel-dev-tcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34294409,"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-06-13T02:00:06.617Z","response_time":62,"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":[],"created_at":"2024-10-11T10:09:12.528Z","updated_at":"2026-06-13T17:31:52.889Z","avatar_url":"https://github.com/pauldraper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bazel-dev-tcp\n\nAn addition to ibazel that helps developing TCP services.\n\n## Getting started\n\nAdd to WORKSPACE\n\n```python\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\n\nhttp_archive(\n    name = \"io_bazel_rules_go\",\n    urls = [\"https://github.com/bazelbuild/rules_go/releases/download/0.17.1/rules_go-0.17.1.tar.gz\"],\n    sha256 = \"6776d68ebb897625dead17ae510eac3d5f6342367327875210df44dbe2aeeb19\",\n)\nload(\"@io_bazel_rules_go//go:deps.bzl\", \"go_rules_dependencies\", \"go_register_toolchains\")\ngo_rules_dependencies()\ngo_register_toolchains()\n\nhttp_archive(\n    name = \"bazel_dev_tcp\",\n    urls = [\"https://github.com/pauldraper/bazel-dev-tcp/archive/ca4eefa9fc1ae3b8cbb6642fa429e3a2e4ceadf1.zip\"],\n    sha256 = \"f6dd7c36a1de1554175abde27e3805198668958b974d90512498532795d848d2\",\n    strip_prefix = \"bazel-dev-tcp-ca4eefa9fc1ae3b8cbb6642fa429e3a2e4ceadf1/main\"\n)\n```\n\n\n## Example\n\nConsider a Java TCP server at port 8000.\n\n```python\njava_binary(\n    name = \"echo\",\n    main_class = \"EchoServer\",\n    srcs = [\"EchoServer.java\"],\n    jvm_flags = [\"-Decho-server.port=8000\"],\n)\n```\n\nAdd `dev_tcp` to have a server running at 8000 that proxies the Java service at port 18000. From the time that ibazel detects a source change to when ibazel restarts the service, the proxy server will hold all new TCP connections.\n\n```python\nload(\"@bazel_dev_tcp//:rules.bzl\", \"dev_tcp\")\n\njava_binary(\n    name = \"echo\",\n    main_class = \"EchoServer\",\n    srcs = [\"EchoServer.java\"],\n    jvm_flags = [\"-Decho-server.port=8000\"],\n)\n\ndev_tcp(\n    name = \"echo_dev\",\n    listen_addr = \"localhost:8000\",\n    tags = [\n        \"ibazel_notify_changes\"\n    ],\n    target_addr = \"localhost:18000\",\n)\n```\n\nYou can see an example in [tests/java](test/java) including a optionally enabling this behavior. (run vs run-dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldraper%2Fbazel-dev-tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauldraper%2Fbazel-dev-tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldraper%2Fbazel-dev-tcp/lists"}