diff --git a/Libraries/LibWasm/AbstractMachine/AbstractMachine.h b/Libraries/LibWasm/AbstractMachine/AbstractMachine.h index 0ac28cc8a26..c0e1e388946 100644 --- a/Libraries/LibWasm/AbstractMachine/AbstractMachine.h +++ b/Libraries/LibWasm/AbstractMachine/AbstractMachine.h @@ -13,6 +13,7 @@ #include #include #include +#include #include namespace Wasm { @@ -551,7 +552,7 @@ private: Vector m_references; }; -class Store { +class WASM_API Store { public: Store() = default; @@ -631,7 +632,7 @@ struct HostVisitOps { Function visit_trap; }; -class AbstractMachine { +class WASM_API AbstractMachine { public: explicit AbstractMachine() = default; @@ -682,7 +683,7 @@ private: bool m_should_limit_instruction_count { false }; }; -class Linker { +class WASM_API Linker { public: struct Name { ByteString module; diff --git a/Libraries/LibWasm/CMakeLists.txt b/Libraries/LibWasm/CMakeLists.txt index 718de7d1304..9cdc992a5de 100644 --- a/Libraries/LibWasm/CMakeLists.txt +++ b/Libraries/LibWasm/CMakeLists.txt @@ -11,7 +11,7 @@ if (NOT WIN32) list(APPEND SOURCES WASI/Wasi.cpp) endif() -ladybird_lib(LibWasm wasm) +ladybird_lib(LibWasm wasm EXPLICIT_SYMBOL_EXPORT) target_link_libraries(LibWasm PRIVATE LibCore) include(wasm_spec_tests) diff --git a/Libraries/LibWasm/Types.h b/Libraries/LibWasm/Types.h index 8ae70116cf7..495f8409267 100644 --- a/Libraries/LibWasm/Types.h +++ b/Libraries/LibWasm/Types.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -61,7 +62,7 @@ enum class ParseError { SectionOutOfOrder, }; -ByteString parse_error_to_byte_string(ParseError); +WASM_API ByteString parse_error_to_byte_string(ParseError); template using ParseResult = ErrorOr; @@ -1035,7 +1036,7 @@ private: Optional m_count; }; -class Module : public RefCounted +class WASM_API Module : public RefCounted , public Weakable { public: enum class ValidationStatus { diff --git a/Libraries/LibWasm/Wasi.h b/Libraries/LibWasm/Wasi.h index 43dc9d2bee3..9689fd6844a 100644 --- a/Libraries/LibWasm/Wasi.h +++ b/Libraries/LibWasm/Wasi.h @@ -14,6 +14,7 @@ #include #include #include +#include #include namespace Wasm::Wasi::ABI { @@ -821,7 +822,7 @@ private: LittleEndian tag; }; -struct Implementation { +struct WASM_API Implementation { struct MappedPath { LexicalPath host_path; LexicalPath mapped_path;