-
Notifications
You must be signed in to change notification settings - Fork 0
Development Setup
forge18 edited this page Dec 7, 2025
·
1 revision
Complete guide to setting up a development environment for LPM.
- Rust: Latest stable version (rustup.rs)
- Lua: 5.1, 5.3, or 5.4 installed
- Git: For version control
-
Zig: For macOS/Linux cross-compilation (
brew install zigon macOS) - cargo-zigbuild: Installed automatically by build scripts
- cargo-xwin: For Windows cross-compilation (installed automatically)
-
clang: Required for Windows builds (
brew install llvmon macOS)
git clone https://github.com/yourusername/lpm.git
cd lpmRust dependencies are managed by Cargo and will be installed automatically:
cargo build# Build
cargo build
# Run tests
cargo test
# Run LPM
cargo run -- --version# Debug build
cargo build
# Release build
cargo build --release# Run a command
cargo run -- install luasocket
# Run with debug output
RUST_LOG=debug cargo run -- install# All tests
cargo test
# Specific test
cargo test test_name
# Integration tests
cargo test --test integration_tests
# Security tests
cargo test --test security
# With output
cargo test -- --nocapture# Format code
cargo fmt
# Check formatting
cargo fmt --check
# Run clippy
cargo clippy
# Clippy with all warnings
cargo clippy -- -W clippy::allcargo benchRecommended extensions:
-
rust-lang.rust-analyzer- Rust language support -
vadimcn.vscode-lldb- Debugging
- Install Rust plugin
- Configure Rust toolchain
let value = some_function();
dbg!(&value); // Prints to stderrVS Code:
- Set breakpoints
- Press F5 to start debugging
- Use debug console
Command line (gdb/lldb):
# Build with debug symbols
cargo build
# Run with debugger
lldb target/debug/lpm# Build release
cargo build --release
# Install locally
cargo install --path .
# Test
lpm --version# Test macOS build
./scripts/build-installer.sh macos
# Test Linux build
./scripts/build-installer.sh linux
# Test Windows build
./scripts/build-installer.sh windowsRun:
cargo clean
cargo buildCheck:
- Lua is installed and in PATH
- Test dependencies are available
- No file permission issues
Ensure Xcode Command Line Tools are installed:
xcode-select --install- Read Architecture to understand the codebase
- Check Testing for testing guidelines
- Review Contributing for contribution guidelines