Skip to content

Commit f58af82

Browse files
feat: migrate from Go to Rust implementation (#212)
Co-authored-by: luoluoyuyu <zhenyu@apache.org>
1 parent 20787ec commit f58af82

465 files changed

Lines changed: 28787 additions & 28562 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.chglog/CHANGELOG.tpl.md‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎.chglog/config.yml‎

Lines changed: 0 additions & 36 deletions
This file was deleted.

‎.codacy.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codacy configuration file
2+
# Exclude some warnings that are acceptable during refactoring phase
3+
4+
exclude_paths:
5+
- "target/**"
6+
- "**/generated/**"
7+
- "**/bindings/**"
8+
- "examples/**"
9+
- "README.md"
10+
- "cli/README.md"
11+
# Build scripts use subprocess with controlled build-time inputs only
12+
- "python/functionstream-runtime/build.py"
13+
- "python/functionstream-api/build_package.py"
14+
# Ignore: apt pin versions, exec (required for Python module loading), pass style
15+
- "Dockerfile"
16+
- "python/functionstream-runtime/src/fs_runtime/runner.py"
17+
- "python/functionstream-client/src/fs_client/exceptions.py"
18+
19+
# Exclude some code quality checks (during refactoring phase)
20+
exclude_patterns:
21+
- ".*unused.*"
22+
- ".*complexity.*"
23+
- ".*duplication.*"

‎.dockerignore‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
target
2+
.git
3+
.github
4+
.gitignore
5+
*.md
6+
.env
7+
.env.*
8+
dist
9+
*.zip
10+
*.tar.gz
11+
.DS_Store
12+
.cursor
13+
examples
14+
*.pyc
15+
__pycache__
16+
.codacy.yml
17+
docker-compose.yml
18+
Dockerfile
19+
.dockerignore

‎.github/workflows/ci.yaml‎

Lines changed: 0 additions & 90 deletions
This file was deleted.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
name: Package Verification
14+
15+
on:
16+
push:
17+
branches: ["main", "master"]
18+
pull_request:
19+
branches: ["main", "master"]
20+
workflow_dispatch:
21+
22+
env:
23+
CARGO_TERM_COLOR: always
24+
25+
jobs:
26+
build-and-package:
27+
name: Build & Dist Check
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 60
30+
31+
steps:
32+
- name: Checkout Source
33+
uses: actions/checkout@v4
34+
35+
- name: Setup Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: "3.11"
39+
cache: "pip"
40+
41+
- name: Setup Rust
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
components: rustfmt, clippy
45+
46+
- name: Install Dependencies
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y --no-install-recommends \
50+
cmake \
51+
libssl-dev \
52+
pkg-config \
53+
libsasl2-dev \
54+
protobuf-compiler
55+
56+
- name: Cache Cargo
57+
uses: Swatinem/rust-cache@v2
58+
59+
- name: Generate Protocol
60+
run: cargo build --package protocol
61+
62+
- name: Check Formatting
63+
run: cargo fmt -p function-stream -p function-stream-cli -- --check
64+
65+
- name: Initialize Environment
66+
run: make env
67+
68+
- name: Run Clippy
69+
run: cargo clippy --all-targets --workspace -- -D warnings
70+
71+
- name: Run Unit Tests
72+
run: make test
73+
74+
- name: Build & Package (Full)
75+
run: make dist
76+
77+
- name: Build & Package (Lite)
78+
run: make dist-lite
79+
80+
- name: Verify Artifacts
81+
run: |
82+
ls -lh dist/*.tar.gz dist/*.zip
83+
VERSION=$(grep '^version' Cargo.toml | head -1 | awk -F '"' '{print $2}')
84+
test -f "dist/function-stream-${VERSION}.tar.gz"
85+
test -f "dist/function-stream-${VERSION}-lite.tar.gz"

0 commit comments

Comments
 (0)