vapoursynth-cranexpr 0.3.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 (56) hide show
  1. vapoursynth_cranexpr-0.3.0/.editorconfig +9 -0
  2. vapoursynth_cranexpr-0.3.0/.gitattributes +1 -0
  3. vapoursynth_cranexpr-0.3.0/.github/renovate.json +34 -0
  4. vapoursynth_cranexpr-0.3.0/.github/workflows/build-release-binaries.yml +53 -0
  5. vapoursynth_cranexpr-0.3.0/.github/workflows/ci.yml +162 -0
  6. vapoursynth_cranexpr-0.3.0/.github/workflows/publish.yml +33 -0
  7. vapoursynth_cranexpr-0.3.0/.gitignore +3 -0
  8. vapoursynth_cranexpr-0.3.0/Cargo.lock +1456 -0
  9. vapoursynth_cranexpr-0.3.0/Cargo.toml +80 -0
  10. vapoursynth_cranexpr-0.3.0/LICENSE.txt +201 -0
  11. vapoursynth_cranexpr-0.3.0/PKG-INFO +109 -0
  12. vapoursynth_cranexpr-0.3.0/README.md +100 -0
  13. vapoursynth_cranexpr-0.3.0/clippy.toml +1 -0
  14. vapoursynth_cranexpr-0.3.0/hatch_build.py +75 -0
  15. vapoursynth_cranexpr-0.3.0/pyproject.toml +48 -0
  16. vapoursynth_cranexpr-0.3.0/rust-toolchain.toml +3 -0
  17. vapoursynth_cranexpr-0.3.0/rustfmt.toml +3 -0
  18. vapoursynth_cranexpr-0.3.0/src/codegen/compiler.rs +744 -0
  19. vapoursynth_cranexpr-0.3.0/src/codegen/globals.rs +61 -0
  20. vapoursynth_cranexpr-0.3.0/src/codegen/mod.rs +64 -0
  21. vapoursynth_cranexpr-0.3.0/src/codegen/pointer.rs +72 -0
  22. vapoursynth_cranexpr-0.3.0/src/codegen/translate.rs +481 -0
  23. vapoursynth_cranexpr-0.3.0/src/component_type.rs +72 -0
  24. vapoursynth_cranexpr-0.3.0/src/errors.rs +76 -0
  25. vapoursynth_cranexpr-0.3.0/src/lexer/cursor.rs +65 -0
  26. vapoursynth_cranexpr-0.3.0/src/lexer/mod.rs +430 -0
  27. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__binary_ops-2.snap +14 -0
  28. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__binary_ops.snap +14 -0
  29. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__dot.snap +10 -0
  30. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__example.snap +64 -0
  31. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__ident.snap +10 -0
  32. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__literals-2.snap +12 -0
  33. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__literals-3.snap +12 -0
  34. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__literals-4.snap +12 -0
  35. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__literals-5.snap +12 -0
  36. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__literals.snap +12 -0
  37. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__ternary.snap +18 -0
  38. vapoursynth_cranexpr-0.3.0/src/lexer/snapshots/cranexpr__lexer__tests__underscore_prop_name.snap +10 -0
  39. vapoursynth_cranexpr-0.3.0/src/lib.rs +371 -0
  40. vapoursynth_cranexpr-0.3.0/src/parser/ast.rs +173 -0
  41. vapoursynth_cranexpr-0.3.0/src/parser/mod.rs +388 -0
  42. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__atan2.snap +8 -0
  43. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__clip.snap +9 -0
  44. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__dup-2.snap +26 -0
  45. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__dup.snap +8 -0
  46. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__eq_op.snap +8 -0
  47. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__example.snap +20 -0
  48. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__exponent.snap +13 -0
  49. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__literals.snap +5 -0
  50. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__negative_literal.snap +11 -0
  51. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__prop.snap +7 -0
  52. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__swap.snap +14 -0
  53. vapoursynth_cranexpr-0.3.0/src/parser/snapshots/cranexpr__parser__tests__variables.snap +14 -0
  54. vapoursynth_cranexpr-0.3.0/src/parser/visit.rs +82 -0
  55. vapoursynth_cranexpr-0.3.0/src/prop_visitor.rs +52 -0
  56. vapoursynth_cranexpr-0.3.0/uv.lock +62 -0
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 2
7
+ indent_style = space
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:best-practices",
5
+ ":automergeMinor",
6
+ ":automergePr",
7
+ ":automergeRequireAllStatusChecks",
8
+ ":disableDependencyDashboard",
9
+ ":disableRateLimiting",
10
+ ":semanticCommits",
11
+ ":semanticCommitScopeDisabled",
12
+ ":semanticCommitTypeAll(deps)"
13
+ ],
14
+ "rangeStrategy": "bump",
15
+ "packageRules": [
16
+ {
17
+ "matchManagers": ["github-actions"],
18
+ "extends": [":semanticCommitTypeAll(ci)"]
19
+ },
20
+ {
21
+ "matchPackageNames": [
22
+ "cranelift",
23
+ "cranelift-jit",
24
+ "cranelift-module",
25
+ "cranelift-native"
26
+ ],
27
+ "groupName": "cranelift"
28
+ },
29
+ {
30
+ "matchDepNames": ["python"],
31
+ "enabled": false
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,53 @@
1
+ name: Build release binaries
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ permissions: {}
7
+
8
+ env:
9
+ CIBW_BEFORE_ALL_LINUX: curl -sSf https://sh.rustup.rs | sh -s -- -y
10
+ CIBW_BEFORE_ALL_WINDOWS: rustup target add x86_64-pc-windows-gnu
11
+ CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
12
+
13
+ jobs:
14
+ sdist:
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19
+
20
+ - name: Setup Rust
21
+ uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
22
+ with:
23
+ toolchain: nightly
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
27
+
28
+ - name: Build sdist
29
+ run: uv build --sdist
30
+
31
+ - name: Upload sdist
32
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
33
+ with:
34
+ name: wheels-sdist
35
+ path: dist/*.tar.gz
36
+
37
+ build-wheels:
38
+ runs-on: ${{ matrix.runner }}
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ runner: [ubuntu-24.04, ubuntu-24.04-arm, macos-26, windows-latest]
43
+ steps:
44
+ - name: Checkout code
45
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46
+
47
+ - name: Build wheels
48
+ uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
49
+
50
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
51
+ with:
52
+ name: wheels-${{ matrix.runner }}
53
+ path: ./wheelhouse/*.whl
@@ -0,0 +1,162 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - v*
9
+
10
+ pull_request:
11
+ types:
12
+ - opened
13
+ - synchronize
14
+ - reopened
15
+ - ready_for_review
16
+
17
+ merge_group:
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ build:
24
+ name: build (${{ matrix.target }})
25
+ permissions:
26
+ id-token: write
27
+ contents: read
28
+ attestations: write
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ include:
33
+ - os: ubuntu-latest
34
+ target: x86_64-unknown-linux-gnu
35
+ ext: so
36
+ - os: windows-latest
37
+ target: x86_64-pc-windows-gnu
38
+ ext: dll
39
+ - os: macos-26
40
+ target: aarch64-apple-darwin
41
+ ext: dylib
42
+ runs-on: ${{ matrix.os }}
43
+ steps:
44
+ - name: Checkout code
45
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46
+
47
+ - name: Setup Rust
48
+ uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
49
+ with:
50
+ target: ${{ matrix.target }}
51
+ toolchain: nightly
52
+
53
+ - name: Print available CPUs
54
+ run: rustup run nightly rustc --print target-cpus
55
+
56
+ - name: Build
57
+ run: cargo build --release --target ${{ matrix.target }}
58
+
59
+ - name: Attest build provenance
60
+ uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
61
+ if: ${{ github.event_name == 'push' }}
62
+ with:
63
+ subject-path: target/${{ matrix.target }}/release/*cranexpr.${{ matrix.ext }}
64
+
65
+ - name: Upload
66
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
67
+ with:
68
+ name: cranexpr-${{ matrix.target }}
69
+ path: target/${{ matrix.target }}/release/*cranexpr.${{ matrix.ext }}
70
+
71
+ build-release-binaries:
72
+ uses: ./.github/workflows/build-release-binaries.yml
73
+
74
+ test:
75
+ strategy:
76
+ fail-fast: false
77
+ matrix:
78
+ os: [ubuntu-24.04, macos-26, windows-latest]
79
+ runs-on: ${{ matrix.os }}
80
+ steps:
81
+ - name: Checkout code
82
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
83
+
84
+ - name: Setup Rust
85
+ uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
86
+ with:
87
+ toolchain: nightly
88
+
89
+ - name: Install cargo-nextest
90
+ uses: taiki-e/install-action@6e4b50d359005dacdb018fa32c03bc35522c6616 # v2.75.12
91
+ with:
92
+ tool: cargo-nextest
93
+
94
+ - name: Run tests
95
+ run: cargo nextest run --all-features --workspace
96
+
97
+ clippy:
98
+ runs-on: ubuntu-24.04
99
+ steps:
100
+ - name: Checkout code
101
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
102
+
103
+ - name: Setup Rust
104
+ uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
105
+ with:
106
+ components: clippy
107
+ toolchain: nightly
108
+
109
+ - name: Run Clippy
110
+ run: cargo clippy
111
+
112
+ rustfmt:
113
+ runs-on: ubuntu-24.04
114
+ steps:
115
+ - name: Checkout code
116
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
117
+
118
+ - name: Setup Rust
119
+ uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
120
+ with:
121
+ components: rustfmt
122
+ toolchain: nightly
123
+
124
+ - name: Run rustfmt
125
+ uses: actions-rust-lang/rustfmt@4066006ec54a31931b9b1fddfd38f2fdf2d27143 # v1.1.2
126
+
127
+ cargo-shear:
128
+ runs-on: ubuntu-24.04
129
+ steps:
130
+ - name: Checkout code
131
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
132
+
133
+ - name: Install cargo-shear
134
+ uses: taiki-e/install-action@6e4b50d359005dacdb018fa32c03bc35522c6616 # v2.75.12
135
+ with:
136
+ tool: cargo-shear
137
+
138
+ - run: cargo shear
139
+
140
+ ruff-check:
141
+ runs-on: ubuntu-24.04
142
+ steps:
143
+ - name: Checkout code
144
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
145
+
146
+ - name: Install uv
147
+ uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
148
+
149
+ - name: ruff
150
+ run: uv run ruff check .
151
+
152
+ ruff-format:
153
+ runs-on: ubuntu-24.04
154
+ steps:
155
+ - name: Checkout code
156
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
157
+
158
+ - name: Install uv
159
+ uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
160
+
161
+ - name: ruff format
162
+ run: uv run ruff format --check .
@@ -0,0 +1,33 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build-release-binaries:
11
+ uses: ./.github/workflows/build-release-binaries.yml
12
+
13
+ publish:
14
+ needs: [build-release-binaries]
15
+ name: publish
16
+ runs-on: ubuntu-24.04
17
+
18
+ environment:
19
+ name: pypi
20
+ url: https://pypi.org/p/vapoursynth-cranexpr
21
+
22
+ permissions:
23
+ id-token: write
24
+
25
+ steps:
26
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
27
+ with:
28
+ pattern: wheels-*
29
+ path: dist
30
+ merge-multiple: true
31
+
32
+ - name: Publish to PyPI
33
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
@@ -0,0 +1,3 @@
1
+ __pycache__
2
+ /target
3
+ /vapoursynth