mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-04 05:24:27 +00:00
Language bindings, KDE thumbnails, yapf compare, in-memory encoding
- yapf_encode() / yapf_free_buffer(): encode to memory; yapf_save uses it - yapf.c also compiles as C++ - `yapf compare`: size and decode speed of the original format vs YAPF, with a lossless check - bindings with tested examples: C++ (header-only), C# (P/Invoke), Rust (crate, builds the C code), Go (cgo), Java (FFM API, Java 22+), Zig (@cImport), LuaJIT (FFI), TypeScript types for the JS port; Python now encodes in memory - docs/LANGUAGES.md and examples/ with measured results - KDE Dolphin thumbnail plugin (KF6, CMake) - README: honest status for Photoshop / VS Code / Figma (not run in the apps yet) and macOS (cross-compiled only), platform table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2ca726e3af
commit
d7f494a0c9
52 changed files with 1926 additions and 106 deletions
26
extensions/kde/CMakeLists.txt
Normal file
26
extensions/kde/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# YAPF thumbnails for KDE Dolphin (KF6 KIO thumbnail plugin).
|
||||
# cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||
# cmake --build build
|
||||
# sudo cmake --install build (or see README.md for a per-user install)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(yapfthumbnail LANGUAGES C CXX)
|
||||
|
||||
find_package(ECM 6.0 REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
|
||||
find_package(Qt6 6.5 REQUIRED COMPONENTS Core Gui)
|
||||
find_package(KF6 6.0 REQUIRED COMPONENTS KIO)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
kcoreaddons_add_plugin(yapfthumbnail
|
||||
SOURCES yapfthumbnail.cpp ../../yapf.c
|
||||
INSTALL_NAMESPACE "kf6/thumbcreator")
|
||||
set_source_files_properties(../../yapf.c PROPERTIES LANGUAGE C)
|
||||
target_include_directories(yapfthumbnail PRIVATE ../..)
|
||||
target_link_libraries(yapfthumbnail PRIVATE KF6::KIOGui Qt6::Gui Threads::Threads)
|
||||
|
||||
# Register the image/x-yapf file type so Dolphin recognises .yapf files.
|
||||
install(FILES ../linux/yapf-mime.xml DESTINATION ${KDE_INSTALL_MIMEDIR} RENAME yapf.xml)
|
||||
Loading…
Reference in a new issue