Skip to content

Set up the gem skeleton and boot an embedded CRuby VM inside the NSGI cdylib #1

Description

@himura467

Goal

Set up the gem skeleton and the embeddable Ruby VM so later phases have a foundation to build on.

Tasks

  • Gem skeleton: gemspec, lib/nsgi.rb, Rust cdylib under ext/, Cargo workspace depending on nsgi = "0.1" (published protocol crate) + rb-sys with the link-ruby feature
  • VM embedding: boot CRuby on a dedicated thread at first nsgi_handle call (ruby_init, load path setup)
  • App discovery: host_ctx is opaque per spec, so the app file is located out-of-band via NSGI_APP=./app.rb
  • Build tooling: rake compile (or equivalent) producing the cdylib; CI matrix (Ruby 3.2+, Linux/macOS)

Notes

Rust is chosen over plain C because the ABI types come for free from the nsgi crate, and catch_unwind + ownership directly serve the protocol's no-unwind-into-host rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions