Skip to main content

Module gem_native

Module gem_native 

Source
Expand description

Native RubyGems plugin.

A .gem is an uncompressed ustar tar whose members include metadata.gz (a gzipped YAML doc) and data.tar.gz (the actual files). The authoritative name, version, and platform live in that YAML — NOT in the filename. This matters for platform-suffixed gems: a native gem is published as foo-1.2.3-java.gem, whose filename “version” naively parses as 1.2.3-java, while metadata.gz carries version: 1.2.3 + platform: java. Parsing it (under the host-decompressors feature, via the tar crate for the outer tar + lgz for the inner metadata.gz) is what lets the read-side GemView resolve gem coords correctly.

When host-decompressors is off (or the gem can’t be parsed), the plugin falls back to a best-effort (name, version) split from the filename — never panics, always returns a row.

Structs§

GemPlugin
Native gem plugin. name/version/platform come from metadata.gz when the .gem is parseable, else (name, version) from the filename.