{"id":27990693,"url":"https://github.com/tidbcloud/vector-extensions","last_synced_at":"2025-05-08T16:49:46.003Z","repository":{"id":290175230,"uuid":"526547441","full_name":"tidbcloud/vector-extensions","owner":"tidbcloud","description":"Some extensions specific to TiDB diagnostic features.","archived":false,"fork":false,"pushed_at":"2025-05-06T02:33:12.000Z","size":671,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-06T03:29:28.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/tidbcloud.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}},"created_at":"2022-08-19T09:40:27.000Z","updated_at":"2025-04-01T08:01:20.000Z","dependencies_parsed_at":"2025-04-27T11:42:07.907Z","dependency_job_id":"8fe04d05-c327-4b86-a162-34305b0b7ca3","html_url":"https://github.com/tidbcloud/vector-extensions","commit_stats":null,"previous_names":["tidbcloud/vector-extensions"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Fvector-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Fvector-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Fvector-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Fvector-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidbcloud","download_url":"https://codeload.github.com/tidbcloud/vector-extensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253110900,"owners_count":21856039,"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-05-08T16:49:45.236Z","updated_at":"2025-05-08T16:49:45.993Z","avatar_url":"https://github.com/tidbcloud.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extensions for Vector\n\nWe have some sources and sinks associated with TiDB Cluster, but not sutable to put in official vector repository, e.g. the topsql source, are putted in this repository.\n\n## Development\n\nTo add a new component, you can take topsql source as an example.\n\nSteps in general:\n1. Initialize a crate as a member of current workspace.\n    * create a new crate at `extensions/${YOUR_COMPONENT_NAME}`\n    * declare the crate at `workspace.member` in `Cargo.toml`\n2. Introduce the component as a dependency.\n    * add the component to `dependencies` in `Cargo.toml`\n3. Add a feature to control if equipped with the component in `Cargo.toml`.\n    * add a feature depends on the dependency introduced in step 2\n    * extend the `features.default` to include the feature\n4. Declare the component in `src/main.rs`\n    * submit the config of the component via `inventory::submit!`\n    * add an attribute `#[cfg(feature = \"${FEATURE_ADD_IN_STEP_3}\")]` above the delcaration\n\n### Clean\n```bash\nmake clean\n```\n\n### Check\n\n```bash\n# check for all extensions\ncargo check\n# or make check\n\n# check for topsql only for speed up\ncargo check --no-default-features --features topsql\n\n# check for vm-import only for speed up\ncargo check --no-default-features --features vm-import\n```\n\n### Lint\n```bash\n# lint for all extensions\ncargo clippy\n# or make clippy\n\n# lint for topsql only for speed up\ncargo clippy --no-default-features --features topsql\n\n# lint for vm-import only for speed up\ncargo clippy --no-default-features --features vm-import\n```\n\n### Format\n```bash\nmake fmt\n```\n\n### Test\n```bash\nmake test\n```\n\n## Build\n\n### Build Dev\n```bash\n# build for all extensions with full features of vector enabled\nmake build\n\n# build for topsql with the console sink enabled for debug\ncargo build --no-default-features --features topsql,vector/sinks-console\n\n# build for all extensions but without any other features enabled\ncargo build\n```\n\n### Build Release\n```bash\nmake build-release\n```\n\n### Cross Build Release\n```bash\n# Build a release binary for the x86_64-unknown-linux-gnu triple.\nmake build-x86_64-unknown-linux-gnu\n\n# Build a release binary for the aarch64-unknown-linux-gnu triple.\nmake build-aarch64-unknown-linux-gnu\n\n# Build a release binary for the x86_64-unknown-linux-musl triple.\nmake build-x86_64-unknown-linux-musl\n\n# Build a release binary for the aarch64-unknown-linux-musl triple.\nmake build-aarch64-unknown-linux-musl\n\n# Build a release binary for the armv7-unknown-linux-gnueabihf triple.\nmake build-armv7-unknown-linux-gnueabihf\n\n# Build a release binary for the armv7-unknown-linux-musleabihf triple.\nmake build-armv7-unknown-linux-musleabihf\n```\n\n### Release Docker Image\n\n```bash\nmake target/x86_64-unknown-linux-gnu/release/vector\nJEMALLOC_SYS_WITH_LG_PAGE=16 make target/aarch64-unknown-linux-gnu/release/vector\nJEMALLOC_SYS_WITH_LG_PAGE=16 make target/armv7-unknown-linux-gnueabihf/release/vector\nmake release-docker\n\n# build with given version and repo\nREPO=tidbcloud/vector VERSION=0.23.3 make release-docker\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidbcloud%2Fvector-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidbcloud%2Fvector-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidbcloud%2Fvector-extensions/lists"}