9 unstable releases (3 breaking)
Uses new Rust 2024
| new 0.9.3 | Mar 28, 2026 |
|---|---|
| 0.9.2 | Mar 21, 2026 |
| 0.9.0 | Feb 23, 2026 |
| 0.8.0 | Feb 23, 2026 |
| 0.6.1 | Feb 16, 2026 |
#1783 in Filesystem
Used in deps-lsp
365KB
8K
SLoC
deps-bundler
Gemfile support for deps-lsp.
This crate is part of the deps-lsp workspace. It provides Bundler-specific functionality including Gemfile DSL parsing, dependency extraction, and rubygems.org registry integration, and implements deps_core::Ecosystem.
Features
- Gemfile parsing — Parse
Gemfilewith position tracking via a regex-based DSL parser - Lock file parsing — Extract resolved versions from
Gemfile.lock - rubygems.org registry — HTTP client for version lookups and package search
- Version resolution — Ruby-aware version matching with pessimistic operator (
~>) - Dependency sources — Support for registry, git, path, and github dependencies
- Group handling — Handle
:development,:test,:productiongroups
Installation
[dependencies]
deps-bundler = "0.9.3"
[!IMPORTANT] Requires Rust 1.89 or later.
Usage
use deps_bundler::{parse_gemfile, RubyGemsRegistry};
let result = parse_gemfile(content, &uri)?;
let registry = RubyGemsRegistry::new(cache);
let versions = registry.get_versions("rails").await?;
Supported Gemfile syntax
source "https://rubygems.org"
gem "rails", "~> 7.0"
gem "pg", ">= 1.1"
gem "puma", require: false
group :development, :test do
gem "rspec-rails"
end
gem "my_gem", git: "https://github.com/user/repo.git"
gem "local_gem", path: "../local_gem"
License
Dependencies
~15–25MB
~356K SLoC