class Rubellite::Tooling::ImportLibGenerator

Overview

Generates a sanitized import library (.lib) for CRuby on Windows, stripping dangerous Win32 symbol overrides (such as Sleep) that would otherwise hijack the host runtime's standard library.

Defined in:

rubellite/tooling/import_lib_generator.cr

Constant Summary

DANGEROUS_EXPORTS = Set {"Sleep", "close", "read", "write", "open", "unlink", "rename", "stat", "fstat", "lseek", "dup", "dup2", "pipe", "waitpid", "kill", "signal", "select", "socket", "accept", "bind", "connect", "listen", "recv", "send", "shutdown", "ioctl"}

List of dangerous symbols exported by Ruby's Win32 port that collide with KERNEL32 / UCRT

Class Method Summary

Class Method Detail

def self.find_ruby_dll : String #

[View source]
def self.generate(dll_path : String = find_ruby_dll, output_lib : String = File.expand_path("ext/ruby_clean.lib"), output_def : String = File.expand_path("ext/ruby_clean.def")) : String #

[View source]