sedsnet 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. sedsnet-4.0.0/.cargo/config.toml +8 -0
  2. sedsnet-4.0.0/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  3. sedsnet-4.0.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. sedsnet-4.0.0/.github/workflows/ci.yaml +38 -0
  5. sedsnet-4.0.0/.github/workflows/release.yml +146 -0
  6. sedsnet-4.0.0/.gitignore +25 -0
  7. sedsnet-4.0.0/.gitlab-ci.yml +159 -0
  8. sedsnet-4.0.0/C-Headers/sedsnet.h +1643 -0
  9. sedsnet-4.0.0/CHANGELOG.md +303 -0
  10. sedsnet-4.0.0/CMakeLists.txt +344 -0
  11. sedsnet-4.0.0/CODE_OF_CONDUCT.md +128 -0
  12. sedsnet-4.0.0/CONTRIBUTING.md +76 -0
  13. sedsnet-4.0.0/Cargo.lock +787 -0
  14. sedsnet-4.0.0/Cargo.toml +133 -0
  15. sedsnet-4.0.0/LICENSE +124 -0
  16. sedsnet-4.0.0/PKG-INFO +1018 -0
  17. sedsnet-4.0.0/README.md +980 -0
  18. sedsnet-4.0.0/SECURITY.md +54 -0
  19. sedsnet-4.0.0/benches/packet_paths.rs +81 -0
  20. sedsnet-4.0.0/benches/route_selection_paths.rs +134 -0
  21. sedsnet-4.0.0/benches/router_system_paths.rs +166 -0
  22. sedsnet-4.0.0/build.py +1384 -0
  23. sedsnet-4.0.0/build.rs +38 -0
  24. sedsnet-4.0.0/c-example-code/CMakeLists.txt +28 -0
  25. sedsnet-4.0.0/c-example-code/include/telemetry.h +56 -0
  26. sedsnet-4.0.0/c-example-code/src/load_balancing_example.c +28 -0
  27. sedsnet-4.0.0/c-example-code/src/main.c +46 -0
  28. sedsnet-4.0.0/c-example-code/src/managed_variables_e2e_example.c +119 -0
  29. sedsnet-4.0.0/c-example-code/src/managed_variables_e2e_example.cpp +49 -0
  30. sedsnet-4.0.0/c-example-code/src/telemetry.c +370 -0
  31. sedsnet-4.0.0/c-example-code/src/timesync_example.c +90 -0
  32. sedsnet-4.0.0/c-system-test/CMakeLists.txt +73 -0
  33. sedsnet-4.0.0/c-system-test/include/telemetry_sim.h +90 -0
  34. sedsnet-4.0.0/c-system-test/src/board_topology_timesync_test.c +107 -0
  35. sedsnet-4.0.0/c-system-test/src/main.c +399 -0
  36. sedsnet-4.0.0/c-system-test/src/multi_endpoint_topology_test.c +115 -0
  37. sedsnet-4.0.0/c-system-test/src/runtime_schema_test.c +456 -0
  38. sedsnet-4.0.0/c-system-test/src/telemetry_sim.c +485 -0
  39. sedsnet-4.0.0/c-system-test/src/timesync_multinode_test.c +87 -0
  40. sedsnet-4.0.0/c-wrapper/sedsnet_c_wrapper.c +1084 -0
  41. sedsnet-4.0.0/c-wrapper/sedsnet_c_wrapper.h +466 -0
  42. sedsnet-4.0.0/c-wrapper/sedsnet_cpp_wrapper.hpp +257 -0
  43. sedsnet-4.0.0/docs/README.md +35 -0
  44. sedsnet-4.0.0/docs/sync_wiki.py +342 -0
  45. sedsnet-4.0.0/docs/wiki/Build-and-Configure.md +266 -0
  46. sedsnet-4.0.0/docs/wiki/Changelogs.md +611 -0
  47. sedsnet-4.0.0/docs/wiki/Concepts.md +146 -0
  48. sedsnet-4.0.0/docs/wiki/Examples.md +115 -0
  49. sedsnet-4.0.0/docs/wiki/Glossary-and-Abbreviations.md +85 -0
  50. sedsnet-4.0.0/docs/wiki/Home.md +107 -0
  51. sedsnet-4.0.0/docs/wiki/Overview.md +106 -0
  52. sedsnet-4.0.0/docs/wiki/Release-Checklist.md +147 -0
  53. sedsnet-4.0.0/docs/wiki/Technical-Architecture.md +234 -0
  54. sedsnet-4.0.0/docs/wiki/Technical-Bindings-and-FFI.md +85 -0
  55. sedsnet-4.0.0/docs/wiki/Technical-Discovery-and-Internal-Formats.md +349 -0
  56. sedsnet-4.0.0/docs/wiki/Technical-Index.md +30 -0
  57. sedsnet-4.0.0/docs/wiki/Technical-Packet-Details.md +152 -0
  58. sedsnet-4.0.0/docs/wiki/Technical-Queues-and-Memory.md +112 -0
  59. sedsnet-4.0.0/docs/wiki/Technical-Router-Details.md +239 -0
  60. sedsnet-4.0.0/docs/wiki/Technical-Telemetry-Schema.md +205 -0
  61. sedsnet-4.0.0/docs/wiki/Technical-Wire-Format.md +389 -0
  62. sedsnet-4.0.0/docs/wiki/Testing.md +188 -0
  63. sedsnet-4.0.0/docs/wiki/Time-Sync.md +208 -0
  64. sedsnet-4.0.0/docs/wiki/Troubleshooting.md +96 -0
  65. sedsnet-4.0.0/docs/wiki/Usage-C-Cpp.md +792 -0
  66. sedsnet-4.0.0/docs/wiki/Usage-Python.md +281 -0
  67. sedsnet-4.0.0/docs/wiki/Usage-Rust.md +542 -0
  68. sedsnet-4.0.0/header_templates/sedsnet.pyi.txt +400 -0
  69. sedsnet-4.0.0/publish_crates.py +739 -0
  70. sedsnet-4.0.0/pyproject.toml +51 -0
  71. sedsnet-4.0.0/python-example/load_balancing_example.py +25 -0
  72. sedsnet-4.0.0/python-example/main.py +99 -0
  73. sedsnet-4.0.0/python-example/managed_variables_e2e_example.py +34 -0
  74. sedsnet-4.0.0/python-example/timesync_example.py +53 -0
  75. sedsnet-4.0.0/python-example/typed_routing_example.py +27 -0
  76. sedsnet-4.0.0/python-files/sedsnet/__init__.py +6 -0
  77. sedsnet-4.0.0/python-files/sedsnet/py.typed +0 -0
  78. sedsnet-4.0.0/python-files/sedsnet/sedsnet.pyi +58 -0
  79. sedsnet-4.0.0/rtos-example-code/freertos_timesync.c +47 -0
  80. sedsnet-4.0.0/rtos-example-code/threadx_telemetry.c +616 -0
  81. sedsnet-4.0.0/rtos-example-code/threadx_timesync.c +42 -0
  82. sedsnet-4.0.0/rust-example-code/README.md +17 -0
  83. sedsnet-4.0.0/rust-example-code/load_balancing_example.rs +41 -0
  84. sedsnet-4.0.0/rust-example-code/managed_variables_e2e_example.rs +44 -0
  85. sedsnet-4.0.0/rust-example-code/multinode_sim_example.rs +44 -0
  86. sedsnet-4.0.0/rust-example-code/queue_timeout_example.rs +36 -0
  87. sedsnet-4.0.0/rust-example-code/relay_example.rs +42 -0
  88. sedsnet-4.0.0/rust-example-code/reliable_example.rs +36 -0
  89. sedsnet-4.0.0/rust-example-code/timesync_example.rs +43 -0
  90. sedsnet-4.0.0/rust-example-code/typed_routing_example.rs +60 -0
  91. sedsnet-4.0.0/sedsnet_macros/Cargo.lock +110 -0
  92. sedsnet-4.0.0/sedsnet_macros/Cargo.toml +21 -0
  93. sedsnet-4.0.0/sedsnet_macros/src/lib.rs +1201 -0
  94. sedsnet-4.0.0/src/c_api.rs +7047 -0
  95. sedsnet-4.0.0/src/config.rs +2606 -0
  96. sedsnet-4.0.0/src/crypto.rs +843 -0
  97. sedsnet-4.0.0/src/diagnostics.rs +157 -0
  98. sedsnet-4.0.0/src/discovery.rs +1122 -0
  99. sedsnet-4.0.0/src/lib.rs +938 -0
  100. sedsnet-4.0.0/src/lock.rs +165 -0
  101. sedsnet-4.0.0/src/macros.rs +269 -0
  102. sedsnet-4.0.0/src/packet.rs +1124 -0
  103. sedsnet-4.0.0/src/python_api.rs +3183 -0
  104. sedsnet-4.0.0/src/queue.rs +470 -0
  105. sedsnet-4.0.0/src/relay.rs +5169 -0
  106. sedsnet-4.0.0/src/router.rs +10371 -0
  107. sedsnet-4.0.0/src/small_payload.rs +225 -0
  108. sedsnet-4.0.0/src/tests.rs +11926 -0
  109. sedsnet-4.0.0/src/timesync.rs +903 -0
  110. sedsnet-4.0.0/src/wire_format.rs +1707 -0
  111. sedsnet-4.0.0/submodule_update.py +107 -0
  112. sedsnet-4.0.0/submodule_update_no_stash.py +195 -0
  113. sedsnet-4.0.0/subtree_update.py +106 -0
  114. sedsnet-4.0.0/subtree_update_no_stash.py +156 -0
  115. sedsnet-4.0.0/telemetry_config.ipc.test.json +24 -0
  116. sedsnet-4.0.0/telemetry_config.test.json +124 -0
  117. sedsnet-4.0.0/telemetry_config_editor.py +1591 -0
  118. sedsnet-4.0.0/tests/c-system-test/c_system_test.rs +126 -0
  119. sedsnet-4.0.0/tests/rust-system-test/compression_memory_pool_test.rs +194 -0
  120. sedsnet-4.0.0/tests/rust-system-test/full_system_test.rs +452 -0
  121. sedsnet-4.0.0/tests/rust-system-test/reliable_drop_test.rs +3510 -0
  122. sedsnet-4.0.0/tests/rust-system-test/rust_system_test.rs +690 -0
  123. sedsnet-4.0.0/tests/rust-system-test/single_threaded_test.rs +439 -0
  124. sedsnet-4.0.0/tests/rust-system-test/timesync_system_test.rs +773 -0
  125. sedsnet-4.0.0/tests/test_python_topology_export.py +208 -0
  126. sedsnet-4.0.0/tests/test_telemetry_config_editor.py +50 -0
