navyfox 0.1.2__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 (102) hide show
  1. navyfox-0.1.2/.github/workflows/build-native.yml +116 -0
  2. navyfox-0.1.2/.github/workflows/ci.yml +75 -0
  3. navyfox-0.1.2/.github/workflows/docs.yml +54 -0
  4. navyfox-0.1.2/.github/workflows/release.yml +171 -0
  5. navyfox-0.1.2/.gitignore +71 -0
  6. navyfox-0.1.2/CHANGELOG.md +28 -0
  7. navyfox-0.1.2/Cargo.lock +173 -0
  8. navyfox-0.1.2/Cargo.toml +12 -0
  9. navyfox-0.1.2/PKG-INFO +646 -0
  10. navyfox-0.1.2/README.md +620 -0
  11. navyfox-0.1.2/build.rs +56 -0
  12. navyfox-0.1.2/docs/.gitignore +2 -0
  13. navyfox-0.1.2/docs/DESIGN.md +776 -0
  14. navyfox-0.1.2/docs/Makefile +12 -0
  15. navyfox-0.1.2/docs/_static/favicon.png +0 -0
  16. navyfox-0.1.2/docs/assets/NavyFox Icon.svg +13 -0
  17. navyfox-0.1.2/docs/assets/NavyFox Icon@2x.png +0 -0
  18. navyfox-0.1.2/docs/assets/perf_read_time.png +0 -0
  19. navyfox-0.1.2/docs/assets/perf_size.png +0 -0
  20. navyfox-0.1.2/docs/assets/perf_time.png +0 -0
  21. navyfox-0.1.2/docs/assets/perf_write_time.png +0 -0
  22. navyfox-0.1.2/docs/concepts.md +127 -0
  23. navyfox-0.1.2/docs/conf.py +56 -0
  24. navyfox-0.1.2/docs/index.md +48 -0
  25. navyfox-0.1.2/docs/quickstart.md +268 -0
  26. navyfox-0.1.2/docx_native_v1_spec.md +821 -0
  27. navyfox-0.1.2/hatch_build.py +58 -0
  28. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Collections.cs +475 -0
  29. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Document.cs +127 -0
  30. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Images.cs +361 -0
  31. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Lists.cs +159 -0
  32. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Properties.cs +754 -0
  33. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Sections.cs +149 -0
  34. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Styles.cs +414 -0
  35. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.Tables.cs +43 -0
  36. navyfox-0.1.2/native/NavyFox.Native/DocumentBuilder.cs +236 -0
  37. navyfox-0.1.2/native/NavyFox.Native/Marshalling/StructLayouts.cs +102 -0
  38. navyfox-0.1.2/native/NavyFox.Native/NativeExports.cs +107 -0
  39. navyfox-0.1.2/native/NavyFox.Native/NavyFox.Native.csproj +32 -0
  40. navyfox-0.1.2/native/NavyFox.Native/rd.xml +11 -0
  41. navyfox-0.1.2/navyfox.sln +41 -0
  42. navyfox-0.1.2/pyproject.toml +82 -0
  43. navyfox-0.1.2/scripts/benchmark.py +203 -0
  44. navyfox-0.1.2/scripts/check_struct_layouts.py +63 -0
  45. navyfox-0.1.2/scripts/generate_charts.py +198 -0
  46. navyfox-0.1.2/src/lib.rs +369 -0
  47. navyfox-0.1.2/src/navyfox/__init__.py +150 -0
  48. navyfox-0.1.2/src/navyfox/__init__.pyi +76 -0
  49. navyfox-0.1.2/src/navyfox/_block.py +260 -0
  50. navyfox-0.1.2/src/navyfox/_collection.py +465 -0
  51. navyfox-0.1.2/src/navyfox/_collection.pyi +52 -0
  52. navyfox-0.1.2/src/navyfox/_libs/linux-arm64/.gitkeep +0 -0
  53. navyfox-0.1.2/src/navyfox/_libs/linux-arm64/NavyFox.Native.so.dbg +0 -0
  54. navyfox-0.1.2/src/navyfox/_libs/linux-x64/.gitkeep +0 -0
  55. navyfox-0.1.2/src/navyfox/_libs/osx-arm64/.gitkeep +0 -0
  56. navyfox-0.1.2/src/navyfox/_libs/osx-x64/.gitkeep +0 -0
  57. navyfox-0.1.2/src/navyfox/_libs/win-arm64/.gitkeep +0 -0
  58. navyfox-0.1.2/src/navyfox/_libs/win-x64/.gitkeep +0 -0
  59. navyfox-0.1.2/src/navyfox/_native/__init__.py +4 -0
  60. navyfox-0.1.2/src/navyfox/_native/handle.py +123 -0
  61. navyfox-0.1.2/src/navyfox/_navyfox.pyi +19 -0
  62. navyfox-0.1.2/src/navyfox/_proxy/__init__.py +24 -0
  63. navyfox-0.1.2/src/navyfox/_proxy/base.py +352 -0
  64. navyfox-0.1.2/src/navyfox/_proxy/descriptors.py +354 -0
  65. navyfox-0.1.2/src/navyfox/document.py +552 -0
  66. navyfox-0.1.2/src/navyfox/document.pyi +89 -0
  67. navyfox-0.1.2/src/navyfox/errors.py +57 -0
  68. navyfox-0.1.2/src/navyfox/errors.pyi +6 -0
  69. navyfox-0.1.2/src/navyfox/formats.py +230 -0
  70. navyfox-0.1.2/src/navyfox/formats.pyi +158 -0
  71. navyfox-0.1.2/src/navyfox/hyperlink.py +83 -0
  72. navyfox-0.1.2/src/navyfox/image.py +164 -0
  73. navyfox-0.1.2/src/navyfox/paragraph.py +554 -0
  74. navyfox-0.1.2/src/navyfox/paragraph.pyi +129 -0
  75. navyfox-0.1.2/src/navyfox/py.typed +0 -0
  76. navyfox-0.1.2/src/navyfox/run.py +538 -0
  77. navyfox-0.1.2/src/navyfox/run.pyi +139 -0
  78. navyfox-0.1.2/src/navyfox/section.py +134 -0
  79. navyfox-0.1.2/src/navyfox/section.pyi +67 -0
  80. navyfox-0.1.2/src/navyfox/styles.py +440 -0
  81. navyfox-0.1.2/src/navyfox/styles.pyi +95 -0
  82. navyfox-0.1.2/src/navyfox/table.py +322 -0
  83. navyfox-0.1.2/src/navyfox/table.pyi +99 -0
  84. navyfox-0.1.2/src/navyfox/units.py +236 -0
  85. navyfox-0.1.2/tests/__init__.py +0 -0
  86. navyfox-0.1.2/tests/conftest.py +6 -0
  87. navyfox-0.1.2/tests/integration/__init__.py +0 -0
  88. navyfox-0.1.2/tests/integration/test_roundtrip.py +391 -0
  89. navyfox-0.1.2/tests/native/NavyFox.Native.Tests/GenericApiTests.cs +663 -0
  90. navyfox-0.1.2/tests/native/NavyFox.Native.Tests/NavyFox.Native.Tests.csproj +29 -0
  91. navyfox-0.1.2/tests/native/NavyFox.Native.Tests/SmokeTests.cs +250 -0
  92. navyfox-0.1.2/tests/native/NavyFox.Native.Tests/TestHelper.cs +94 -0
  93. navyfox-0.1.2/tests/unit/__init__.py +0 -0
  94. navyfox-0.1.2/tests/unit/mock_handle.py +278 -0
  95. navyfox-0.1.2/tests/unit/test_document.py +1006 -0
  96. navyfox-0.1.2/tests/unit/test_document_io.py +224 -0
  97. navyfox-0.1.2/tests/unit/test_hyperlink.py +302 -0
  98. navyfox-0.1.2/tests/unit/test_image.py +376 -0
  99. navyfox-0.1.2/tests/unit/test_list_and_breaks.py +171 -0
  100. navyfox-0.1.2/tests/unit/test_refactor.py +663 -0
  101. navyfox-0.1.2/tests/unit/test_section.py +269 -0
  102. navyfox-0.1.2/uv.lock +2424 -0
