Docs.rs
knife-util-0.2.0
knife-util 0.2.0
Docs.rs crate page
Apache-2.0
Links
Repository
crates.io
Source
Owners
ocaso1987
Dependencies
anyhow ^1.0.100
normal
serde ^1.0.228
normal
serde_json ^1.0.145
normal
toml ^0.9.8
normal
tracing-subscriber ^0.3.20
normal
Versions
68.97%
of the crate is documented
Platform
aarch64-apple-darwin
aarch64-unknown-linux-gnu
i686-pc-windows-msvc
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Module path
knife_
util
0.2.0
Module path
Sections
智能路径管理模块
核心功能
环境检测逻辑
Module Items
Functions
In crate knife_
util
knife_util
Module
path
Copy item path
Source
Expand description
路径工具模块
§
智能路径管理模块
提供智能的工作目录检测和路径处理功能,支持开发和生产环境的自动切换。
§
核心功能
环境感知
: 自动检测开发/生产环境
智能路径
: 根据环境选择合适的工作目录
路径构建
: 基于工作目录构建项目路径
§
环境检测逻辑
开发环境
: 存在
CARGO_MANIFEST_DIR
环境变量
生产环境
: 基于可执行文件位置推断工作目录
Functions
§
build_
work_
path
构建工作路径
get_
work_
dir
获取工作目录路径
is_
dev_
mode
检查是否为开发模式