Module: Wardite

Extended by:
ValueHelper
Includes:
Const
Defined in:
lib/wardite/load.rb,
lib/wardite.rb,
lib/wardite.rb,
lib/wardite/wasi.rb,
lib/wardite/const.rb,
lib/wardite/value.rb,
lib/wardite/errors.rb,
lib/wardite/leb128.rb,
lib/wardite/cli/cli.rb,
lib/wardite/version.rb,
lib/wardite/revisitor.rb,
lib/wardite/instruction.rb,
lib/wardite/wasi/consts.rb,
lib/wardite/wasm_module.rb,
lib/wardite/wasi/preopens.rb,
lib/wardite/alu_f32.generated.rb,
lib/wardite/alu_f64.generated.rb,
lib/wardite/alu_i32.generated.rb,
lib/wardite/alu_i64.generated.rb,
lib/wardite/convert.generated.rb,
lib/wardite/wasi/dirent_cache.rb

Overview

rbs_inline: enabled

Defined Under Namespace

Modules: BinaryLoader, Cli, Const, Evaluator, Leb128Helper, ValueHelper, Wasi, WasmModule Classes: ArgumentError, Block, CodeSection, DataCountSection, DataSection, ElemSection, EvalError, ExportSection, Exports, ExternalFunction, F32, F64, Frame, FunctionSection, GenericError, Global, GlobalSection, HashModule, I32, I64, ImportSection, Instance, IntegerOverflow, Label, LoadError, Memory, MemorySection, Op, Revisitor, Runtime, Section, StartSection, Store, Table, TableSection, Type, TypeSection, Unreachable, WasiSnapshotPreview1, WasmData, WasmFunction, WebAssemblyError

Constant Summary collapse

VERSION =

: String

"0.9.0"

Constants included from Const

Const::SectionCode, Const::SectionCustom, Const::SectionData, Const::SectionDataCount, Const::SectionElement, Const::SectionExport, Const::SectionFunction, Const::SectionGlobal, Const::SectionImport, Const::SectionMemory, Const::SectionStart, Const::SectionTable, Const::SectionType

Class Method Summary collapse

Methods included from ValueHelper

F32, F64, I32, I64

Class Method Details

.new(path: nil, buffer: nil, **options) ⇒ Object



1370
1371
1372
1373
1374
1375
1376
1377
1378
# File 'lib/wardite.rb', line 1370

def self.new(path: nil, buffer: nil, **options)
  if path
    buffer = File.open(path)
  end
  if !buffer
    raise ::ArgumentError, "nil buffer passed"
  end
  Wardite::BinaryLoader::load_from_buffer(buffer, **options);
end