@@ -0,0 +1,116 @@
1
+ name: Build Native Binaries
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ workflow_call:
10
+
11
+ jobs:
12
+ build-linux:
13
+ name: Build ${{ matrix.rid }}
14
+ runs-on: ${{ matrix.os }}
15
+ container: ${{ matrix.container }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - rid: linux-x64
21
+ os: ubuntu-24.04
22
+ lib_name: NavyFox.Native.so
23
+ container: quay.io/pypa/manylinux_2_28_x86_64
24
+ - rid: linux-arm64
25
+ os: ubuntu-24.04-arm
26
+ lib_name: NavyFox.Native.so
27
+ container: quay.io/pypa/manylinux_2_28_aarch64
28
+
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+
32
+ - name: Install native build tools
33
+ run: yum install -y clang zlib-devel libxml2-devel
34
+
35
+ - name: Install .NET 9
36
+ run: |
37
+ curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 9.0 --install-dir /usr/local/dotnet
38
+ echo "/usr/local/dotnet" >> $GITHUB_PATH
39
+ echo "DOTNET_ROOT=/usr/local/dotnet" >> $GITHUB_ENV
40
+ echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV
41
+
42
+ - name: Publish Native AOT shared library
43
+ run: >
44
+ dotnet publish native/NavyFox.Native/NavyFox.Native.csproj
45
+ -r ${{ matrix.rid }}
46
+ -c Release
47
+ --self-contained true
48
+ -p:PublishAot=true
49
+ -p:NativeLib=Shared
50
+ -p:StripSymbols=true
51
+ -p:InvariantGlobalization=true
52
+ -o publish/${{ matrix.rid }}
53
+
54
+ - name: Upload artifact
55
+ uses: actions/upload-artifact@v4
56
+ with:
57
+ name: native-${{ matrix.rid }}
58
+ path: publish/${{ matrix.rid }}/
59
+ if-no-files-found: error
60
+ retention-days: 7
61
+
62
+ build-other:
63
+ name: Build ${{ matrix.rid }}
64
+ runs-on: ${{ matrix.os }}
65
+ strategy:
66
+ fail-fast: false
67
+ matrix:
68
+ include:
69
+ - rid: win-x64
70
+ os: windows-2022
71
+ lib_name: NavyFox.Native.dll
72
+ publish_props: ""
73
+ - rid: win-arm64
74
+ os: windows-11-arm
75
+ lib_name: NavyFox.Native.dll
76
+ publish_props: ""
77
+ - rid: osx-arm64
78
+ os: macos-15
79
+ lib_name: NavyFox.Native.dylib
80
+ publish_props: "-p:MacOSXDeploymentTarget=12.0"
81
+ - rid: osx-x64
82
+ os: macos-15
83
+ lib_name: NavyFox.Native.dylib
84
+ publish_props: "-p:MacOSXDeploymentTarget=12.0"
85
+
86
+ steps:
87
+ - uses: actions/checkout@v4
88
+
89
+ - name: Setup .NET 9
90
+ uses: actions/setup-dotnet@v4
91
+ with:
92
+ dotnet-version: "9.0.x"
93
+
94
+ - name: Publish Native AOT shared library
95
+ run: >
96
+ dotnet publish native/NavyFox.Native/NavyFox.Native.csproj
97
+ -r ${{ matrix.rid }}
98
+ -c Release
99
+ --self-contained true
100
+ -p:PublishAot=true
101
+ -p:NativeLib=Shared
102
+ -p:StripSymbols=true
103
+ ${{ matrix.publish_props }}
104
+ -o publish/${{ matrix.rid }}
105
+
106
+ - name: Fix dylib install name (macOS)
107
+ if: runner.os == 'macOS'
108
+ run: install_name_tool -id @rpath/${{ matrix.lib_name }} publish/${{ matrix.rid }}/${{ matrix.lib_name }}
109
+
110
+ - name: Upload artifact
111
+ uses: actions/upload-artifact@v4
112
+ with:
113
+ name: native-${{ matrix.rid }}
114
+ path: publish/${{ matrix.rid }}/
115
+ if-no-files-found: error
116
+ retention-days: 7
@@ -0,0 +1,75 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ dotnet:
11
+ name: .NET build & tests
12
+ runs-on: ubuntu-24.04
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Setup .NET 9
17
+ uses: actions/setup-dotnet@v4
18
+ with:
19
+ dotnet-version: "9.0.x"
20
+
21
+ - name: Restore
22
+ run: dotnet restore native/NavyFox.Native/NavyFox.Native.csproj
23
+
24
+ - name: Build (TreatWarningsAsErrors + AOT analyser)
25
+ run: >
26
+ dotnet build native/NavyFox.Native/NavyFox.Native.csproj
27
+ -c Release
28
+ -p:TreatWarningsAsErrors=true
29
+ -p:EnableAotAnalyzer=true
30
+ --no-restore
31
+
32
+ - name: Run C# xUnit tests
33
+ run: >
34
+ dotnet test tests/native/NavyFox.Native.Tests/NavyFox.Native.Tests.csproj
35
+ -c Release
36
+ --logger "console;verbosity=normal"
37
+
38
+ struct-layout-check:
39
+ name: Struct layout check
40
+ runs-on: ubuntu-24.04
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+
44
+ - name: Setup Python
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.12"
48
+
49
+ - name: Run check_struct_layouts.py
50
+ run: python scripts/check_struct_layouts.py
51
+
52
+ python:
53
+ name: Python lint, type-check & unit tests
54
+ runs-on: ubuntu-24.04
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+
58
+ - name: Setup Python
59
+ uses: actions/setup-python@v5
60
+ with:
61
+ python-version: "3.12"
62
+
63
+ - name: Install dev dependencies
64
+ run: |
65
+ python -m pip install --upgrade pip
66
+ pip install "mypy>=1.11" "ruff>=0.6" "pytest>=8" "pytest-cov>=5" "python-docx>=1.1" "maturin>=1.0" "twine>=5"
67
+
68
+ - name: ruff check
69
+ run: ruff check src/navyfox tests
70
+
71
+ - name: mypy --strict
72
+ run: mypy --strict src/navyfox
73
+
74
+ - name: pytest (unit only)
75
+ run: pytest tests/unit/ -v --tb=short
@@ -0,0 +1,54 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: pages
14
+ cancel-in-progress: false
15
+
16
+ jobs:
17
+ build:
18
+ name: Build Sphinx docs
19
+ runs-on: ubuntu-24.04
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Setup Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install docs dependencies
29
+ run: pip install "sphinx>=8" "furo>=2024" "sphinx-autoapi>=3.3" "myst-parser>=4"
30
+
31
+ - name: Build HTML
32
+ run: sphinx-build -b html docs docs/_build/html
33
+
34
+ - name: Upload Pages artifact
35
+ if: github.ref == 'refs/heads/main'
36
+ uses: actions/upload-pages-artifact@v3
37
+ with:
38
+ path: docs/_build/html
39
+
40
+ deploy:
41
+ name: Deploy to GitHub Pages
42
+ needs: build
43
+ if: github.ref == 'refs/heads/main'
44
+ runs-on: ubuntu-24.04
45
+ permissions:
46
+ pages: write
47
+ id-token: write
48
+ environment:
49
+ name: github-pages
50
+ url: ${{ steps.deployment.outputs.page_url }}
51
+ steps:
52
+ - name: Deploy
53
+ id: deployment
54
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,171 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write # create GitHub releases and upload assets
11
+ actions: read # download artifacts from reusable workflow jobs
12
+
13
+ jobs:
14
+ build-native:
15
+ uses: ./.github/workflows/build-native.yml
16
+
17
+ build-wheel:
18
+ name: Build wheel (${{ matrix.rid }})
19
+ runs-on: ${{ matrix.os }}
20
+ needs: build-native
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ include:
25
+ - rid: linux-x64
26
+ os: ubuntu-24.04
27
+ rust_target: x86_64-unknown-linux-gnu
28
+ manylinux: "2_28"
29
+ lib_name: NavyFox.Native.so
30
+ - rid: linux-arm64
31
+ os: ubuntu-24.04-arm
32
+ rust_target: aarch64-unknown-linux-gnu
33
+ manylinux: "2_28"
34
+ lib_name: NavyFox.Native.so
35
+ - rid: win-x64
36
+ os: windows-2022
37
+ rust_target: x86_64-pc-windows-msvc
38
+ lib_name: NavyFox.Native.dll
39
+ - rid: win-arm64
40
+ os: windows-11-arm
41
+ rust_target: aarch64-pc-windows-msvc
42
+ lib_name: NavyFox.Native.dll
43
+ - rid: osx-arm64
44
+ os: macos-15
45
+ rust_target: aarch64-apple-darwin
46
+ lib_name: NavyFox.Native.dylib
47
+ - rid: osx-x64
48
+ os: macos-15
49
+ rust_target: x86_64-apple-darwin
50
+ lib_name: NavyFox.Native.dylib
51
+
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+
55
+ - name: Download native binary
56
+ uses: actions/download-artifact@v4
57
+ with:
58
+ name: native-${{ matrix.rid }}
59
+ path: src/navyfox/_libs/${{ matrix.rid }}/
60
+
61
+ - name: Remove .gitkeep placeholders
62
+ shell: bash
63
+ run: find src/navyfox/_libs -name '.gitkeep' -delete
64
+
65
+ - name: Setup Python
66
+ if: runner.os != 'Linux'
67
+ uses: actions/setup-python@v5
68
+ with:
69
+ python-version: "3.12"
70
+
71
+ - name: Build wheel
72
+ uses: PyO3/maturin-action@v1
73
+ with:
74
+ target: ${{ matrix.rust_target }}
75
+ manylinux: ${{ matrix.manylinux || 'off' }}
76
+ args: --release --out dist --find-interpreter
77
+
78
+ - name: Bundle dylib with delocate (macOS)
79
+ if: runner.os == 'macOS'
80
+ run: |
81
+ pip install delocate
82
+ delocate-wheel -w dist/repaired/ -v dist/*.whl
83
+ rm dist/*.whl
84
+ mv dist/repaired/*.whl dist/
85
+
86
+ - name: Bundle DLL with delvewheel (Windows)
87
+ if: runner.os == 'Windows'
88
+ shell: bash
89
+ run: |
90
+ pip install delvewheel
91
+ delvewheel repair --add-path "src/navyfox/_libs/${{ matrix.rid }}/" dist/*.whl -w dist/repaired/
92
+ rm dist/*.whl
93
+ mv dist/repaired/*.whl dist/
94
+
95
+ - name: Stage native binary as release asset
96
+ shell: bash
97
+ run: |
98
+ mkdir -p native_asset
99
+ cp src/navyfox/_libs/${{ matrix.rid }}/${{ matrix.lib_name }} \
100
+ native_asset/${{ matrix.rid }}-${{ matrix.lib_name }}
101
+
102
+ - name: Upload native binary to GitHub Release
103
+ uses: softprops/action-gh-release@v2
104
+ with:
105
+ tag_name: ${{ github.ref_name }}
106
+ files: native_asset/${{ matrix.rid }}-${{ matrix.lib_name }}
107
+ fail_on_unmatched_files: true
108
+
109
+ - name: Upload wheel to GitHub Release
110
+ uses: softprops/action-gh-release@v2
111
+ with:
112
+ tag_name: ${{ github.ref_name }}
113
+ files: dist/*.whl
114
+ fail_on_unmatched_files: true
115
+
116
+ - name: Upload wheel artifact for PyPI
117
+ uses: actions/upload-artifact@v4
118
+ with:
119
+ name: wheels-${{ matrix.rid }}
120
+ path: dist/*.whl
121
+
122
+ build-sdist:
123
+ name: Build sdist
124
+ runs-on: ubuntu-24.04
125
+
126
+ steps:
127
+ - uses: actions/checkout@v4
128
+
129
+ - name: Build sdist
130
+ uses: PyO3/maturin-action@v1
131
+ with:
132
+ command: sdist
133
+ args: --out dist
134
+
135
+ - name: Upload sdist to GitHub Release
136
+ uses: softprops/action-gh-release@v2
137
+ with:
138
+ tag_name: ${{ github.ref_name }}
139
+ files: dist/*.tar.gz
140
+ fail_on_unmatched_files: true
141
+
142
+ - name: Upload sdist artifact for PyPI
143
+ uses: actions/upload-artifact@v4
144
+ with:
145
+ name: sdist
146
+ path: dist/*.tar.gz
147
+
148
+ publish:
149
+ name: Publish to PyPI
150
+ needs: [build-wheel, build-sdist]
151
+ runs-on: ubuntu-24.04
152
+ environment:
153
+ name: pypi
154
+ url: https://pypi.org/p/navyfox
155
+ permissions:
156
+ id-token: write
157
+
158
+ steps:
159
+ - uses: actions/download-artifact@v4
160
+ with:
161
+ pattern: wheels-*
162
+ merge-multiple: true
163
+ path: dist/
164
+
165
+ - uses: actions/download-artifact@v4
166
+ with:
167
+ name: sdist
168
+ path: dist/
169
+
170
+ - name: Publish to PyPI
171
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,71 @@
1
+ # Python
2
+ __pycache__/
3
+ *.dist-info/
4
+ *.py[cod]
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .venv/
9
+ .uv/
10
+
11
+ # Rust build artifacts
12
+ target/
13
+
14
+ # Maturin — compiled extension artifacts (platform-specific, regenerated by maturin develop)
15
+ src/navyfox/_navyfox*.so
16
+ src/navyfox/_navyfox*.pyd
17
+
18
+ # Coverage
19
+ .coverage
20
+ coverage.xml
21
+ htmlcov/
22
+
23
+ # Pytest
24
+ .pytest_cache/
25
+
26
+ # Mypy
27
+ .mypy_cache/
28
+
29
+ # Ruff
30
+ .ruff_cache/
31
+
32
+ # Jupyter / notebooks
33
+ .ipynb_checkpoints/
34
+ notebooks/
35
+
36
+ # .NET / C#
37
+ bin/
38
+ obj/
39
+ publish/
40
+ *.user
41
+ .vs/
42
+ *.nupkg
43
+ *.pdb
44
+ *.ilk
45
+ *.exp
46
+ *.lib
47
+ TestResults/
48
+
49
+ # Benchmark artifacts
50
+ scripts/benchmark_results.json
51
+
52
+ # Scratch / test output
53
+ artifacts/
54
+ *.docx
55
+
56
+ # Env / secrets
57
+ .env
58
+ .env.*
59
+ secrets.toml
60
+
61
+ # Logs
62
+ *.log
63
+
64
+ # OS
65
+ .DS_Store
66
+ Thumbs.db
67
+
68
+ # IDE / tools
69
+ .claude/
70
+ .vscode/
71
+ .idea/
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ All notable changes to NavyFox will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Initial project scaffold.
13
+ - C# Native AOT shared library (`NavyFox.Native`) targeting net9.0 with
14
+ DocumentFormat.OpenXml 3.5.1.
15
+ - Python package `navyfox` with `Document`, `Paragraph`, `Table`, and `Cell`
16
+ classes.
17
+ - Platform-aware lazy binary loader (`navyfox._native.loader`).
18
+ - CFFI bindings matching the C# `[UnmanagedCallersOnly]` exports.
19
+ - `check_struct_layouts.py` CI guard for FFI struct annotations.
20
+ - GitHub Actions workflows: `build-native`, `ci`, `release`.
21
+
22
+ ## [0.1.1] — 2026-06-18
23
+
24
+ ### Fixed
25
+
26
+ - Release workflow: add `hatchling` to build tool installs so `python -m build --no-isolation` can find the build backend.
27
+
28
+ ## [0.1.0] — Unreleased
@@ -0,0 +1,173 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
+
11
+ [[package]]
12
+ name = "heck"
13
+ version = "0.5.0"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
16
+
17
+ [[package]]
18
+ name = "indoc"
19
+ version = "2.0.7"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
22
+ dependencies = [
23
+ "rustversion",
24
+ ]
25
+
26
+ [[package]]
27
+ name = "libc"
28
+ version = "0.2.186"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
31
+
32
+ [[package]]
33
+ name = "memoffset"
34
+ version = "0.9.1"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
37
+ dependencies = [
38
+ "autocfg",
39
+ ]
40
+
41
+ [[package]]
42
+ name = "navyfox"
43
+ version = "0.1.2"
44
+ dependencies = [
45
+ "pyo3",
46
+ ]
47
+
48
+ [[package]]
49
+ name = "once_cell"
50
+ version = "1.21.4"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
53
+
54
+ [[package]]
55
+ name = "portable-atomic"
56
+ version = "1.13.1"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
59
+
60
+ [[package]]
61
+ name = "proc-macro2"
62
+ version = "1.0.106"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
65
+ dependencies = [
66
+ "unicode-ident",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "pyo3"
71
+ version = "0.25.1"
72
+ source = "registry+https://github.com/rust-lang/crates.io-index"
73
+ checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
74
+ dependencies = [
75
+ "indoc",
76
+ "libc",
77
+ "memoffset",
78
+ "once_cell",
79
+ "portable-atomic",
80
+ "pyo3-build-config",
81
+ "pyo3-ffi",
82
+ "pyo3-macros",
83
+ "unindent",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "pyo3-build-config"
88
+ version = "0.25.1"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
91
+ dependencies = [
92
+ "once_cell",
93
+ "target-lexicon",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "pyo3-ffi"
98
+ version = "0.25.1"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
101
+ dependencies = [
102
+ "libc",
103
+ "pyo3-build-config",
104
+ ]
105
+
106
+ [[package]]
107
+ name = "pyo3-macros"
108
+ version = "0.25.1"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
111
+ dependencies = [
112
+ "proc-macro2",
113
+ "pyo3-macros-backend",
114
+ "quote",
115
+ "syn",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "pyo3-macros-backend"
120
+ version = "0.25.1"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
123
+ dependencies = [
124
+ "heck",
125
+ "proc-macro2",
126
+ "pyo3-build-config",
127
+ "quote",
128
+ "syn",
129
+ ]
130
+
131
+ [[package]]
132
+ name = "quote"
133
+ version = "1.0.45"
134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
135
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
136
+ dependencies = [
137
+ "proc-macro2",
138
+ ]
139
+
140
+ [[package]]
141
+ name = "rustversion"
142
+ version = "1.0.22"
143
+ source = "registry+https://github.com/rust-lang/crates.io-index"
144
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
145
+
146
+ [[package]]
147
+ name = "syn"
148
+ version = "2.0.118"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
151
+ dependencies = [
152
+ "proc-macro2",
153
+ "quote",
154
+ "unicode-ident",
155
+ ]
156
+
157
+ [[package]]
158
+ name = "target-lexicon"
159
+ version = "0.13.5"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
162
+
163
+ [[package]]
164
+ name = "unicode-ident"
165
+ version = "1.0.24"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
168
+
169
+ [[package]]
170
+ name = "unindent"
171
+ version = "0.2.4"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,12 @@
1
+ [package]
2
+ name = "navyfox"
3
+ version = "0.1.2"
4
+ edition = "2021"
5
+ readme = "README.md"
6
+
7
+ [lib]
8
+ name = "_navyfox"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = { version = "0.25", features = ["extension-module"] }