@@ -0,0 +1,8 @@
1
+ [target.thumbv7em-none-eabihf]
2
+ linker = "rust-lld"
3
+ rustflags = [
4
+ "-C", "link-arg=-Wl,--gc-sections",
5
+ "-C", "link-arg=-Wl,--icf=all",
6
+ "-C", "link-arg=-Wl,--print-gc-sections",
7
+ "-C", "link-arg=-Wl,-Map=firmware.map",
8
+ ]
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+
16
+ 1. Go to '...'
17
+ 2. Create router '....'
18
+ 3. Sends data '....'
19
+ 4. See error
20
+
21
+ **Expected behavior**
22
+ A clear and concise description of what you expected to happen.
23
+
24
+ **Screenshots**
25
+ If applicable, add screenshots to help explain your problem.
26
+
27
+ **General Purpose OS (please complete the following information):**
28
+
29
+ - OS: [e.g. linux]
30
+ - Library Config
31
+ - Version [e.g. 22]
32
+
33
+ **Embedded (please complete the following information):**
34
+
35
+ - Device: [e.g. SM32...]
36
+ - OS: [e.g. freertos]
37
+ - Library Config
38
+ - Version [e.g. 22]
39
+
40
+ **Additional context**
41
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,38 @@
1
+ name: 'Rust Test CI'
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ jobs:
10
+ build_and_test:
11
+ runs-on: ubuntu-latest
12
+ env:
13
+ CARGO_NEXTEST_CACHE_KEY: cargo-nextest-v1
14
+
15
+ steps:
16
+ - name: 'Checkout code'
17
+ uses: actions/checkout@v4
18
+
19
+ - name: 'Install system packages'
20
+ run: |
21
+ sudo apt-get update
22
+ sudo apt-get install -y gcc-arm-none-eabi gnuplot
23
+
24
+ - name: 'Cache cargo-nextest'
25
+ id: cache-cargo-nextest
26
+ uses: actions/cache@v4
27
+ with:
28
+ path: ~/.cargo/bin/cargo-nextest
29
+ key: ${{ runner.os }}-${{ env.CARGO_NEXTEST_CACHE_KEY }}
30
+
31
+ - name: 'Install cargo-nextest'
32
+ if: steps.cache-cargo-nextest.outputs.cache-hit != 'true'
33
+ run: cargo install cargo-nextest --locked
34
+
35
+ - name: 'Build and test'
36
+ run: |
37
+ chmod +x ./build.py
38
+ ./build.py test
@@ -0,0 +1,146 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ cargo-release:
14
+ name: Publish crates.io crates
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install Rust
20
+ uses: dtolnay/rust-toolchain@stable
21
+
22
+ - name: Publish crates
23
+ env:
24
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
25
+ run: |
26
+ python3 publish_crates.py --skip-tests --publish
27
+
28
+ linux-wheels:
29
+ name: Linux wheels (${{ matrix.target }})
30
+ runs-on: ubuntu-latest
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ target:
35
+ - x86_64
36
+ - aarch64
37
+ - armv7
38
+ - i686
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+
42
+ - name: Build wheels
43
+ uses: PyO3/maturin-action@v1
44
+ with:
45
+ target: ${{ matrix.target }}
46
+ args: --release --out dist --compatibility pypi
47
+ manylinux: "2014"
48
+ sccache: "true"
49
+
50
+ - name: Upload wheel artifacts
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: wheels-linux-${{ matrix.target }}
54
+ path: dist
55
+
56
+ macos-wheels:
57
+ name: macOS wheels (${{ matrix.target }})
58
+ runs-on: macos-latest
59
+ strategy:
60
+ fail-fast: false
61
+ matrix:
62
+ target:
63
+ - x86_64
64
+ - aarch64
65
+ steps:
66
+ - uses: actions/checkout@v4
67
+
68
+ - name: Build wheels
69
+ uses: PyO3/maturin-action@v1
70
+ with:
71
+ target: ${{ matrix.target }}
72
+ args: --release --out dist --compatibility pypi
73
+ sccache: "true"
74
+
75
+ - name: Upload wheel artifacts
76
+ uses: actions/upload-artifact@v4
77
+ with:
78
+ name: wheels-macos-${{ matrix.target }}
79
+ path: dist
80
+
81
+ windows-wheels:
82
+ name: Windows wheels (${{ matrix.target }})
83
+ runs-on: windows-latest
84
+ strategy:
85
+ fail-fast: false
86
+ matrix:
87
+ target:
88
+ - x64
89
+ - x86
90
+ steps:
91
+ - uses: actions/checkout@v4
92
+
93
+ - name: Build wheels
94
+ uses: PyO3/maturin-action@v1
95
+ with:
96
+ target: ${{ matrix.target }}
97
+ args: --release --out dist --compatibility pypi
98
+ sccache: "true"
99
+
100
+ - name: Upload wheel artifacts
101
+ uses: actions/upload-artifact@v4
102
+ with:
103
+ name: wheels-windows-${{ matrix.target }}
104
+ path: dist
105
+
106
+ sdist:
107
+ name: Source distribution
108
+ runs-on: ubuntu-latest
109
+ steps:
110
+ - uses: actions/checkout@v4
111
+
112
+ - name: Build sdist
113
+ uses: PyO3/maturin-action@v1
114
+ with:
115
+ command: sdist
116
+ args: --out dist
117
+
118
+ - name: Upload sdist artifact
119
+ uses: actions/upload-artifact@v4
120
+ with:
121
+ name: sdist
122
+ path: dist
123
+
124
+ pypi-release:
125
+ name: Publish PyPI artifacts
126
+ runs-on: ubuntu-latest
127
+ needs:
128
+ - linux-wheels
129
+ - macos-wheels
130
+ - windows-wheels
131
+ - sdist
132
+ permissions:
133
+ contents: read
134
+ id-token: write
135
+ steps:
136
+ - name: Download wheel artifacts
137
+ uses: actions/download-artifact@v4
138
+ with:
139
+ path: dist
140
+ merge-multiple: true
141
+
142
+ - name: Publish to PyPI
143
+ uses: pypa/gh-action-pypi-publish@release/v1
144
+ with:
145
+ packages-dir: dist
146
+ skip-existing: true
@@ -0,0 +1,25 @@
1
+ /target
2
+ /dist/
3
+ /Cargo.lock
4
+ /CMakeFiles
5
+ /Makefile
6
+ /cmake_install.cmake
7
+ .DS_Store
8
+ .idea
9
+ venv/
10
+ __pycache__/
11
+ .sedsnet-release.toml
12
+
13
+ c-system-test/build/
14
+
15
+ c-example-code/build/
16
+
17
+ python-files/sedsnet/sedsnet.pyi
18
+
19
+ *.so
20
+ *.pyi
21
+ /sedsnet_macros/target/
22
+ /sedsnet_macros/Cargo.lock
23
+
24
+ *..wiki/
25
+ /inspection/
@@ -0,0 +1,159 @@
1
+ # GitLab CI Pipeline Configuration
2
+ workflow:
3
+ rules:
4
+ - if: '$CI_COMMIT_BRANCH == "main"'
5
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
6
+ - if: '$CI_PIPELINE_SOURCE == "web"'
7
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
8
+
9
+ stages:
10
+ - test
11
+ - release
12
+ - wheels
13
+ - publish
14
+
15
+ rust-tests:
16
+ stage: test
17
+ image:
18
+ name: registry.gitlab.rylanswebsite.com/rylan-meilutis/rust-docker-builder:x86
19
+ script:
20
+ - chmod +x build.py && ./build.py test
21
+
22
+ cargo-release:
23
+ stage: release
24
+ image: rust:latest
25
+ rules:
26
+ - if: '$CI_COMMIT_TAG =~ /^v/'
27
+ before_script:
28
+ - apt-get update
29
+ - apt-get install -y python3
30
+ script:
31
+ - python3 publish_crates.py --skip-tests --publish
32
+
33
+ linux-wheels:
34
+ stage: wheels
35
+ image:
36
+ name: ghcr.io/pyo3/maturin:latest
37
+ entrypoint: [""]
38
+ rules:
39
+ - if: '$CI_COMMIT_TAG =~ /^v/'
40
+ parallel:
41
+ matrix:
42
+ - TARGET:
43
+ - x86_64-unknown-linux-gnu
44
+ - aarch64-unknown-linux-gnu
45
+ - armv7-unknown-linux-gnueabihf
46
+ - i686-unknown-linux-gnu
47
+ script:
48
+ - python3 -m pip install ziglang
49
+ - rustup target add "$TARGET"
50
+ - maturin build --release --compatibility pypi --out dist --target "$TARGET" --zig
51
+ artifacts:
52
+ paths:
53
+ - dist/
54
+ expire_in: 1 week
55
+
56
+ windows-cross-wheels:
57
+ stage: wheels
58
+ image: rust:bookworm
59
+ rules:
60
+ - if: '$CI_COMMIT_TAG =~ /^v/'
61
+ parallel:
62
+ matrix:
63
+ - TARGET:
64
+ - x86_64-pc-windows-msvc
65
+ before_script:
66
+ - apt-get update
67
+ - apt-get install -y clang lld llvm python3-pip curl ca-certificates
68
+ - ln -sf "$(command -v clang)" /usr/local/bin/clang-cl
69
+ - curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
70
+ - export PATH="/usr/local/cargo/bin:$PATH"
71
+ - python3 -m pip install --break-system-packages maturin
72
+ script:
73
+ - export PATH="/usr/local/cargo/bin:$PATH"
74
+ - rustup target add "$TARGET"
75
+ - maturin build --release --compatibility pypi --out dist --target "$TARGET"
76
+ artifacts:
77
+ paths:
78
+ - dist/
79
+ expire_in: 1 week
80
+
81
+ macos-cross-wheels:
82
+ stage: wheels
83
+ rules:
84
+ - if: '$CI_COMMIT_TAG =~ /^v/'
85
+ parallel:
86
+ matrix:
87
+ - TARGET: x86_64-apple-darwin
88
+ MACOS_IMAGE: registry.gitlab.rylanswebsite.com/rylan-meilutis/macos-cargo-image/x86_64-apple-darwin:x86_64-apple-darwin
89
+ LINKER_PREFIX: x86_64-apple-darwin21.4
90
+ - TARGET: aarch64-apple-darwin
91
+ MACOS_IMAGE: registry.gitlab.rylanswebsite.com/rylan-meilutis/macos-cargo-image/aarch64-apple-darwin:aarch64-apple-darwin
92
+ LINKER_PREFIX: aarch64-apple-darwin21.4
93
+ image:
94
+ name: $MACOS_IMAGE
95
+ entrypoint: [""]
96
+ before_script:
97
+ - export PATH="/opt/osxcross/bin:$HOME/.cargo/bin:/usr/local/cargo/bin:$PATH"
98
+ - apt-get update
99
+ - apt-get install -y python3-pip curl ca-certificates
100
+ - curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
101
+ - source "$HOME/.cargo/env"
102
+ - python3 -m pip install maturin
103
+ script:
104
+ - export PATH="/opt/osxcross/bin:$HOME/.cargo/bin:/usr/local/cargo/bin:$PATH"
105
+ - source "$HOME/.cargo/env"
106
+ - rustup target add "$TARGET"
107
+ - export TARGET_ENV="${TARGET//-/_}"
108
+ - export TARGET_ENV_UPPER="$(echo "$TARGET_ENV" | tr '[:lower:]' '[:upper:]')"
109
+ - export "CC_${TARGET_ENV}=${LINKER_PREFIX}-clang"
110
+ - export "CXX_${TARGET_ENV}=${LINKER_PREFIX}-clang++"
111
+ - export "AR_${TARGET_ENV}=${LINKER_PREFIX}-ar"
112
+ - export "CARGO_TARGET_${TARGET_ENV_UPPER}_LINKER=${LINKER_PREFIX}-clang"
113
+ - export "CARGO_TARGET_${TARGET_ENV_UPPER}_AR=${LINKER_PREFIX}-ar"
114
+ - export "CARGO_TARGET_${TARGET_ENV_UPPER}_RUSTFLAGS=-C link-arg=-undefined -C link-arg=dynamic_lookup"
115
+ - maturin build --release --compatibility pypi --out dist --target "$TARGET"
116
+ artifacts:
117
+ paths:
118
+ - dist/
119
+ expire_in: 1 week
120
+
121
+ python-sdist:
122
+ stage: wheels
123
+ image:
124
+ name: ghcr.io/pyo3/maturin:latest
125
+ entrypoint: [""]
126
+ rules:
127
+ - if: '$CI_COMMIT_TAG =~ /^v/'
128
+ script:
129
+ - maturin sdist --out dist
130
+ artifacts:
131
+ paths:
132
+ - dist/
133
+ expire_in: 1 week
134
+
135
+ pypi-release:
136
+ stage: publish
137
+ image: python:3.12
138
+ rules:
139
+ - if: '$CI_COMMIT_TAG =~ /^v/'
140
+ needs:
141
+ - job: linux-wheels
142
+ artifacts: true
143
+ - job: python-sdist
144
+ artifacts: true
145
+ - job: windows-cross-wheels
146
+ artifacts: true
147
+ optional: true
148
+ - job: macos-cross-wheels
149
+ artifacts: true
150
+ optional: true
151
+ script:
152
+ - python3 -m pip install maturin
153
+ - maturin upload --skip-existing --username __token__ --password "$MATURIN_PYPI_TOKEN" dist/*
154
+
155
+ sast:
156
+ stage: test
157
+ include:
158
+ - template: Security/SAST.gitlab-ci.yml
159
+ - template: Security/Secret-Detection.gitlab-ci.yml