smbcloud-ruby-native-gem

Automate building and packaging Ruby gems wrapping Rust native extensions.

7|6|Updated Feb 3, 2023
One-click install
npx skills add https://github.com/smbcloudXYZ/smbcloud-cli --skill smbcloud-ruby-native-gem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smbcloud-ruby-native-gem
Source: https://github.com/smbcloudXYZ/smbcloud-cli/tree/main/.agents/skills/smbcloud-ruby-native-gem
Command: npx skills add https://github.com/smbcloudXYZ/smbcloud-cli --skill smbcloud-ruby-native-gem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ruby gems that wrap Rust native extensions (via Magnus and rb_sys) require careful workspace wiring, cross-language build steps, and release checks, making them fragile and hard to scale.

Core Features & Use Cases

  • Workspace wiring guidance for sdk/gems/model and sdk/gems/auth to align with a Cargo-based workspace.
  • Build, compile, and package routines using Rakefile, extconf.rb, and Cargo paths to generate native extensions and gem artifacts.
  • Release preflight and publish steps to verify versioning, ensure artifacts exist in pkg/, and prepare gem credentials.

Quick Start

From the gem root, run the standard rake tasks to build, validate, and package the native extension before publishing.

Frequently Asked Questions about smbcloud-ruby-native-gem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I package a Ruby gem with a Rust native extension?

To package a Ruby gem with a Rust native extension, configure Cargo workspace paths alongside Rakefile and extconf.rb build steps, then run rake tasks to compile the extension and generate gem artifacts in pkg/.

Why does building Rust-backed Ruby gems fail during release preflight?

Building Rust-backed Ruby gems fails during preflight when Cargo workspace wiring is misconfigured, extconf.rb paths are incorrect, or gemspec validations and versioning conventions miss RubyGems distribution requirements.

What is the best way to wire a Ruby gem into a Cargo workspace?

The best way to wire a Ruby gem into a Cargo workspace is aligning the gem directory structure with Cargo paths and configuring Rakefile build routines to ensure the native extension compiles within the workspace.

Do I need rb_sys to build Ruby native extensions with Rust?

You need rb_sys to build Ruby native extensions with Rust because it provides the cargo integration and build tooling required to compile Magnus-backed Rust code into Ruby gem artifacts.

How do I validate a Rust native gem before publishing to RubyGems?

To validate a Rust native gem before publishing to RubyGems, run release preflight checks to verify versioning, ensure compiled artifacts exist in pkg/, and prepare gem credentials for distribution.