Skip to content

Commit

Permalink
Remove generated client wrapper and generator (#44)
Browse files Browse the repository at this point in the history
Generating a safe wrapping for fabric client is too ambitious. In
practice the generated wrapper needs to be hand wrapped anyway in
practice as observed in the work of doing FabricClient safe wrapping.
The complete safe wrapping in practice is never generated.
See: #19

The generator is a pain to maintain as well due to windows-metadata does
not have an stable api yet. Every time a windows-rs upgrade, the
generator requires a lot of fixes.

For all these reasons, there is no advantage maintaining the generated
safe wrappings, so I am removing it in this PR.
In future all safe wrapping are going to be manually wrapped, as they
already are. If the windows-metadata or windows-bindgen crate supports
api to access to the unsafe com bindings syntax structures in future,
this work can be revived.
  • Loading branch information
youyuanwu authored Jun 28, 2024
1 parent 29a7a3a commit ccac666
Show file tree
Hide file tree
Showing 18 changed files with 3 additions and 3,613 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
run: >
cmake . -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -B build
- name: generate rust client wrapper
run: cmake --build build --config ${{ matrix.BUILD_TYPE }} --target generate_client

- name: remove generated com code
run: cmake --build build --config ${{ matrix.BUILD_TYPE }} --target force_clean

Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ add_custom_target(generate_rust
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(generate_client
COMMAND ${cargo_exe} run -p tools_fabric_gen
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(build_rust
COMMAND ${cargo_exe} build
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
36 changes: 0 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ccac666

Please sign in to comment.