Class: RubyWasm::Packager::Core

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
_Cacheable
Defined in:
lib/ruby_wasm/packager/core.rb,
sig/ruby_wasm/packager.rbs

Defined Under Namespace

Classes: BuildStrategy, DynamicLinking, StaticLinking

Instance Method Summary collapse

Methods included from _Cacheable

#cache_key

Constructor Details

#initialize(packager) ⇒ Core

Returns a new instance of Core.

Parameters:



5
6
7
# File 'lib/ruby_wasm/packager/core.rb', line 5

def initialize(packager)
  @packager = packager
end

Instance Method Details

#artifactstring

Returns:

  • (string)


56
# File 'sig/ruby_wasm/packager.rbs', line 56

def artifact: () -> string

#build(executor, options) ⇒ String

Parameters:

Returns:

  • (String)


9
10
11
12
# File 'lib/ruby_wasm/packager/core.rb', line 9

def build(executor, options)
  strategy = build_strategy
  strategy.build(executor, options)
end

#build_gem_extsvoid

This method returns an undefined value.

Parameters:



51
# File 'sig/ruby_wasm/packager.rbs', line 51

def build_gem_exts: (RubyWasm::BuildExecutor, string gem_home) -> void

#build_strategyBuildStrategy

Returns:



20
21
22
23
24
25
26
27
28
29
# File 'lib/ruby_wasm/packager/core.rb', line 20

def build_strategy
  @build_strategy ||=
    begin
      if @packager.features.support_dynamic_linking?
        DynamicLinking.new(@packager)
      else
        StaticLinking.new(@packager)
      end
    end
end

Parameters:

Returns:

  • (bytes)


52
# File 'sig/ruby_wasm/packager.rbs', line 52

def link_gem_exts: (RubyWasm::BuildExecutor, string ruby_root, string gem_home, bytes module_bytes) -> bytes