vools 0.2.4__tar.gz → 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.
- {vools-0.2.4/vools.egg-info → vools-0.3.0}/PKG-INFO +58 -3
- {vools-0.2.4 → vools-0.3.0}/README.md +56 -2
- {vools-0.2.4 → vools-0.3.0}/pyproject.toml +2 -1
- {vools-0.2.4 → vools-0.3.0}/vools/__init__.py +1 -1
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/__init__.py +31 -0
- vools-0.3.0/vools/bridge/auto_discovery.py +274 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/cangjie/loader.py +5 -5
- vools-0.3.0/vools/bridge/check_bridges.py +74 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/core/loader.py +9 -3
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/manager.py +108 -4
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/__init__.py +31 -1
- vools-0.3.0/vools/bridge/nim/base64_shim.py +93 -0
- vools-0.3.0/vools/bridge/nim/compress_shim.py +138 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/encoding.py +26 -7
- vools-0.3.0/vools/bridge/nim/hash_shim.py +55 -0
- vools-0.3.0/vools/bridge/nim/json_shim.py +142 -0
- vools-0.3.0/vools/bridge/nim/serialize_shim.py +151 -0
- vools-0.3.0/vools/bridge/nim/sigcache_shim.py +219 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/probe.py +622 -27
- vools-0.3.0/vools/bridge/rust/safe_eval_shim.py +369 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/__init__.py +7 -0
- vools-0.3.0/vools/decorators/bridge_decorator.py +276 -0
- {vools-0.2.4 → vools-0.3.0}/vools/encoding/__init__.py +53 -4
- vools-0.3.0/vools/lib/linux/libvools_bridge_safe_eval.so +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/security/__init__.py +14 -0
- vools-0.3.0/vools/security/hash.py +112 -0
- {vools-0.2.4 → vools-0.3.0}/vools/security/safe_eval.py +109 -1
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/backends/json_backend.py +77 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/codec.py +95 -2
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/context.py +1 -1
- {vools-0.2.4 → vools-0.3.0}/vools/sys/__init__.py +7 -2
- vools-0.3.0/vools/sys/env.py +197 -0
- {vools-0.2.4 → vools-0.3.0/vools.egg-info}/PKG-INFO +58 -3
- {vools-0.2.4 → vools-0.3.0}/vools.egg-info/SOURCES.txt +18 -13
- vools-0.2.4/vools/lib/libgcc_s_seh-1.dll +0 -0
- vools-0.2.4/vools/lib/libstdc++-6.dll +0 -0
- vools-0.2.4/vools/lib/libwinpthread-1.dll +0 -0
- vools-0.2.4/vools/lib/linux/libvools_crypto.so +0 -0
- vools-0.2.4/vools/lib/linux/libvools_curried.so +0 -0
- vools-0.2.4/vools/lib/linux/libvools_datetime.so +0 -0
- vools-0.2.4/vools/lib/linux/libvools_encoding.so +0 -0
- vools-0.2.4/vools/lib/linux/libvools_seq.so +0 -0
- {vools-0.2.4 → vools-0.3.0}/LICENSE +0 -0
- {vools-0.2.4 → vools-0.3.0}/NOTICE +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/config.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/environment.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/fabfile.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/logger.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/packaging.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/publishing.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/release.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/autopypi/versioning.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/setup.cfg +0 -0
- {vools-0.2.4 → vools-0.3.0}/tests/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/tests/_serialize_helpers.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/tests/conftest.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/tests/test_functions.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/README.md +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/__main__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_logging.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_nim_crypto.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_nim_curried.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_nim_datetime.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_nim_encoding.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_nim_loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/_nim_seq.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/api/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/api/curry_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/api/memoize_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/api/ops_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/api/seq_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/api/typer_app.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/_base.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/_examples.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/c/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/cangjie/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/cangjie/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/cangjie/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/cangjie/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/core/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/core/decorators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/core/serialization.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/core/sigcache.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/core/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/cpp/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/csharp/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/csharp/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/csharp/loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/csharp/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/csharp/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/dart/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/dart/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/dart/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/freebasic/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/freebasic/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/freebasic/loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/freebasic/transport.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/freebasic/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/go/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/go/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/java/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/java/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/java/decorator.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/java/loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/java/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/julia/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/julia/_loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/julia/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/julia/decorator.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/julia/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/julia/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/kotlin/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/kotlin/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/kotlin/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/lua/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/lua/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/lua/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/mojo/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/mojo/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/mojo/loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/mojo/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/mojo/transport.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/mojo/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/moonbit/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/moonbit/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/moonbit/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/_loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/crypto.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/curried.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/datetime.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/nim/seq.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/perl/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/perl/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/perl/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/php/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/php/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/php/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/powershell/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/powershell/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/powershell/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/r/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/r/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/r/loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/r/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/r/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/ruby/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/ruby/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/rust/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/rust/_loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/rust/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/rust/decorator.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/rust/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/rust/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/scala/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/scala/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/scala/decorator.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/scala/loader.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/scala/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/scala/utils.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/shell/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/shell/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/shell/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/swift/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/swift/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/swift/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/typescript/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/typescript/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbnet/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbnet/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbnet/templates.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbnet/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbscript/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbscript/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/vbscript/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/zig/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/zig/compiler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/bridge/zig/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/cache/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/cache/memorize.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/cache/once.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/cache/persist.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/cache/sigcache.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/config.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/config.template.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/asyncio_compat.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/base.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/config.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/contextvars_compat.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/dataclass_compat.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/datetime_compat.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/exceptions.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/core/inspect_compat.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/crypto/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/crypto/core.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/collection.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/composition.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/core.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/iteration.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/math.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/predicate.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/curried/string.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/data/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/data/itor.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/data/seq.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/data/vlist.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/data/vtext.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/datetime/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/datetime/dates_format.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/datetime/utils.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/datetime/vdate_class.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/cache.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/control.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/curried.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/curry_core.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/curry_decorator.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/curry_delay.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/lazy.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/overcurry.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/overload.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/overloads.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/rself.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/selector.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/shotcut.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/decorators/trd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/encoding/core.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/arrow_func.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/box.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/funcs.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/iif.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/pipe_ops.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/placeholder.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/placeholder_impl.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/functional/result.py +0 -0
- {vools-0.2.4/vools/lib → vools-0.3.0/vools/lib/windows}/vools_crypto.dll +0 -0
- {vools-0.2.4/vools/lib → vools-0.3.0/vools/lib/windows}/vools_curried.dll +0 -0
- {vools-0.2.4/vools/lib → vools-0.3.0/vools/lib/windows}/vools_datetime.dll +0 -0
- {vools-0.2.4/vools/lib → vools-0.3.0/vools/lib/windows}/vools_encoding.dll +0 -0
- {vools-0.2.4/vools/lib → vools-0.3.0/vools/lib/windows}/vools_seq.dll +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/calltype.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/extend.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/fusion.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/method_extend.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/mixer.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/oop/selector.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/core/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/core/connectable.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/core/object_pool.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/core/observable.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/core/schedulers.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/core/subject.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/_monitoring.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/clipboard.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/file_watcher.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/folder_watcher.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/keyboard.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/monitor_observer.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/monitor_subject.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/monitoring/mouse.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/operators/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/operators/extended_operators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/operators/monitor_operators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/operators/operators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/reactive/operators/stats_operators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/security/_constants.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/security/expression_handler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/backends/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/backends/base.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/backends/msgpack_backend.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/backends/pickle_backend.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/callable/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/callable/decorator_handler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/callable/functional_handler.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/config.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/core.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/decorators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/sentinel.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/serialize/type_registry.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/builder.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/config.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/connection.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/decorators.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/dialect.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/result.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/core/types.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/manager.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/postgres/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/postgres/connection.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/postgres/dialect.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/spark/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/spark/connection.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/spark/dialect.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/spark/scala_bridge.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/sqlite/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/sqlite/connection.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sql/sqlite/dialect.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/compile_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/dll.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/dll_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/env_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/exe.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/fire_app.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/sys/run_cmd.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/core/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/core/models.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/core/queue.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/core/storage.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/core/worker.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/decorators/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/decorators/task_decorator.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/rules/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/rules/dag.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/rules/engine.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/rules/rule.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/task/utils/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/utils/__init__.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/utils/hoder.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/utils/stuff.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools/utils/tools.py +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools.egg-info/dependency_links.txt +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools.egg-info/entry_points.txt +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools.egg-info/requires.txt +0 -0
- {vools-0.2.4 → vools-0.3.0}/vools.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python 函数式编程工具集
|
|
5
5
|
Author-email: Victor <victortop921129@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -216,6 +216,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
216
216
|
Classifier: Programming Language :: Python :: 3.10
|
|
217
217
|
Classifier: Programming Language :: Python :: 3.11
|
|
218
218
|
Classifier: Programming Language :: Python :: 3.12
|
|
219
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
219
220
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
220
221
|
Classifier: Operating System :: OS Independent
|
|
221
222
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -265,6 +266,7 @@ Dynamic: license-file
|
|
|
265
266
|
- **序列化**: 支持 JSON、MsgPack、Pickle 等多种格式
|
|
266
267
|
- **编码/加密**: Base64、URL 编码、哈希函数
|
|
267
268
|
- **多语言桥接**: 支持 27 种编程语言(Lua、Rust、Go、Java、Kotlin、Swift、Dart、MoonBit 等),统一装饰器接口
|
|
269
|
+
- **编译器自动发现**: 自动探测本机和 WSL 环境中的编译器,支持注册表搜索、常见安装路径、通配符路径展开
|
|
268
270
|
|
|
269
271
|
## 安装
|
|
270
272
|
|
|
@@ -384,13 +386,39 @@ obs.pipe(
|
|
|
384
386
|
print(result) # [4, 8]
|
|
385
387
|
```
|
|
386
388
|
|
|
389
|
+
### 编译器自动发现
|
|
390
|
+
|
|
391
|
+
自动探测本机和 WSL 环境中所有已安装的编译器,无需手动配置 PATH。
|
|
392
|
+
|
|
393
|
+
```python
|
|
394
|
+
from vools.bridge import discover_all, get_discovery_report, configure_from_discovery
|
|
395
|
+
|
|
396
|
+
# 一键发现所有编译器(本机 + WSL)
|
|
397
|
+
result = discover_all(include_wsl=True)
|
|
398
|
+
|
|
399
|
+
# 查看格式化报告
|
|
400
|
+
print(get_discovery_report())
|
|
401
|
+
|
|
402
|
+
# 自动配置管理器
|
|
403
|
+
configure_from_discovery(include_wsl=True)
|
|
404
|
+
|
|
405
|
+
# 检查特定语言是否可用
|
|
406
|
+
from vools.bridge import get_helper
|
|
407
|
+
nim_helper = get_helper('nim')
|
|
408
|
+
if nim_helper.is_available():
|
|
409
|
+
print(f"Nim 编译器路径: {nim_helper.get_compiler_path()}")
|
|
410
|
+
```
|
|
411
|
+
|
|
387
412
|
## 项目结构
|
|
388
413
|
|
|
389
414
|
```
|
|
390
415
|
vools/
|
|
391
416
|
├── api/ # CLI 命令行接口
|
|
392
|
-
├── bridge/ # 多语言桥接(27
|
|
417
|
+
├── bridge/ # 多语言桥接(27种语言)+ 编译器自动发现
|
|
393
418
|
│ ├── core/ # 桥接核心(类型、签名缓存、装饰器)
|
|
419
|
+
│ ├── probe.py # 编译器探测模块
|
|
420
|
+
│ ├── manager.py # 配置管理模块
|
|
421
|
+
│ ├── auto_discovery.py # 一键发现入口
|
|
394
422
|
│ ├── lua/ # Lua 桥接
|
|
395
423
|
│ ├── rust/ # Rust 桥接
|
|
396
424
|
│ ├── go/ # Go 桥接
|
|
@@ -493,10 +521,37 @@ vools/
|
|
|
493
521
|
- [函数式编程](docs/functional.md)
|
|
494
522
|
- [响应式编程](docs/reactive.md)
|
|
495
523
|
- [装饰器](docs/decorators.md)
|
|
524
|
+
- [性能跃迁计划](docs/performance-leap.md)
|
|
525
|
+
- [基准测试](docs/benchmark.md)
|
|
526
|
+
|
|
527
|
+
## 性能对比
|
|
528
|
+
|
|
529
|
+
vools 通过桥接 Nim/Rust/Go 等编译型语言,为高频核心函数提供可选的高性能实现。以下是典型硬件上的基准测试结果(实际数据因硬件而异):
|
|
530
|
+
|
|
531
|
+
| 模块 | 函数 | 纯 Python | 桥接加速 | 提升倍数 |
|
|
532
|
+
|------|------|----------|----------|---------|
|
|
533
|
+
| serialize.codec | pickle_encode | ~120 us | ~18 us | 6-8x |
|
|
534
|
+
| serialize.codec | pickle_decode | ~100 us | ~15 us | 6-7x |
|
|
535
|
+
| security.hash | sha256_hex | ~15 us | ~3 us | 5x |
|
|
536
|
+
| security.hash | md5_hex | ~12 us | ~2 us | 6x |
|
|
537
|
+
| security.hash | sha1_hex | ~10 us | ~2 us | 5x |
|
|
538
|
+
| security.hash | sha512_hex | ~18 us | ~4 us | 4.5x |
|
|
539
|
+
| data.seq | base64_encode | ~8 us | ~2 us | 4x |
|
|
540
|
+
| data.seq | base64_decode | ~7 us | ~2 us | 3.5x |
|
|
541
|
+
| serialize | json_encode | ~50 us | ~15 us | 3x |
|
|
542
|
+
| serialize | json_decode | ~45 us | ~12 us | 4x |
|
|
543
|
+
| data.seq | zlib_compress | ~500 us | ~100 us | 5x |
|
|
544
|
+
| data.seq | zlib_decompress | ~200 us | ~50 us | 4x |
|
|
545
|
+
| cache.sigcache | hash_signature | ~50 us | ~8 us | 6x |
|
|
546
|
+
|
|
547
|
+
**注意**:
|
|
548
|
+
- 桥接库为可选增强,未安装时自动使用纯 Python 实现
|
|
549
|
+
- 测试数据为 1KB 左右的小数据,大数据量提升更显著
|
|
550
|
+
- 详细基准测试方法请参见 [基准测试文档](docs/benchmark.md)
|
|
496
551
|
|
|
497
552
|
## 更新日志
|
|
498
553
|
|
|
499
|
-
详细的版本更新记录请查看 [
|
|
554
|
+
详细的版本更新记录请查看 [CHANGELOG.md](CHANGELOG.md)。
|
|
500
555
|
|
|
501
556
|
## 贡献
|
|
502
557
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
- **序列化**: 支持 JSON、MsgPack、Pickle 等多种格式
|
|
17
17
|
- **编码/加密**: Base64、URL 编码、哈希函数
|
|
18
18
|
- **多语言桥接**: 支持 27 种编程语言(Lua、Rust、Go、Java、Kotlin、Swift、Dart、MoonBit 等),统一装饰器接口
|
|
19
|
+
- **编译器自动发现**: 自动探测本机和 WSL 环境中的编译器,支持注册表搜索、常见安装路径、通配符路径展开
|
|
19
20
|
|
|
20
21
|
## 安装
|
|
21
22
|
|
|
@@ -135,13 +136,39 @@ obs.pipe(
|
|
|
135
136
|
print(result) # [4, 8]
|
|
136
137
|
```
|
|
137
138
|
|
|
139
|
+
### 编译器自动发现
|
|
140
|
+
|
|
141
|
+
自动探测本机和 WSL 环境中所有已安装的编译器,无需手动配置 PATH。
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from vools.bridge import discover_all, get_discovery_report, configure_from_discovery
|
|
145
|
+
|
|
146
|
+
# 一键发现所有编译器(本机 + WSL)
|
|
147
|
+
result = discover_all(include_wsl=True)
|
|
148
|
+
|
|
149
|
+
# 查看格式化报告
|
|
150
|
+
print(get_discovery_report())
|
|
151
|
+
|
|
152
|
+
# 自动配置管理器
|
|
153
|
+
configure_from_discovery(include_wsl=True)
|
|
154
|
+
|
|
155
|
+
# 检查特定语言是否可用
|
|
156
|
+
from vools.bridge import get_helper
|
|
157
|
+
nim_helper = get_helper('nim')
|
|
158
|
+
if nim_helper.is_available():
|
|
159
|
+
print(f"Nim 编译器路径: {nim_helper.get_compiler_path()}")
|
|
160
|
+
```
|
|
161
|
+
|
|
138
162
|
## 项目结构
|
|
139
163
|
|
|
140
164
|
```
|
|
141
165
|
vools/
|
|
142
166
|
├── api/ # CLI 命令行接口
|
|
143
|
-
├── bridge/ # 多语言桥接(27
|
|
167
|
+
├── bridge/ # 多语言桥接(27种语言)+ 编译器自动发现
|
|
144
168
|
│ ├── core/ # 桥接核心(类型、签名缓存、装饰器)
|
|
169
|
+
│ ├── probe.py # 编译器探测模块
|
|
170
|
+
│ ├── manager.py # 配置管理模块
|
|
171
|
+
│ ├── auto_discovery.py # 一键发现入口
|
|
145
172
|
│ ├── lua/ # Lua 桥接
|
|
146
173
|
│ ├── rust/ # Rust 桥接
|
|
147
174
|
│ ├── go/ # Go 桥接
|
|
@@ -244,10 +271,37 @@ vools/
|
|
|
244
271
|
- [函数式编程](docs/functional.md)
|
|
245
272
|
- [响应式编程](docs/reactive.md)
|
|
246
273
|
- [装饰器](docs/decorators.md)
|
|
274
|
+
- [性能跃迁计划](docs/performance-leap.md)
|
|
275
|
+
- [基准测试](docs/benchmark.md)
|
|
276
|
+
|
|
277
|
+
## 性能对比
|
|
278
|
+
|
|
279
|
+
vools 通过桥接 Nim/Rust/Go 等编译型语言,为高频核心函数提供可选的高性能实现。以下是典型硬件上的基准测试结果(实际数据因硬件而异):
|
|
280
|
+
|
|
281
|
+
| 模块 | 函数 | 纯 Python | 桥接加速 | 提升倍数 |
|
|
282
|
+
|------|------|----------|----------|---------|
|
|
283
|
+
| serialize.codec | pickle_encode | ~120 us | ~18 us | 6-8x |
|
|
284
|
+
| serialize.codec | pickle_decode | ~100 us | ~15 us | 6-7x |
|
|
285
|
+
| security.hash | sha256_hex | ~15 us | ~3 us | 5x |
|
|
286
|
+
| security.hash | md5_hex | ~12 us | ~2 us | 6x |
|
|
287
|
+
| security.hash | sha1_hex | ~10 us | ~2 us | 5x |
|
|
288
|
+
| security.hash | sha512_hex | ~18 us | ~4 us | 4.5x |
|
|
289
|
+
| data.seq | base64_encode | ~8 us | ~2 us | 4x |
|
|
290
|
+
| data.seq | base64_decode | ~7 us | ~2 us | 3.5x |
|
|
291
|
+
| serialize | json_encode | ~50 us | ~15 us | 3x |
|
|
292
|
+
| serialize | json_decode | ~45 us | ~12 us | 4x |
|
|
293
|
+
| data.seq | zlib_compress | ~500 us | ~100 us | 5x |
|
|
294
|
+
| data.seq | zlib_decompress | ~200 us | ~50 us | 4x |
|
|
295
|
+
| cache.sigcache | hash_signature | ~50 us | ~8 us | 6x |
|
|
296
|
+
|
|
297
|
+
**注意**:
|
|
298
|
+
- 桥接库为可选增强,未安装时自动使用纯 Python 实现
|
|
299
|
+
- 测试数据为 1KB 左右的小数据,大数据量提升更显著
|
|
300
|
+
- 详细基准测试方法请参见 [基准测试文档](docs/benchmark.md)
|
|
247
301
|
|
|
248
302
|
## 更新日志
|
|
249
303
|
|
|
250
|
-
详细的版本更新记录请查看 [
|
|
304
|
+
详细的版本更新记录请查看 [CHANGELOG.md](CHANGELOG.md)。
|
|
251
305
|
|
|
252
306
|
## 贡献
|
|
253
307
|
|
|
@@ -20,6 +20,7 @@ classifiers = [
|
|
|
20
20
|
"Programming Language :: Python :: 3.10",
|
|
21
21
|
"Programming Language :: Python :: 3.11",
|
|
22
22
|
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
23
24
|
"License :: OSI Approved :: Apache Software License",
|
|
24
25
|
"Operating System :: OS Independent",
|
|
25
26
|
"Operating System :: Microsoft :: Windows",
|
|
@@ -85,7 +86,7 @@ exclude = ["vools.__pycache__", "vools.*.__pycache__"]
|
|
|
85
86
|
version = { attr = "vools.__version__" }
|
|
86
87
|
|
|
87
88
|
[tool.setuptools.package-data]
|
|
88
|
-
"vools" = ["config.template.py", "*.md", "lib/*.dll", "lib/linux/*.so"]
|
|
89
|
+
"vools" = ["config.template.py", "*.md", "lib/*.dll", "lib/*.so", "lib/windows/*.dll", "lib/linux/*.so", "lib/**/*.so"]
|
|
89
90
|
|
|
90
91
|
# ============ pytest ============
|
|
91
92
|
[tool.pytest.ini_options]
|
|
@@ -16,9 +16,18 @@ LangBridge 统一接口:
|
|
|
16
16
|
2. only_code 仅代码模式 - 只生成代码不编译,支持多种写入模式
|
|
17
17
|
3. project 项目模式 - 编译整个项目目录,支持可执行文件或共享库
|
|
18
18
|
|
|
19
|
+
编译器自动发现:
|
|
20
|
+
自动探测本机和 WSL 环境中已安装的编译器,无需手动配置 PATH。
|
|
21
|
+
- discover_all() / discover_local() / discover_wsl() - 发现编译器
|
|
22
|
+
- get_discovery_report() - 生成发现报告
|
|
23
|
+
- configure_from_discovery() - 自动配置 BridgeManager
|
|
24
|
+
- auto_discover() - 一键发现并配置
|
|
25
|
+
|
|
19
26
|
子模块:
|
|
20
27
|
- core: 核心基础设施(加载器、装饰器、类型映射、序列化)
|
|
21
28
|
- manager: 语言编译器和运行时环境统一管理器
|
|
29
|
+
- probe: 编译器自动探测模块
|
|
30
|
+
- auto_discovery: 一键自动发现与配置
|
|
22
31
|
- _base: LangBridge 抽象基类 + FunctionParser / DepResolver 工具类
|
|
23
32
|
- c / cpp / nim / go / cangjie / rust / mojo / csharp / java / scala / ruby / julia / r / freebasic / typescript / vbnet / perl / lua / zig / kotlin / swift / php / dart / powershell / vbscript / shell: 各语言桥接实现
|
|
24
33
|
"""
|
|
@@ -34,13 +43,27 @@ from .manager import (
|
|
|
34
43
|
LanguageConfig,
|
|
35
44
|
LanguageStatus,
|
|
36
45
|
BridgeManager,
|
|
46
|
+
LanguageCompilerHelper,
|
|
37
47
|
register_language,
|
|
38
48
|
get_status,
|
|
39
49
|
get_compiler_path,
|
|
50
|
+
get_compiler,
|
|
51
|
+
get_compiler_executable,
|
|
52
|
+
get_helper,
|
|
40
53
|
get_version,
|
|
41
54
|
setup_runtime,
|
|
42
55
|
list_languages,
|
|
43
56
|
list_available,
|
|
57
|
+
auto_discover,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# auto_discovery 模块 - 一键自动发现
|
|
61
|
+
from .auto_discovery import (
|
|
62
|
+
discover_all,
|
|
63
|
+
discover_local,
|
|
64
|
+
discover_wsl,
|
|
65
|
+
get_discovery_report,
|
|
66
|
+
configure_from_discovery,
|
|
44
67
|
)
|
|
45
68
|
|
|
46
69
|
# 便捷函数:检查语言是否可用
|
|
@@ -77,6 +100,14 @@ __all__ = [
|
|
|
77
100
|
'setup_runtime',
|
|
78
101
|
'list_languages',
|
|
79
102
|
'list_available',
|
|
103
|
+
'auto_discover',
|
|
104
|
+
|
|
105
|
+
# auto_discovery 模块
|
|
106
|
+
'discover_all',
|
|
107
|
+
'discover_local',
|
|
108
|
+
'discover_wsl',
|
|
109
|
+
'get_discovery_report',
|
|
110
|
+
'configure_from_discovery',
|
|
80
111
|
'set_compiler_path',
|
|
81
112
|
'add_compiler_path',
|
|
82
113
|
'set_runtime_path',
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"""
|
|
2
|
+
vools.bridge.auto_discovery - 编译器自动发现与配置
|
|
3
|
+
|
|
4
|
+
一键发现本机和 WSL 环境中所有已安装的编程语言编译器,
|
|
5
|
+
并自动配置到 BridgeManager 中。
|
|
6
|
+
|
|
7
|
+
主要功能:
|
|
8
|
+
1. discover_all() - 一键发现所有环境的编译器
|
|
9
|
+
2. discover_local() - 仅发现本机编译器
|
|
10
|
+
3. discover_wsl() - 仅发现 WSL 编译器
|
|
11
|
+
4. get_discovery_report() - 生成完整的发现报告
|
|
12
|
+
5. configure_from_discovery() - 从发现结果配置 manager
|
|
13
|
+
|
|
14
|
+
用法:
|
|
15
|
+
from vools.bridge.auto_discovery import discover_all
|
|
16
|
+
|
|
17
|
+
# 一键发现所有
|
|
18
|
+
result = discover_all()
|
|
19
|
+
|
|
20
|
+
# 查看报告
|
|
21
|
+
print(result['report'])
|
|
22
|
+
|
|
23
|
+
# 查看可用语言
|
|
24
|
+
print('本机可用:', result['local'].available_languages())
|
|
25
|
+
print('WSL 可用:', result['wsl'][0].available_languages() if result['wsl'] else [])
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
import os
|
|
29
|
+
import sys
|
|
30
|
+
import platform
|
|
31
|
+
from typing import Dict, List, Optional, Any
|
|
32
|
+
|
|
33
|
+
from . import probe
|
|
34
|
+
from . import manager as _manager_instance
|
|
35
|
+
from .manager import LanguageConfig
|
|
36
|
+
|
|
37
|
+
_IS_WINDOWS = platform.system() == 'Windows'
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# ============================================================================
|
|
41
|
+
# 公共 API
|
|
42
|
+
# ============================================================================
|
|
43
|
+
|
|
44
|
+
def discover_all(
|
|
45
|
+
languages: Optional[List[str]] = None,
|
|
46
|
+
configure_manager: bool = True,
|
|
47
|
+
include_wsl: bool = True,
|
|
48
|
+
) -> Dict[str, Any]:
|
|
49
|
+
"""
|
|
50
|
+
一键发现所有环境中的编译器
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
languages: 指定要探测的语言列表,None 表示全部
|
|
54
|
+
configure_manager: 是否自动配置到 BridgeManager
|
|
55
|
+
include_wsl: 是否包含 WSL 环境
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
dict: {
|
|
59
|
+
'local': ProbeReport, # 本机探测报告
|
|
60
|
+
'wsl': List[ProbeReport], # WSL 各发行版探测报告
|
|
61
|
+
'discovered': dict, # 已发现的语言
|
|
62
|
+
'report': str, # 格式化报告文本
|
|
63
|
+
}
|
|
64
|
+
"""
|
|
65
|
+
result = {
|
|
66
|
+
'local': None,
|
|
67
|
+
'wsl': [],
|
|
68
|
+
'discovered': {},
|
|
69
|
+
'report': '',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
# 1. 本机探测
|
|
73
|
+
local_report = probe.probe_with_extra_paths(languages=languages)
|
|
74
|
+
result['local'] = local_report
|
|
75
|
+
result['discovered']['local'] = local_report.available_languages()
|
|
76
|
+
|
|
77
|
+
# 2. WSL 探测
|
|
78
|
+
if _IS_WINDOWS and include_wsl:
|
|
79
|
+
try:
|
|
80
|
+
wsl_reports = probe.probe_all_wsl(languages=languages)
|
|
81
|
+
result['wsl'] = wsl_reports
|
|
82
|
+
for r in wsl_reports:
|
|
83
|
+
result['discovered'][r.host] = r.available_languages()
|
|
84
|
+
except Exception as e:
|
|
85
|
+
result['wsl_error'] = str(e)
|
|
86
|
+
|
|
87
|
+
# 3. 配置到 manager
|
|
88
|
+
if configure_manager:
|
|
89
|
+
_configure_from_report(local_report)
|
|
90
|
+
|
|
91
|
+
# 4. 生成报告
|
|
92
|
+
result['report'] = _generate_full_report(result)
|
|
93
|
+
|
|
94
|
+
return result
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def discover_local(
|
|
98
|
+
languages: Optional[List[str]] = None,
|
|
99
|
+
configure_manager: bool = True,
|
|
100
|
+
) -> Dict[str, Any]:
|
|
101
|
+
"""
|
|
102
|
+
仅发现本机编译器
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
languages: 指定要探测的语言列表
|
|
106
|
+
configure_manager: 是否自动配置到 BridgeManager
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
dict: 发现结果
|
|
110
|
+
"""
|
|
111
|
+
return discover_all(languages=languages, configure_manager=configure_manager, include_wsl=False)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def discover_wsl(
|
|
115
|
+
languages: Optional[List[str]] = None,
|
|
116
|
+
) -> List[probe.ProbeReport]:
|
|
117
|
+
"""
|
|
118
|
+
仅发现 WSL 环境中的编译器
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
languages: 指定要探测的语言列表
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
List[ProbeReport]: 各 WSL 发行版的探测报告
|
|
125
|
+
"""
|
|
126
|
+
if not _IS_WINDOWS:
|
|
127
|
+
return []
|
|
128
|
+
return probe.probe_all_wsl(languages=languages)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def get_discovery_report(
|
|
132
|
+
languages: Optional[List[str]] = None,
|
|
133
|
+
include_wsl: bool = True,
|
|
134
|
+
) -> str:
|
|
135
|
+
"""
|
|
136
|
+
生成完整的发现报告文本
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
languages: 指定要探测的语言列表
|
|
140
|
+
include_wsl: 是否包含 WSL
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
str: 格式化的报告文本
|
|
144
|
+
"""
|
|
145
|
+
result = discover_all(languages=languages, configure_manager=False, include_wsl=include_wsl)
|
|
146
|
+
return result['report']
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def configure_from_discovery(
|
|
150
|
+
report: Optional[probe.ProbeReport] = None,
|
|
151
|
+
include_wsl: bool = True,
|
|
152
|
+
) -> int:
|
|
153
|
+
"""
|
|
154
|
+
从探测结果配置 BridgeManager
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
report: ProbeReport 实例,如果为 None 则自动探测
|
|
158
|
+
include_wsl: 是否包含 WSL 环境(仅当 report 为 None 时有效)
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
int: 成功配置的语言数量
|
|
162
|
+
"""
|
|
163
|
+
if report is None:
|
|
164
|
+
result = discover_all(configure_manager=False, include_wsl=include_wsl)
|
|
165
|
+
count = 0
|
|
166
|
+
if result.get('local'):
|
|
167
|
+
count += _configure_from_report(result['local'])
|
|
168
|
+
for wsl_report in result.get('wsl', []):
|
|
169
|
+
count += _configure_from_report(wsl_report)
|
|
170
|
+
return count
|
|
171
|
+
return _configure_from_report(report)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
# ============================================================================
|
|
175
|
+
# 内部函数
|
|
176
|
+
# ============================================================================
|
|
177
|
+
|
|
178
|
+
def _configure_from_report(report: probe.ProbeReport) -> int:
|
|
179
|
+
"""从探测报告配置 manager"""
|
|
180
|
+
count = 0
|
|
181
|
+
for lang, status in report.languages.items():
|
|
182
|
+
if status.available and status.path:
|
|
183
|
+
lang_lower = lang.lower()
|
|
184
|
+
bin_dir = os.path.dirname(status.path)
|
|
185
|
+
|
|
186
|
+
config = _manager_instance.get_config(lang_lower)
|
|
187
|
+
if config:
|
|
188
|
+
# 更新已有配置
|
|
189
|
+
if bin_dir and bin_dir not in config.compiler_paths:
|
|
190
|
+
config.compiler_paths.insert(0, bin_dir)
|
|
191
|
+
_manager_instance.clear_cache(lang_lower)
|
|
192
|
+
else:
|
|
193
|
+
# 注册新语言
|
|
194
|
+
probe_config = probe.LANGUAGE_PROBES.get(lang, {})
|
|
195
|
+
_manager_instance.register(LanguageConfig(
|
|
196
|
+
name=lang_lower,
|
|
197
|
+
compiler=status.command or lang_lower,
|
|
198
|
+
compiler_paths=[bin_dir] if bin_dir else [],
|
|
199
|
+
version_pattern=probe_config.get('version_pattern'),
|
|
200
|
+
))
|
|
201
|
+
count += 1
|
|
202
|
+
return count
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def _generate_full_report(result: Dict[str, Any]) -> str:
|
|
206
|
+
"""生成完整报告文本"""
|
|
207
|
+
lines = []
|
|
208
|
+
|
|
209
|
+
lines.append('=' * 70)
|
|
210
|
+
lines.append(' vools.bridge 编译器自动发现报告')
|
|
211
|
+
lines.append('=' * 70)
|
|
212
|
+
|
|
213
|
+
# 本机报告
|
|
214
|
+
if result.get('local'):
|
|
215
|
+
local = result['local']
|
|
216
|
+
lines.append('')
|
|
217
|
+
lines.append('【本机环境】')
|
|
218
|
+
lines.append(f' 平台: {local.platform}')
|
|
219
|
+
lines.append(f' 架构: {local.arch}')
|
|
220
|
+
lines.append(f' Python: {local.python_version}')
|
|
221
|
+
lines.append('')
|
|
222
|
+
_append_language_summary(lines, local)
|
|
223
|
+
|
|
224
|
+
# WSL 报告
|
|
225
|
+
if result.get('wsl'):
|
|
226
|
+
for wsl_report in result['wsl']:
|
|
227
|
+
lines.append('')
|
|
228
|
+
lines.append(f'【WSL: {wsl_report.host}】')
|
|
229
|
+
lines.append(f' 平台: {wsl_report.platform}')
|
|
230
|
+
lines.append(f' 架构: {wsl_report.arch}')
|
|
231
|
+
lines.append('')
|
|
232
|
+
_append_language_summary(lines, wsl_report)
|
|
233
|
+
|
|
234
|
+
# 统计汇总
|
|
235
|
+
lines.append('')
|
|
236
|
+
lines.append('=' * 70)
|
|
237
|
+
total_available = len(result['discovered'].get('local', []))
|
|
238
|
+
total_langs = len(probe.LANGUAGE_PROBES)
|
|
239
|
+
lines.append(f' 总计: {total_available}/{total_langs} 种语言可用')
|
|
240
|
+
lines.append('=' * 70)
|
|
241
|
+
|
|
242
|
+
return '\n'.join(lines)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _append_language_summary(lines: List[str], report: probe.ProbeReport):
|
|
246
|
+
"""追加语言摘要到报告"""
|
|
247
|
+
by_category: Dict[str, List[probe.LanguageStatus]] = {}
|
|
248
|
+
for st in report.languages.values():
|
|
249
|
+
by_category.setdefault(st.category or '其他', []).append(st)
|
|
250
|
+
|
|
251
|
+
available_count = 0
|
|
252
|
+
for category, sts in by_category.items():
|
|
253
|
+
lines.append(f' 【{category}】')
|
|
254
|
+
for st in sorted(sts, key=lambda x: x.name):
|
|
255
|
+
if st.available:
|
|
256
|
+
available_count += 1
|
|
257
|
+
version_info = f' v{st.version}' if st.version else ''
|
|
258
|
+
lines.append(f' [OK] {st.name:12s}{version_info}')
|
|
259
|
+
else:
|
|
260
|
+
lines.append(f' [NO] {st.name:12s} 未安装')
|
|
261
|
+
lines.append('')
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
# ============================================================================
|
|
265
|
+
# 模块导出
|
|
266
|
+
# ============================================================================
|
|
267
|
+
|
|
268
|
+
__all__ = [
|
|
269
|
+
'discover_all',
|
|
270
|
+
'discover_local',
|
|
271
|
+
'discover_wsl',
|
|
272
|
+
'get_discovery_report',
|
|
273
|
+
'configure_from_discovery',
|
|
274
|
+
]
|
|
@@ -19,14 +19,14 @@ _IS_LINUX = platform.system() == 'Linux'
|
|
|
19
19
|
# 仓颉运行时路径
|
|
20
20
|
_CJ_RUNTIME_PATHS = []
|
|
21
21
|
if _IS_WINDOWS:
|
|
22
|
-
# 尝试查找仓颉 SDK 路径
|
|
23
22
|
cj_sdk_paths = [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
os.environ.get('CANGJIE_SDK_PATH'),
|
|
24
|
+
os.path.join(os.path.dirname(__file__), 'runtime', 'lib', 'windows_x86_64_llvm'),
|
|
25
|
+
os.path.join(os.path.dirname(__file__), 'runtime', 'lib'),
|
|
26
|
+
os.path.join(os.path.dirname(__file__), 'runtime', 'bin'),
|
|
27
27
|
]
|
|
28
28
|
for p in cj_sdk_paths:
|
|
29
|
-
if os.path.exists(p):
|
|
29
|
+
if p and os.path.exists(p):
|
|
30
30
|
_CJ_RUNTIME_PATHS.append(p)
|
|
31
31
|
|
|
32
32
|
# 设置 DLL 搜索路径
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
vools.bridge.check_bridges - 桥接库安装验证脚本
|
|
3
|
+
|
|
4
|
+
检查所有桥接库是否正确安装并可用。
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .core.loader import get_loader, is_available
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def check_bridges():
|
|
11
|
+
"""
|
|
12
|
+
检查所有桥接库是否正确安装
|
|
13
|
+
|
|
14
|
+
返回:
|
|
15
|
+
list: [(lang, name, available), ...] 格式的结果列表
|
|
16
|
+
"""
|
|
17
|
+
bridges = [
|
|
18
|
+
("nim", "serialize"),
|
|
19
|
+
("nim", "hash"),
|
|
20
|
+
("nim", "base64"),
|
|
21
|
+
("nim", "json"),
|
|
22
|
+
("nim", "sigcache"),
|
|
23
|
+
("nim", "compress"),
|
|
24
|
+
("rust", "safe_eval"),
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
results = []
|
|
28
|
+
for lang, name in bridges:
|
|
29
|
+
available = is_available(lang)
|
|
30
|
+
results.append((lang, name, available))
|
|
31
|
+
|
|
32
|
+
return results
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def check_nim_bridges():
|
|
36
|
+
"""
|
|
37
|
+
检查所有 Nim 桥接库
|
|
38
|
+
|
|
39
|
+
返回:
|
|
40
|
+
dict: {模块名: 是否可用}
|
|
41
|
+
"""
|
|
42
|
+
nim_modules = [
|
|
43
|
+
"serialize",
|
|
44
|
+
"hash",
|
|
45
|
+
"base64",
|
|
46
|
+
"json",
|
|
47
|
+
"sigcache",
|
|
48
|
+
"compress",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
results = {}
|
|
52
|
+
loader = get_loader("nim")
|
|
53
|
+
for module in nim_modules:
|
|
54
|
+
lib_name = f"vools_bridge_{module}"
|
|
55
|
+
available = loader.load(lib_name) is not None
|
|
56
|
+
results[module] = available
|
|
57
|
+
|
|
58
|
+
return results
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if __name__ == "__main__":
|
|
62
|
+
print("=== Bridge Status Report ===\n")
|
|
63
|
+
|
|
64
|
+
print("General bridges:")
|
|
65
|
+
for lang, name, available in check_bridges():
|
|
66
|
+
status = "✓" if available else "✗"
|
|
67
|
+
print(f" [{status}] {lang}/{name}")
|
|
68
|
+
|
|
69
|
+
print("\nNim modules:")
|
|
70
|
+
for module, available in check_nim_bridges().items():
|
|
71
|
+
status = "✓" if available else "✗"
|
|
72
|
+
print(f" [{status}] nim/{module}")
|
|
73
|
+
|
|
74
|
+
print("\n=== Report Complete ===")
|
|
@@ -30,9 +30,13 @@ _IS_LINUX = _PLATFORM == 'Linux'
|
|
|
30
30
|
_LOADED_LIBS = {}
|
|
31
31
|
_LOAD_LOCK = threading.Lock()
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
if
|
|
35
|
-
_LIB_DIR = os.path.join(
|
|
33
|
+
_lib_base = os.path.join(os.path.dirname(__file__), '..', '..', 'lib')
|
|
34
|
+
if _IS_WINDOWS:
|
|
35
|
+
_LIB_DIR = os.path.join(_lib_base, 'windows')
|
|
36
|
+
elif _IS_LINUX:
|
|
37
|
+
_LIB_DIR = os.path.join(_lib_base, 'linux')
|
|
38
|
+
else:
|
|
39
|
+
_LIB_DIR = _lib_base
|
|
36
40
|
_LIB_DIR = os.path.abspath(_LIB_DIR)
|
|
37
41
|
|
|
38
42
|
# 初始化时设置所有语言的运行时环境
|
|
@@ -177,6 +181,8 @@ class LibraryLoader:
|
|
|
177
181
|
|
|
178
182
|
def _find_lib(self, name):
|
|
179
183
|
"""查找共享库路径"""
|
|
184
|
+
if name is None:
|
|
185
|
+
return None
|
|
180
186
|
if _IS_WINDOWS:
|
|
181
187
|
for ext in ('.dll', '.so', '.pyd'):
|
|
182
188
|
path = os.path.join(_LIB_DIR, name + ext)
|