summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Reinking <reinking@google.com>2022-09-28 07:24:49 -0700
committerGitHub <noreply@github.com>2022-09-28 07:24:49 -0700
commita4a77c18df16d6ee672f2a2564969bc9b2beef3a (patch)
treee4368558b4b44a7421761341e3b18edbd93f9785
parent520614a5f83878a4d26702a3ad67c44302c2b073 (diff)
downloadwabt-a4a77c18df16d6ee672f2a2564969bc9b2beef3a.tar.gz
wabt-a4a77c18df16d6ee672f2a2564969bc9b2beef3a.tar.bz2
wabt-a4a77c18df16d6ee672f2a2564969bc9b2beef3a.zip
Move headers to include/wabt/ (#1998)
This makes things easier for users and packagers of libwabt.
-rw-r--r--CMakeLists.txt147
-rw-r--r--include/wabt/apply-names.h (renamed from src/apply-names.h)2
-rw-r--r--include/wabt/base-types.h (renamed from src/base-types.h)0
-rw-r--r--include/wabt/binary-reader-ir.h (renamed from src/binary-reader-ir.h)4
-rw-r--r--include/wabt/binary-reader-logging.h (renamed from src/binary-reader-logging.h)2
-rw-r--r--include/wabt/binary-reader-nop.h (renamed from src/binary-reader-nop.h)2
-rw-r--r--include/wabt/binary-reader-objdump.h (renamed from src/binary-reader-objdump.h)6
-rw-r--r--include/wabt/binary-reader-opcnt.h (renamed from src/binary-reader-opcnt.h)4
-rw-r--r--include/wabt/binary-reader.h (renamed from src/binary-reader.h)10
-rw-r--r--include/wabt/binary-writer-spec.h (renamed from src/binary-writer-spec.h)6
-rw-r--r--include/wabt/binary-writer.h (renamed from src/binary-writer.h)8
-rw-r--r--include/wabt/binary.h (renamed from src/binary.h)2
-rw-r--r--include/wabt/binding-hash.h (renamed from src/binding-hash.h)2
-rw-r--r--include/wabt/c-writer.h (renamed from src/c-writer.h)2
-rw-r--r--include/wabt/cast.h (renamed from src/cast.h)2
-rw-r--r--include/wabt/circular-array.h (renamed from src/circular-array.h)0
-rw-r--r--include/wabt/color.h (renamed from src/color.h)0
-rw-r--r--include/wabt/common.h (renamed from src/common.h)12
-rw-r--r--include/wabt/decompiler-ast.h (renamed from src/decompiler-ast.h)8
-rw-r--r--include/wabt/decompiler-ls.h (renamed from src/decompiler-ls.h)4
-rw-r--r--include/wabt/decompiler-naming.h (renamed from src/decompiler-naming.h)2
-rw-r--r--include/wabt/decompiler.h (renamed from src/decompiler.h)2
-rw-r--r--include/wabt/error-formatter.h (renamed from src/error-formatter.h)6
-rw-r--r--include/wabt/error.h (renamed from src/error.h)2
-rw-r--r--include/wabt/expr-visitor.h (renamed from src/expr-visitor.h)4
-rw-r--r--include/wabt/feature.def (renamed from src/feature.def)0
-rw-r--r--include/wabt/feature.h (renamed from src/feature.h)8
-rw-r--r--include/wabt/filenames.h (renamed from src/filenames.h)2
-rw-r--r--include/wabt/generate-names.h (renamed from src/generate-names.h)2
-rw-r--r--include/wabt/interp/binary-reader-interp.h (renamed from src/interp/binary-reader-interp.h)6
-rw-r--r--include/wabt/interp/interp-inl.h (renamed from src/interp/interp-inl.h)0
-rw-r--r--include/wabt/interp/interp-math.h (renamed from src/interp/interp-math.h)4
-rw-r--r--include/wabt/interp/interp-util.h (renamed from src/interp/interp-util.h)2
-rw-r--r--include/wabt/interp/interp-wasi.h (renamed from src/interp/interp-wasi.h)6
-rw-r--r--include/wabt/interp/interp.h (renamed from src/interp/interp.h)14
-rw-r--r--include/wabt/interp/istream.h (renamed from src/interp/istream.h)6
-rw-r--r--include/wabt/interp/wasi_api.def (renamed from src/interp/wasi_api.def)0
-rw-r--r--include/wabt/intrusive-list.h (renamed from src/intrusive-list.h)2
-rw-r--r--include/wabt/ir-util.h (renamed from src/ir-util.h)4
-rw-r--r--include/wabt/ir.h (renamed from src/ir.h)8
-rw-r--r--include/wabt/leb128.h (renamed from src/leb128.h)2
-rw-r--r--include/wabt/lexer-source-line-finder.h (renamed from src/lexer-source-line-finder.h)6
-rw-r--r--include/wabt/lexer-source.h (renamed from src/lexer-source.h)4
-rw-r--r--include/wabt/literal.h (renamed from src/literal.h)2
-rw-r--r--include/wabt/make-unique.h (renamed from src/make-unique.h)0
-rw-r--r--include/wabt/opcode-code-table.h (renamed from src/opcode-code-table.h)0
-rw-r--r--include/wabt/opcode.def (renamed from src/opcode.def)0
-rw-r--r--include/wabt/opcode.h (renamed from src/opcode.h)10
-rw-r--r--include/wabt/option-parser.h (renamed from src/option-parser.h)2
-rw-r--r--include/wabt/range.h (renamed from src/range.h)0
-rw-r--r--include/wabt/resolve-names.h (renamed from src/resolve-names.h)4
-rw-r--r--include/wabt/result.h (renamed from src/result.h)0
-rw-r--r--include/wabt/shared-validator.h (renamed from src/shared-validator.h)16
-rw-r--r--include/wabt/stream.h (renamed from src/stream.h)2
-rw-r--r--include/wabt/string-format.h (renamed from src/string-format.h)2
-rw-r--r--include/wabt/string-util.h (renamed from src/string-util.h)0
-rw-r--r--include/wabt/token.def (renamed from src/token.def)0
-rw-r--r--include/wabt/token.h (renamed from src/token.h)6
-rw-r--r--include/wabt/tracing.h (renamed from src/tracing.h)2
-rw-r--r--include/wabt/type-checker.h (renamed from src/type-checker.h)6
-rw-r--r--include/wabt/type.h (renamed from src/type.h)6
-rw-r--r--include/wabt/utf8.h (renamed from src/utf8.h)0
-rw-r--r--include/wabt/validator.h (renamed from src/validator.h)6
-rw-r--r--include/wabt/wast-lexer.h (renamed from src/wast-lexer.h)12
-rw-r--r--include/wabt/wast-parser.h (renamed from src/wast-parser.h)12
-rw-r--r--include/wabt/wat-writer.h (renamed from src/wat-writer.h)2
-rw-r--r--src/apply-names.cc8
-rw-r--r--src/binary-reader-ir.cc10
-rw-r--r--src/binary-reader-logging.cc4
-rw-r--r--src/binary-reader-objdump.cc10
-rw-r--r--src/binary-reader-opcnt.cc10
-rw-r--r--src/binary-reader.cc14
-rw-r--r--src/binary-writer-spec.cc18
-rw-r--r--src/binary-writer.cc16
-rw-r--r--src/binary.cc2
-rw-r--r--src/binding-hash.cc4
-rw-r--r--src/c-writer.cc14
-rw-r--r--src/color.cc4
-rw-r--r--src/common.cc2
-rw-r--r--src/config.cc2
-rw-r--r--src/decompiler.cc12
-rw-r--r--src/emscripten-helpers.cc34
-rw-r--r--src/error-formatter.cc2
-rw-r--r--src/expr-visitor.cc6
-rw-r--r--src/feature.cc6
-rw-r--r--src/filenames.cc2
-rw-r--r--src/generate-names.cc8
-rw-r--r--src/interp/binary-reader-interp.cc12
-rw-r--r--src/interp/interp-util.cc4
-rw-r--r--src/interp/interp-wasi.cc4
-rw-r--r--src/interp/interp-wasm-c-api.cc12
-rw-r--r--src/interp/interp.cc6
-rw-r--r--src/interp/istream.cc2
-rw-r--r--src/ir-util.cc18
-rw-r--r--src/ir.cc4
-rw-r--r--src/leb128.cc4
-rw-r--r--src/lexer-source-line-finder.cc4
-rw-r--r--src/lexer-source.cc2
-rw-r--r--src/literal.cc2
-rw-r--r--src/opcode-code-table.c8
-rw-r--r--src/opcode.cc8
-rw-r--r--src/option-parser.cc4
-rw-r--r--src/resolve-names.cc10
-rw-r--r--src/shared-validator.cc2
-rw-r--r--src/stream.cc2
-rw-r--r--src/test-binary-reader.cc8
-rw-r--r--src/test-circular-array.cc2
-rw-r--r--src/test-filenames.cc2
-rw-r--r--src/test-hexfloat.cc2
-rw-r--r--src/test-interp.cc8
-rw-r--r--src/test-intrusive-list.cc4
-rw-r--r--src/test-literal.cc2
-rw-r--r--src/test-option-parser.cc2
-rw-r--r--src/test-utf8.cc2
-rw-r--r--src/test-wast-parser.cc4
-rw-r--r--src/token.cc4
-rw-r--r--src/tools/spectest-interp.cc30
-rw-r--r--src/tools/wasm-decompile.cc24
-rw-r--r--src/tools/wasm-interp.cc18
-rw-r--r--src/tools/wasm-objdump.cc10
-rw-r--r--src/tools/wasm-opcodecnt.cc8
-rw-r--r--src/tools/wasm-strip.cc14
-rw-r--r--src/tools/wasm-validate.cc16
-rw-r--r--src/tools/wasm2c.cc30
-rw-r--r--src/tools/wasm2wat-fuzz.cc8
-rw-r--r--src/tools/wasm2wat.cc24
-rw-r--r--src/tools/wast2json.cc28
-rw-r--r--src/tools/wat-desugar.cc24
-rw-r--r--src/tools/wat2wasm.cc26
-rw-r--r--src/tracing.cc2
-rw-r--r--src/type-checker.cc2
-rw-r--r--src/utf8.cc2
-rw-r--r--src/validator.cc14
-rw-r--r--src/wast-lexer.cc10
-rw-r--r--src/wast-parser.cc24
-rw-r--r--src/wat-writer.cc18
136 files changed, 539 insertions, 534 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c443fbfc..6170d9fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,9 +108,8 @@ include(CheckTypeSize)
check_type_size(ssize_t SSIZE_T)
check_type_size(size_t SIZEOF_SIZE_T)
-configure_file(src/config.h.in config.h @ONLY)
+configure_file(src/config.h.in include/wabt/config.h @ONLY)
-include_directories(${WABT_SOURCE_DIR} ${WABT_BINARY_DIR})
if (COMPILER_IS_MSVC)
if (WERROR)
@@ -254,124 +253,130 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${WABT_SOURCE_DIR}/cmake)
add_custom_target(everything)
-set(WABT_LIBRARY_SRC
- ${WABT_BINARY_DIR}/config.h
-
- src/apply-names.h
+set(WABT_LIBRARY_CC
src/apply-names.cc
- src/binary.h
- src/binary.cc
- src/binary-reader.h
- src/binary-reader.cc
- src/binary-reader-ir.h
src/binary-reader-ir.cc
- src/binary-reader-logging.h
src/binary-reader-logging.cc
- src/binary-writer.h
- src/binary-writer.cc
- src/binary-writer-spec.h
+ src/binary-reader.cc
src/binary-writer-spec.cc
- src/binding-hash.h
+ src/binary-writer.cc
+ src/binary.cc
src/binding-hash.cc
- src/color.h
src/color.cc
- src/common.h
src/common.cc
- src/config.h.in
src/config.cc
- src/decompiler.h
- src/decompiler-ast.h
- src/decompiler-ls.h
- src/decompiler-naming.h
+ src/config.h.in
src/decompiler.cc
- src/error-formatter.h
src/error-formatter.cc
- src/expr-visitor.h
src/expr-visitor.cc
- src/feature.h
src/feature.cc
- src/filenames.h
src/filenames.cc
- src/generate-names.h
src/generate-names.cc
- src/ir.h
- src/ir.cc
- src/ir-util.h
src/ir-util.cc
- src/leb128.h
+ src/ir.cc
src/leb128.cc
- src/lexer-source.h
- src/lexer-source.cc
- src/lexer-source-line-finder.h
src/lexer-source-line-finder.cc
- src/literal.h
+ src/lexer-source.cc
src/literal.cc
- src/opcode.h
- src/opcode.cc
- src/opcode-code-table.h
src/opcode-code-table.c
- src/option-parser.h
+ src/opcode-code-table.c
+ src/opcode.cc
src/option-parser.cc
- src/resolve-names.h
src/resolve-names.cc
- src/shared-validator.h
src/shared-validator.cc
- src/stream.h
src/stream.cc
- src/string-util.h
- src/token.h
src/token.cc
- src/tracing.h
src/tracing.cc
- src/type.h
- src/type-checker.h
src/type-checker.cc
- src/utf8.h
src/utf8.cc
- src/validator.h
src/validator.cc
- src/wast-lexer.h
src/wast-lexer.cc
- src/wast-parser.h
src/wast-parser.cc
- src/wat-writer.h
src/wat-writer.cc
# TODO(binji): Move this into its own library?
- src/interp/binary-reader-interp.h
src/interp/binary-reader-interp.cc
- src/interp/interp.h
src/interp/interp.cc
- src/interp/interp-inl.h
- src/interp/interp-math.h
- src/interp/interp-util.h
src/interp/interp-util.cc
- src/interp/istream.h
src/interp/istream.cc
)
+set(WABT_LIBRARY_H
+ ${WABT_BINARY_DIR}/include/wabt/config.h
+
+ include/wabt/apply-names.h
+ include/wabt/binary-reader-ir.h
+ include/wabt/binary-reader-logging.h
+ include/wabt/binary-reader.h
+ include/wabt/binary-writer-spec.h
+ include/wabt/binary-writer.h
+ include/wabt/binary.h
+ include/wabt/binding-hash.h
+ include/wabt/color.h
+ include/wabt/common.h
+ include/wabt/decompiler-ast.h
+ include/wabt/decompiler-ls.h
+ include/wabt/decompiler-naming.h
+ include/wabt/decompiler.h
+ include/wabt/error-formatter.h
+ include/wabt/expr-visitor.h
+ include/wabt/feature.h
+ include/wabt/filenames.h
+ include/wabt/generate-names.h
+ include/wabt/ir-util.h
+ include/wabt/ir.h
+ include/wabt/leb128.h
+ include/wabt/lexer-source-line-finder.h
+ include/wabt/lexer-source.h
+ include/wabt/literal.h
+ include/wabt/opcode-code-table.h
+ include/wabt/opcode.h
+ include/wabt/option-parser.h
+ include/wabt/resolve-names.h
+ include/wabt/shared-validator.h
+ include/wabt/stream.h
+ include/wabt/string-util.h
+ include/wabt/token.h
+ include/wabt/tracing.h
+ include/wabt/type-checker.h
+ include/wabt/type.h
+ include/wabt/utf8.h
+ include/wabt/validator.h
+ include/wabt/wast-lexer.h
+ include/wabt/wast-parser.h
+ include/wabt/wat-writer.h
+
+ # TODO(binji): Move this into its own library?
+ include/wabt/interp/binary-reader-interp.h
+ include/wabt/interp/interp-inl.h
+ include/wabt/interp/interp-math.h
+ include/wabt/interp/interp-util.h
+ include/wabt/interp/interp.h
+ include/wabt/interp/istream.h
+)
+
+set(WABT_LIBRARY_SRC ${WABT_LIBRARY_CC} ${WABT_LIBRARY_H})
+
add_library(wabt STATIC ${WABT_LIBRARY_SRC})
add_library(wabt::wabt ALIAS wabt)
target_compile_features(wabt PUBLIC cxx_std_17)
+target_include_directories(
+ wabt
+ PUBLIC
+ "$<BUILD_INTERFACE:${WABT_SOURCE_DIR}/include>"
+ "$<BUILD_INTERFACE:${WABT_BINARY_DIR}/include>"
+)
if (WABT_INSTALL_RULES)
install(
TARGETS wabt EXPORT wabt-targets
COMPONENT wabt-development
- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wabt"
- )
- install(
- DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src"
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wabt"
- COMPONENT wabt-development
- FILES_MATCHING
- PATTERN "*.h"
- PATTERN "*.def"
+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/config.h"
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/wabt/"
+ DIRECTORY "${WABT_SOURCE_DIR}/include/" "${WABT_BINARY_DIR}/include/"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
COMPONENT wabt-development
)
endif ()
@@ -407,7 +412,7 @@ endif ()
# libwasm, which implenents the wasm C API
if (BUILD_LIBWASM)
add_library(wasm SHARED ${WABT_LIBRARY_SRC} src/interp/interp-wasm-c-api.cc)
- target_link_libraries(wasm wabt)
+ target_link_libraries(wasm PUBLIC wabt)
target_include_directories(wasm PUBLIC third_party/wasm-c-api/include)
if (COMPILER_IS_MSVC)
target_compile_definitions(wasm PRIVATE "WASM_API_EXTERN=__declspec(dllexport)")
diff --git a/src/apply-names.h b/include/wabt/apply-names.h
index 1837c370..4d30fbd8 100644
--- a/src/apply-names.h
+++ b/include/wabt/apply-names.h
@@ -17,7 +17,7 @@
#ifndef WABT_APPLY_NAMES_H_
#define WABT_APPLY_NAMES_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/base-types.h b/include/wabt/base-types.h
index dbf37700..dbf37700 100644
--- a/src/base-types.h
+++ b/include/wabt/base-types.h
diff --git a/src/binary-reader-ir.h b/include/wabt/binary-reader-ir.h
index 18c15585..4de0ee70 100644
--- a/src/binary-reader-ir.h
+++ b/include/wabt/binary-reader-ir.h
@@ -17,8 +17,8 @@
#ifndef WABT_BINARY_READER_IR_H_
#define WABT_BINARY_READER_IR_H_
-#include "src/common.h"
-#include "src/error.h"
+#include "wabt/common.h"
+#include "wabt/error.h"
namespace wabt {
diff --git a/src/binary-reader-logging.h b/include/wabt/binary-reader-logging.h
index c5176bdf..49511485 100644
--- a/src/binary-reader-logging.h
+++ b/include/wabt/binary-reader-logging.h
@@ -17,7 +17,7 @@
#ifndef WABT_BINARY_READER_LOGGING_H_
#define WABT_BINARY_READER_LOGGING_H_
-#include "src/binary-reader.h"
+#include "wabt/binary-reader.h"
namespace wabt {
diff --git a/src/binary-reader-nop.h b/include/wabt/binary-reader-nop.h
index c8ee065f..211a50be 100644
--- a/src/binary-reader-nop.h
+++ b/include/wabt/binary-reader-nop.h
@@ -17,7 +17,7 @@
#ifndef WABT_BINARY_READER_NOP_H_
#define WABT_BINARY_READER_NOP_H_
-#include "src/binary-reader.h"
+#include "wabt/binary-reader.h"
namespace wabt {
diff --git a/src/binary-reader-objdump.h b/include/wabt/binary-reader-objdump.h
index 3b859160..0ca7458f 100644
--- a/src/binary-reader-objdump.h
+++ b/include/wabt/binary-reader-objdump.h
@@ -20,9 +20,9 @@
#include <map>
#include <string>
-#include "src/common.h"
-#include "src/feature.h"
-#include "src/stream.h"
+#include "wabt/common.h"
+#include "wabt/feature.h"
+#include "wabt/stream.h"
namespace wabt {
diff --git a/src/binary-reader-opcnt.h b/include/wabt/binary-reader-opcnt.h
index e499c75d..372fbbc9 100644
--- a/src/binary-reader-opcnt.h
+++ b/include/wabt/binary-reader-opcnt.h
@@ -20,8 +20,8 @@
#include <map>
#include <vector>
-#include "src/common.h"
-#include "src/opcode.h"
+#include "wabt/common.h"
+#include "wabt/opcode.h"
namespace wabt {
diff --git a/src/binary-reader.h b/include/wabt/binary-reader.h
index 9ab067fe..43b0f433 100644
--- a/src/binary-reader.h
+++ b/include/wabt/binary-reader.h
@@ -21,11 +21,11 @@
#include <stdint.h>
#include <string_view>
-#include "src/binary.h"
-#include "src/common.h"
-#include "src/error.h"
-#include "src/feature.h"
-#include "src/opcode.h"
+#include "wabt/binary.h"
+#include "wabt/common.h"
+#include "wabt/error.h"
+#include "wabt/feature.h"
+#include "wabt/opcode.h"
namespace wabt {
diff --git a/src/binary-writer-spec.h b/include/wabt/binary-writer-spec.h
index 65c2460a..5cfa95e7 100644
--- a/src/binary-writer-spec.h
+++ b/include/wabt/binary-writer-spec.h
@@ -21,9 +21,9 @@
#include <utility>
#include <vector>
-#include "src/binary-writer.h"
-#include "src/common.h"
-#include "src/ir.h"
+#include "wabt/binary-writer.h"
+#include "wabt/common.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/binary-writer.h b/include/wabt/binary-writer.h
index 158ed2d3..dedba1bd 100644
--- a/src/binary-writer.h
+++ b/include/wabt/binary-writer.h
@@ -17,10 +17,10 @@
#ifndef WABT_BINARY_WRITER_H_
#define WABT_BINARY_WRITER_H_
-#include "src/common.h"
-#include "src/feature.h"
-#include "src/opcode.h"
-#include "src/stream.h"
+#include "wabt/common.h"
+#include "wabt/feature.h"
+#include "wabt/opcode.h"
+#include "wabt/stream.h"
namespace wabt {
diff --git a/src/binary.h b/include/wabt/binary.h
index 39e0f201..a5740c89 100644
--- a/src/binary.h
+++ b/include/wabt/binary.h
@@ -17,7 +17,7 @@
#ifndef WABT_BINARY_H_
#define WABT_BINARY_H_
-#include "src/common.h"
+#include "wabt/common.h"
#define WABT_BINARY_MAGIC 0x6d736100
#define WABT_BINARY_VERSION 1
diff --git a/src/binding-hash.h b/include/wabt/binding-hash.h
index 1799ce54..f6b948fc 100644
--- a/src/binding-hash.h
+++ b/include/wabt/binding-hash.h
@@ -23,7 +23,7 @@
#include <unordered_map>
#include <vector>
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/c-writer.h b/include/wabt/c-writer.h
index 34033bca..9ddc2208 100644
--- a/src/c-writer.h
+++ b/include/wabt/c-writer.h
@@ -17,7 +17,7 @@
#ifndef WABT_C_WRITER_H_
#define WABT_C_WRITER_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/cast.h b/include/wabt/cast.h
index 72754150..f089e2f1 100644
--- a/src/cast.h
+++ b/include/wabt/cast.h
@@ -20,7 +20,7 @@
#include <memory>
#include <type_traits>
-#include "src/common.h"
+#include "wabt/common.h"
// Modeled after LLVM's dynamic casts:
// http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates
diff --git a/src/circular-array.h b/include/wabt/circular-array.h
index afdead77..afdead77 100644
--- a/src/circular-array.h
+++ b/include/wabt/circular-array.h
diff --git a/src/color.h b/include/wabt/color.h
index 8af57f33..8af57f33 100644
--- a/src/color.h
+++ b/include/wabt/color.h
diff --git a/src/common.h b/include/wabt/common.h
index bcd17039..a8d492ef 100644
--- a/src/common.h
+++ b/include/wabt/common.h
@@ -31,13 +31,13 @@
#include <type_traits>
#include <vector>
-#include "config.h"
+#include "wabt/config.h"
-#include "src/base-types.h"
-#include "src/make-unique.h"
-#include "src/result.h"
-#include "src/string-format.h"
-#include "src/type.h"
+#include "wabt/base-types.h"
+#include "wabt/make-unique.h"
+#include "wabt/result.h"
+#include "wabt/string-format.h"
+#include "wabt/type.h"
#define WABT_FATAL(...) fprintf(stderr, __VA_ARGS__), exit(1)
#define WABT_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
diff --git a/src/decompiler-ast.h b/include/wabt/decompiler-ast.h
index e5dd358e..33cc26c1 100644
--- a/src/decompiler-ast.h
+++ b/include/wabt/decompiler-ast.h
@@ -17,10 +17,10 @@
#ifndef WABT_DECOMPILER_AST_H_
#define WABT_DECOMPILER_AST_H_
-#include "src/cast.h"
-#include "src/generate-names.h"
-#include "src/ir-util.h"
-#include "src/ir.h"
+#include "wabt/cast.h"
+#include "wabt/generate-names.h"
+#include "wabt/ir-util.h"
+#include "wabt/ir.h"
#include <map>
diff --git a/src/decompiler-ls.h b/include/wabt/decompiler-ls.h
index 3e68dad3..c2612fa3 100644
--- a/src/decompiler-ls.h
+++ b/include/wabt/decompiler-ls.h
@@ -17,8 +17,8 @@
#ifndef WABT_DECOMPILER_LS_H_
#define WABT_DECOMPILER_LS_H_
-#include "src/decompiler-ast.h"
-#include "src/string-util.h"
+#include "wabt/decompiler-ast.h"
+#include "wabt/string-util.h"
#include <map>
diff --git a/src/decompiler-naming.h b/include/wabt/decompiler-naming.h
index bb7a0819..12c40e04 100644
--- a/src/decompiler-naming.h
+++ b/include/wabt/decompiler-naming.h
@@ -17,7 +17,7 @@
#ifndef WABT_DECOMPILER_NAMING_H_
#define WABT_DECOMPILER_NAMING_H_
-#include "src/decompiler-ast.h"
+#include "wabt/decompiler-ast.h"
#include <set>
diff --git a/src/decompiler.h b/include/wabt/decompiler.h
index e52a8215..375a4b03 100644
--- a/src/decompiler.h
+++ b/include/wabt/decompiler.h
@@ -17,7 +17,7 @@
#ifndef WABT_DECOMPILER_H_
#define WABT_DECOMPILER_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/error-formatter.h b/include/wabt/error-formatter.h
index 7d28a8f9..a66c57ab 100644
--- a/src/error-formatter.h
+++ b/include/wabt/error-formatter.h
@@ -21,9 +21,9 @@
#include <memory>
#include <string>
-#include "src/color.h"
-#include "src/error.h"
-#include "src/lexer-source-line-finder.h"
+#include "wabt/color.h"
+#include "wabt/error.h"
+#include "wabt/lexer-source-line-finder.h"
namespace wabt {
diff --git a/src/error.h b/include/wabt/error.h
index 4f3375ab..9ea55e95 100644
--- a/src/error.h
+++ b/include/wabt/error.h
@@ -21,7 +21,7 @@
#include <string_view>
#include <vector>
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/expr-visitor.h b/include/wabt/expr-visitor.h
index e00c487d..cbc317cd 100644
--- a/src/expr-visitor.h
+++ b/include/wabt/expr-visitor.h
@@ -17,8 +17,8 @@
#ifndef WABT_EXPR_VISITOR_H_
#define WABT_EXPR_VISITOR_H_
-#include "src/common.h"
-#include "src/ir.h"
+#include "wabt/common.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/feature.def b/include/wabt/feature.def
index 26b1db79..26b1db79 100644
--- a/src/feature.def
+++ b/include/wabt/feature.def
diff --git a/src/feature.h b/include/wabt/feature.h
index 7ebc9ef8..5a288658 100644
--- a/src/feature.h
+++ b/include/wabt/feature.h
@@ -17,7 +17,7 @@
#ifndef WABT_FEATURE_H_
#define WABT_FEATURE_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
@@ -29,7 +29,7 @@ class Features {
void EnableAll() {
#define WABT_FEATURE(variable, flag, default_, help) enable_##variable();
-#include "src/feature.def"
+#include "wabt/feature.def"
#undef WABT_FEATURE
}
@@ -41,7 +41,7 @@ class Features {
variable##_enabled_ = value; \
UpdateDependencies(); \
}
-#include "src/feature.def"
+#include "wabt/feature.def"
#undef WABT_FEATURE
private:
@@ -49,7 +49,7 @@ class Features {
#define WABT_FEATURE(variable, flag, default_, help) \
bool variable##_enabled_ = default_;
-#include "src/feature.def"
+#include "wabt/feature.def"
#undef WABT_FEATURE
};
diff --git a/src/filenames.h b/include/wabt/filenames.h
index dc4719e7..983d2fbf 100644
--- a/src/filenames.h
+++ b/include/wabt/filenames.h
@@ -17,7 +17,7 @@
#ifndef WABT_FILENAMES_H_
#define WABT_FILENAMES_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/generate-names.h b/include/wabt/generate-names.h
index 9cd926e4..69dae8e2 100644
--- a/src/generate-names.h
+++ b/include/wabt/generate-names.h
@@ -17,7 +17,7 @@
#ifndef WABT_GENERATE_NAMES_H_
#define WABT_GENERATE_NAMES_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/interp/binary-reader-interp.h b/include/wabt/interp/binary-reader-interp.h
index b3b7e46d..74d8e15f 100644
--- a/src/interp/binary-reader-interp.h
+++ b/include/wabt/interp/binary-reader-interp.h
@@ -17,9 +17,9 @@
#ifndef WABT_BINARY_READER_INTERP_H_
#define WABT_BINARY_READER_INTERP_H_
-#include "src/common.h"
-#include "src/error.h"
-#include "src/interp/interp.h"
+#include "wabt/common.h"
+#include "wabt/error.h"
+#include "wabt/interp/interp.h"
namespace wabt {
diff --git a/src/interp/interp-inl.h b/include/wabt/interp/interp-inl.h
index d985bea4..d985bea4 100644
--- a/src/interp/interp-inl.h
+++ b/include/wabt/interp/interp-inl.h
diff --git a/src/interp/interp-math.h b/include/wabt/interp/interp-math.h
index 444a5ee5..ef93e336 100644
--- a/src/interp/interp-math.h
+++ b/include/wabt/interp/interp-math.h
@@ -27,8 +27,8 @@
#include <immintrin.h>
#endif
-#include "src/common.h"
-#include "src/interp/interp.h"
+#include "wabt/common.h"
+#include "wabt/interp/interp.h"
namespace wabt {
namespace interp {
diff --git a/src/interp/interp-util.h b/include/wabt/interp/interp-util.h
index fabe1ced..383e96a6 100644
--- a/src/interp/interp-util.h
+++ b/include/wabt/interp/interp-util.h
@@ -21,7 +21,7 @@
#include <string_view>
#include <vector>
-#include "src/interp/interp.h"
+#include "wabt/interp/interp.h"
namespace wabt {
diff --git a/src/interp/interp-wasi.h b/include/wabt/interp/interp-wasi.h
index 465d176c..7eaaedf7 100644
--- a/src/interp/interp-wasi.h
+++ b/include/wabt/interp/interp-wasi.h
@@ -17,9 +17,9 @@
#ifndef WABT_INTERP_WASI_H_
#define WABT_INTERP_WASI_H_
-#include "src/common.h"
-#include "src/error.h"
-#include "src/interp/interp.h"
+#include "wabt/common.h"
+#include "wabt/error.h"
+#include "wabt/interp/interp.h"
#ifdef WITH_WASI
diff --git a/src/interp/interp.h b/include/wabt/interp/interp.h
index df170102..418d00e0 100644
--- a/src/interp/interp.h
+++ b/include/wabt/interp/interp.h
@@ -26,13 +26,13 @@
#include <type_traits>
#include <vector>
-#include "src/cast.h"
-#include "src/common.h"
-#include "src/feature.h"
-#include "src/opcode.h"
-#include "src/result.h"
+#include "wabt/cast.h"
+#include "wabt/common.h"
+#include "wabt/feature.h"
+#include "wabt/opcode.h"
+#include "wabt/result.h"
-#include "src/interp/istream.h"
+#include "wabt/interp/istream.h"
namespace wabt {
namespace interp {
@@ -1270,6 +1270,6 @@ struct Thread::TraceSource : Istream::TraceSource {
} // namespace interp
} // namespace wabt
-#include "src/interp/interp-inl.h"
+#include "wabt/interp/interp-inl.h"
#endif // WABT_INTERP_H_
diff --git a/src/interp/istream.h b/include/wabt/interp/istream.h
index d671e14b..06e1cfca 100644
--- a/src/interp/istream.h
+++ b/include/wabt/interp/istream.h
@@ -21,9 +21,9 @@
#include <string>
#include <vector>
-#include "src/common.h"
-#include "src/opcode.h"
-#include "src/stream.h"
+#include "wabt/common.h"
+#include "wabt/opcode.h"
+#include "wabt/stream.h"
namespace wabt {
namespace interp {
diff --git a/src/interp/wasi_api.def b/include/wabt/interp/wasi_api.def
index 008e9fd6..008e9fd6 100644
--- a/src/interp/wasi_api.def
+++ b/include/wabt/interp/wasi_api.def
diff --git a/src/intrusive-list.h b/include/wabt/intrusive-list.h
index 74161561..0afdf4a4 100644
--- a/src/intrusive-list.h
+++ b/include/wabt/intrusive-list.h
@@ -21,7 +21,7 @@
#include <iterator>
#include <memory>
-#include "src/make-unique.h"
+#include "wabt/make-unique.h"
// This uses a similar interface as std::list, but is missing the following
// features:
diff --git a/src/ir-util.h b/include/wabt/ir-util.h
index db9cf5b4..7d061219 100644
--- a/src/ir-util.h
+++ b/include/wabt/ir-util.h
@@ -17,8 +17,8 @@
#ifndef WABT_IR_UTIL_H_
#define WABT_IR_UTIL_H_
-#include "src/common.h"
-#include "src/ir.h"
+#include "wabt/common.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/ir.h b/include/wabt/ir.h
index 09c57a7f..6bd9ffa3 100644
--- a/src/ir.h
+++ b/include/wabt/ir.h
@@ -26,10 +26,10 @@
#include <type_traits>
#include <vector>
-#include "src/binding-hash.h"
-#include "src/common.h"
-#include "src/intrusive-list.h"
-#include "src/opcode.h"
+#include "wabt/binding-hash.h"
+#include "wabt/common.h"
+#include "wabt/intrusive-list.h"
+#include "wabt/opcode.h"
namespace wabt {
diff --git a/src/leb128.h b/include/wabt/leb128.h
index 56f803cc..e7290475 100644
--- a/src/leb128.h
+++ b/include/wabt/leb128.h
@@ -19,7 +19,7 @@
#include <cstdint>
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/lexer-source-line-finder.h b/include/wabt/lexer-source-line-finder.h
index baf87b4e..56719512 100644
--- a/src/lexer-source-line-finder.h
+++ b/include/wabt/lexer-source-line-finder.h
@@ -21,9 +21,9 @@
#include <string>
#include <vector>
-#include "src/common.h"
-#include "src/lexer-source.h"
-#include "src/range.h"
+#include "wabt/common.h"
+#include "wabt/lexer-source.h"
+#include "wabt/range.h"
namespace wabt {
diff --git a/src/lexer-source.h b/include/wabt/lexer-source.h
index d49d5c6e..19e7d9a4 100644
--- a/src/lexer-source.h
+++ b/include/wabt/lexer-source.h
@@ -22,8 +22,8 @@
#include <string>
#include <vector>
-#include "src/common.h"
-#include "src/range.h"
+#include "wabt/common.h"
+#include "wabt/range.h"
namespace wabt {
diff --git a/src/literal.h b/include/wabt/literal.h
index ff5b2550..5eb8f4b0 100644
--- a/src/literal.h
+++ b/include/wabt/literal.h
@@ -19,7 +19,7 @@
#include <cstdint>
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/make-unique.h b/include/wabt/make-unique.h
index 46d3ac14..46d3ac14 100644
--- a/src/make-unique.h
+++ b/include/wabt/make-unique.h
diff --git a/src/opcode-code-table.h b/include/wabt/opcode-code-table.h
index 3adb478d..3adb478d 100644
--- a/src/opcode-code-table.h
+++ b/include/wabt/opcode-code-table.h
diff --git a/src/opcode.def b/include/wabt/opcode.def
index 9005418e..9005418e 100644
--- a/src/opcode.def
+++ b/include/wabt/opcode.def
diff --git a/src/opcode.h b/include/wabt/opcode.h
index 486af52a..16afb2ee 100644
--- a/src/opcode.h
+++ b/include/wabt/opcode.h
@@ -19,9 +19,9 @@
#include <vector>
-#include "src/common.h"
-#include "src/leb128.h"
-#include "src/opcode-code-table.h"
+#include "wabt/common.h"
+#include "wabt/leb128.h"
+#include "wabt/opcode-code-table.h"
namespace wabt {
@@ -36,7 +36,7 @@ struct Opcode {
#define WABT_OPCODE(rtype, type1, type2, type3, mem_size, prefix, code, Name, \
text, decomp) \
Name,
-#include "src/opcode.def"
+#include "wabt/opcode.def"
#undef WABT_OPCODE
Invalid,
};
@@ -45,7 +45,7 @@ struct Opcode {
#define WABT_OPCODE(rtype, type1, type2, type3, mem_size, prefix, code, Name, \
text, decomp) \
static Opcode Name##_Opcode;
-#include "src/opcode.def"
+#include "wabt/opcode.def"
#undef WABT_OPCODE
Opcode() = default; // Provided so Opcode can be member of a union.
diff --git a/src/option-parser.h b/include/wabt/option-parser.h
index 051ce784..fbc70a80 100644
--- a/src/option-parser.h
+++ b/include/wabt/option-parser.h
@@ -21,7 +21,7 @@
#include <string>
#include <vector>
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/range.h b/include/wabt/range.h
index fa0310ee..fa0310ee 100644
--- a/src/range.h
+++ b/include/wabt/range.h
diff --git a/src/resolve-names.h b/include/wabt/resolve-names.h
index 04f2115c..17ba1eed 100644
--- a/src/resolve-names.h
+++ b/include/wabt/resolve-names.h
@@ -17,8 +17,8 @@
#ifndef WABT_RESOLVE_NAMES_H_
#define WABT_RESOLVE_NAMES_H_
-#include "src/common.h"
-#include "src/error.h"
+#include "wabt/common.h"
+#include "wabt/error.h"
namespace wabt {
diff --git a/src/result.h b/include/wabt/result.h
index a40faab7..a40faab7 100644
--- a/src/result.h
+++ b/include/wabt/result.h
diff --git a/src/shared-validator.h b/include/wabt/shared-validator.h
index 76d1b6b2..154f2619 100644
--- a/src/shared-validator.h
+++ b/include/wabt/shared-validator.h
@@ -22,14 +22,14 @@
#include <string>
#include <vector>
-#include "src/common.h"
-#include "src/error.h"
-#include "src/feature.h"
-#include "src/ir.h"
-#include "src/opcode.h"
-#include "src/type-checker.h"
-
-#include "src/binary-reader.h" // For TypeMut.
+#include "wabt/common.h"
+#include "wabt/error.h"
+#include "wabt/feature.h"
+#include "wabt/ir.h"
+#include "wabt/opcode.h"
+#include "wabt/type-checker.h"
+
+#include "wabt/binary-reader.h" // For TypeMut.
namespace wabt {
diff --git a/src/stream.h b/include/wabt/stream.h
index 07c507bd..67f50975 100644
--- a/src/stream.h
+++ b/include/wabt/stream.h
@@ -21,7 +21,7 @@
#include <memory>
#include <vector>
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/string-format.h b/include/wabt/string-format.h
index 642ee11e..d425a770 100644
--- a/src/string-format.h
+++ b/include/wabt/string-format.h
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
-#include "config.h"
+#include "wabt/config.h"
#define PRIstringview "%.*s"
#define WABT_PRINTF_STRING_VIEW_ARG(x) \
diff --git a/src/string-util.h b/include/wabt/string-util.h
index 28734d50..28734d50 100644
--- a/src/string-util.h
+++ b/include/wabt/string-util.h
diff --git a/src/token.def b/include/wabt/token.def
index b8869abd..b8869abd 100644
--- a/src/token.def
+++ b/include/wabt/token.def
diff --git a/src/token.h b/include/wabt/token.h
index 20c9c181..7d17e106 100644
--- a/src/token.h
+++ b/include/wabt/token.h
@@ -19,8 +19,8 @@
#include <string_view>
-#include "src/literal.h"
-#include "src/opcode.h"
+#include "wabt/literal.h"
+#include "wabt/opcode.h"
namespace wabt {
@@ -36,7 +36,7 @@ enum class TokenType {
#define WABT_TOKEN(name, string) name,
#define WABT_TOKEN_FIRST(group, first) First_##group = first,
#define WABT_TOKEN_LAST(group, last) Last_##group = last,
-#include "token.def"
+#include "wabt/token.def"
#undef WABT_TOKEN
#undef WABT_TOKEN_FIRST
#undef WABT_TOKEN_LAST
diff --git a/src/tracing.h b/include/wabt/tracing.h
index 86daf63c..5be3faa3 100644
--- a/src/tracing.h
+++ b/include/wabt/tracing.h
@@ -29,7 +29,7 @@
#define WABT_TRACING 0
#endif
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/type-checker.h b/include/wabt/type-checker.h
index 73ac5fb8..cfee13d5 100644
--- a/src/type-checker.h
+++ b/include/wabt/type-checker.h
@@ -20,9 +20,9 @@
#include <functional>
#include <vector>
-#include "src/common.h"
-#include "src/feature.h"
-#include "src/opcode.h"
+#include "wabt/common.h"
+#include "wabt/feature.h"
+#include "wabt/opcode.h"
namespace wabt {
diff --git a/src/type.h b/include/wabt/type.h
index d9b662aa..3e0b7506 100644
--- a/src/type.h
+++ b/include/wabt/type.h
@@ -21,9 +21,9 @@
#include <cstdint>
#include <vector>
-#include "config.h"
-#include "src/base-types.h"
-#include "src/string-format.h"
+#include "wabt/config.h"
+#include "wabt/base-types.h"
+#include "wabt/string-format.h"
namespace wabt {
diff --git a/src/utf8.h b/include/wabt/utf8.h
index c3780357..c3780357 100644
--- a/src/utf8.h
+++ b/include/wabt/utf8.h
diff --git a/src/validator.h b/include/wabt/validator.h
index 23ba72c1..f5b94588 100644
--- a/src/validator.h
+++ b/include/wabt/validator.h
@@ -17,9 +17,9 @@
#ifndef WABT_VALIDATOR_H_
#define WABT_VALIDATOR_H_
-#include "src/error.h"
-#include "src/feature.h"
-#include "src/shared-validator.h"
+#include "wabt/error.h"
+#include "wabt/feature.h"
+#include "wabt/shared-validator.h"
namespace wabt {
diff --git a/src/wast-lexer.h b/include/wabt/wast-lexer.h
index ddb5b4a3..385032ca 100644
--- a/src/wast-lexer.h
+++ b/include/wabt/wast-lexer.h
@@ -21,12 +21,12 @@
#include <cstdio>
#include <memory>
-#include "src/common.h"
-#include "src/lexer-source-line-finder.h"
-#include "src/literal.h"
-#include "src/make-unique.h"
-#include "src/opcode.h"
-#include "src/token.h"
+#include "wabt/common.h"
+#include "wabt/lexer-source-line-finder.h"
+#include "wabt/literal.h"
+#include "wabt/make-unique.h"
+#include "wabt/opcode.h"
+#include "wabt/token.h"
namespace wabt {
diff --git a/src/wast-parser.h b/include/wabt/wast-parser.h
index bc92bfd6..3b0e3852 100644
--- a/src/wast-parser.h
+++ b/include/wabt/wast-parser.h
@@ -20,12 +20,12 @@
#include <array>
#include <unordered_map>
-#include "src/circular-array.h"
-#include "src/error.h"
-#include "src/feature.h"
-#include "src/intrusive-list.h"
-#include "src/ir.h"
-#include "src/wast-lexer.h"
+#include "wabt/circular-array.h"
+#include "wabt/error.h"
+#include "wabt/feature.h"
+#include "wabt/intrusive-list.h"
+#include "wabt/ir.h"
+#include "wabt/wast-lexer.h"
namespace wabt {
diff --git a/src/wat-writer.h b/include/wabt/wat-writer.h
index ec8a3eeb..a56c7ab3 100644
--- a/src/wat-writer.h
+++ b/include/wabt/wat-writer.h
@@ -17,7 +17,7 @@
#ifndef WABT_WAT_WRITER_H_
#define WABT_WAT_WRITER_H_
-#include "src/common.h"
+#include "wabt/common.h"
namespace wabt {
diff --git a/src/apply-names.cc b/src/apply-names.cc
index d0958b7d..506ab1fe 100644
--- a/src/apply-names.cc
+++ b/src/apply-names.cc
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include "src/apply-names.h"
+#include "wabt/apply-names.h"
#include <cassert>
#include <cstdio>
#include <string_view>
#include <vector>
-#include "src/cast.h"
-#include "src/expr-visitor.h"
-#include "src/ir.h"
+#include "wabt/cast.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc
index 859293ec..3f64157d 100644
--- a/src/binary-reader-ir.cc
+++ b/src/binary-reader-ir.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/binary-reader-ir.h"
+#include "wabt/binary-reader-ir.h"
#include <cassert>
#include <cinttypes>
@@ -24,10 +24,10 @@
#include <deque>
#include <vector>
-#include "src/binary-reader-nop.h"
-#include "src/cast.h"
-#include "src/common.h"
-#include "src/ir.h"
+#include "wabt/binary-reader-nop.h"
+#include "wabt/cast.h"
+#include "wabt/common.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc
index 0f885e45..e6241093 100644
--- a/src/binary-reader-logging.cc
+++ b/src/binary-reader-logging.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#include "src/binary-reader-logging.h"
+#include "wabt/binary-reader-logging.h"
#include <cinttypes>
-#include "src/stream.h"
+#include "wabt/stream.h"
namespace wabt {
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index b6ff58a6..ad265d5b 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/binary-reader-objdump.h"
+#include "wabt/binary-reader-objdump.h"
#include <algorithm>
#include <cassert>
@@ -27,10 +27,10 @@
#include <strings.h>
#endif
-#include "src/binary-reader-nop.h"
-#include "src/filenames.h"
-#include "src/literal.h"
-#include "src/string-util.h"
+#include "wabt/binary-reader-nop.h"
+#include "wabt/filenames.h"
+#include "wabt/literal.h"
+#include "wabt/string-util.h"
namespace wabt {
diff --git a/src/binary-reader-opcnt.cc b/src/binary-reader-opcnt.cc
index 96e3ef23..3177dbb7 100644
--- a/src/binary-reader-opcnt.cc
+++ b/src/binary-reader-opcnt.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/binary-reader-opcnt.h"
+#include "wabt/binary-reader-opcnt.h"
#include <cassert>
#include <cinttypes>
@@ -22,10 +22,10 @@
#include <cstdint>
#include <cstdio>
-#include "src/binary-reader-nop.h"
-#include "src/common.h"
-#include "src/literal.h"
-#include "src/stream.h"
+#include "wabt/binary-reader-nop.h"
+#include "wabt/common.h"
+#include "wabt/literal.h"
+#include "wabt/stream.h"
namespace wabt {
diff --git a/src/binary-reader.cc b/src/binary-reader.cc
index 3408b9da..63362636 100644
--- a/src/binary-reader.cc
+++ b/src/binary-reader.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/binary-reader.h"
+#include "wabt/binary-reader.h"
#include <cassert>
#include <cinttypes>
@@ -24,13 +24,13 @@
#include <cstring>
#include <vector>
-#include "config.h"
+#include "wabt/config.h"
-#include "src/binary-reader-logging.h"
-#include "src/binary.h"
-#include "src/leb128.h"
-#include "src/stream.h"
-#include "src/utf8.h"
+#include "wabt/binary-reader-logging.h"
+#include "wabt/binary.h"
+#include "wabt/leb128.h"
+#include "wabt/stream.h"
+#include "wabt/utf8.h"
#if HAVE_ALLOCA
#include <alloca.h>
diff --git a/src/binary-writer-spec.cc b/src/binary-writer-spec.cc
index 8d467fcc..af75464a 100644
--- a/src/binary-writer-spec.cc
+++ b/src/binary-writer-spec.cc
@@ -14,21 +14,21 @@
* limitations under the License.
*/
-#include "src/binary-writer-spec.h"
+#include "wabt/binary-writer-spec.h"
#include <cassert>
#include <cinttypes>
#include <string_view>
-#include "config.h"
+#include "wabt/config.h"
-#include "src/binary-writer.h"
-#include "src/binary.h"
-#include "src/cast.h"
-#include "src/filenames.h"
-#include "src/ir.h"
-#include "src/literal.h"
-#include "src/stream.h"
+#include "wabt/binary-writer.h"
+#include "wabt/binary.h"
+#include "wabt/cast.h"
+#include "wabt/filenames.h"
+#include "wabt/ir.h"
+#include "wabt/literal.h"
+#include "wabt/stream.h"
namespace wabt {
diff --git a/src/binary-writer.cc b/src/binary-writer.cc
index 423eed3e..93db5b19 100644
--- a/src/binary-writer.cc
+++ b/src/binary-writer.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/binary-writer.h"
+#include "wabt/binary-writer.h"
#include <cassert>
#include <cmath>
@@ -25,14 +25,14 @@
#include <string_view>
#include <vector>
-#include "config.h"
+#include "wabt/config.h"
-#include "src/binary.h"
-#include "src/cast.h"
-#include "src/expr-visitor.h"
-#include "src/ir.h"
-#include "src/leb128.h"
-#include "src/stream.h"
+#include "wabt/binary.h"
+#include "wabt/cast.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir.h"
+#include "wabt/leb128.h"
+#include "wabt/stream.h"
#define PRINT_HEADER_NO_INDEX -1
#define MAX_U32_LEB128_BYTES 5
diff --git a/src/binary.cc b/src/binary.cc
index 14ed98ce..d4938a19 100644
--- a/src/binary.cc
+++ b/src/binary.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/binary.h"
+#include "wabt/binary.h"
namespace wabt {
diff --git a/src/binding-hash.cc b/src/binding-hash.cc
index f52682d7..cd1b5f5a 100644
--- a/src/binding-hash.cc
+++ b/src/binding-hash.cc
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#include "src/binding-hash.h"
+#include "wabt/binding-hash.h"
#include <algorithm>
#include <vector>
-#include "src/ir.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/c-writer.cc b/src/c-writer.cc
index c38a3c7a..0c90aa72 100644
--- a/src/c-writer.cc
+++ b/src/c-writer.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/c-writer.h"
+#include "wabt/c-writer.h"
#include <cctype>
#include <cinttypes>
@@ -22,12 +22,12 @@
#include <set>
#include <string_view>
-#include "src/cast.h"
-#include "src/common.h"
-#include "src/ir.h"
-#include "src/literal.h"
-#include "src/stream.h"
-#include "src/string-util.h"
+#include "wabt/cast.h"
+#include "wabt/common.h"
+#include "wabt/ir.h"
+#include "wabt/literal.h"
+#include "wabt/stream.h"
+#include "wabt/string-util.h"
#define INDENT_SIZE 2
diff --git a/src/color.cc b/src/color.cc
index 8fdc5d00..6a756b92 100644
--- a/src/color.cc
+++ b/src/color.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#include "src/color.h"
+#include "wabt/color.h"
#include <cstdlib>
-#include "src/common.h"
+#include "wabt/common.h"
#if _WIN32
#include <io.h>
diff --git a/src/common.cc b/src/common.cc
index a4c7a108..037b8304 100644
--- a/src/common.cc
+++ b/src/common.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/common.h"
+#include "wabt/common.h"
#include <cassert>
#include <cerrno>
diff --git a/src/config.cc b/src/config.cc
index 00f60aa8..ccf80e68 100644
--- a/src/config.cc
+++ b/src/config.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "config.h"
+#include "wabt/config.h"
#include <cstdarg>
#include <cstdio>
diff --git a/src/decompiler.cc b/src/decompiler.cc
index 09fa6950..dd8eb767 100644
--- a/src/decompiler.cc
+++ b/src/decompiler.cc
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include "src/decompiler.h"
+#include "wabt/decompiler.h"
-#include "src/decompiler-ast.h"
-#include "src/decompiler-ls.h"
-#include "src/decompiler-naming.h"
+#include "wabt/decompiler-ast.h"
+#include "wabt/decompiler-ls.h"
+#include "wabt/decompiler-naming.h"
-#include "src/stream.h"
+#include "wabt/stream.h"
#define WABT_TRACING 0
-#include "src/tracing.h"
+#include "wabt/tracing.h"
#include <inttypes.h>
diff --git a/src/emscripten-helpers.cc b/src/emscripten-helpers.cc
index 4f5a0c4a..cd050f6d 100644
--- a/src/emscripten-helpers.cc
+++ b/src/emscripten-helpers.cc
@@ -25,22 +25,22 @@
#include <utility>
#include <vector>
-#include "src/apply-names.h"
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/binary-writer-spec.h"
-#include "src/binary-writer.h"
-#include "src/common.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/filenames.h"
-#include "src/generate-names.h"
-#include "src/ir.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-lexer.h"
-#include "src/wast-parser.h"
-#include "src/wat-writer.h"
+#include "wabt/apply-names.h"
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/binary-writer-spec.h"
+#include "wabt/binary-writer.h"
+#include "wabt/common.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/filenames.h"
+#include "wabt/generate-names.h"
+#include "wabt/ir.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-lexer.h"
+#include "wabt/wast-parser.h"
+#include "wabt/wat-writer.h"
typedef std::unique_ptr<wabt::OutputBuffer> WabtOutputBufferPtr;
typedef std::pair<std::string, WabtOutputBufferPtr>
@@ -91,7 +91,7 @@ void wabt_destroy_features(wabt::Features* f) {
void wabt_set_##variable##_enabled(wabt::Features* f, int enabled) { \
f->set_##variable##_enabled(enabled); \
}
-#include "src/feature.def"
+#include "wabt/feature.def"
#undef WABT_FEATURE
wabt::WastLexer* wabt_new_wast_buffer_lexer(const char* filename,
diff --git a/src/error-formatter.cc b/src/error-formatter.cc
index aa4995a5..5b0d4952 100644
--- a/src/error-formatter.cc
+++ b/src/error-formatter.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/error-formatter.h"
+#include "wabt/error-formatter.h"
namespace wabt {
diff --git a/src/expr-visitor.cc b/src/expr-visitor.cc
index e7fee9bf..05cd2798 100644
--- a/src/expr-visitor.cc
+++ b/src/expr-visitor.cc
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#include "src/expr-visitor.h"
+#include "wabt/expr-visitor.h"
-#include "src/cast.h"
-#include "src/ir.h"
+#include "wabt/cast.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/feature.cc b/src/feature.cc
index 9a8cb7a4..88b474c2 100644
--- a/src/feature.cc
+++ b/src/feature.cc
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#include "src/feature.h"
+#include "wabt/feature.h"
-#include "src/option-parser.h"
+#include "wabt/option-parser.h"
namespace wabt {
@@ -30,7 +30,7 @@ void Features::AddOptions(OptionParser* parser) {
[this]() { enable_##variable(); }); \
}
-#include "src/feature.def"
+#include "wabt/feature.def"
#undef WABT_FEATURE
parser->AddOption("enable-all", "Enable all features",
[this]() { EnableAll(); });
diff --git a/src/filenames.cc b/src/filenames.cc
index 3cb6fd1c..9f020f46 100644
--- a/src/filenames.cc
+++ b/src/filenames.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/filenames.h"
+#include "wabt/filenames.h"
namespace wabt {
diff --git a/src/generate-names.cc b/src/generate-names.cc
index a7f5d360..ec3612d7 100644
--- a/src/generate-names.cc
+++ b/src/generate-names.cc
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include "src/generate-names.h"
+#include "wabt/generate-names.h"
#include <cassert>
#include <cstdio>
#include <string>
#include <vector>
-#include "src/cast.h"
-#include "src/expr-visitor.h"
-#include "src/ir.h"
+#include "wabt/cast.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir.h"
namespace wabt {
diff --git a/src/interp/binary-reader-interp.cc b/src/interp/binary-reader-interp.cc
index 05296220..def91b64 100644
--- a/src/interp/binary-reader-interp.cc
+++ b/src/interp/binary-reader-interp.cc
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include "src/interp/binary-reader-interp.h"
+#include "wabt/interp/binary-reader-interp.h"
#include <map>
#include <set>
-#include "src/binary-reader-nop.h"
-#include "src/feature.h"
-#include "src/interp/interp.h"
-#include "src/shared-validator.h"
-#include "src/stream.h"
+#include "wabt/binary-reader-nop.h"
+#include "wabt/feature.h"
+#include "wabt/interp/interp.h"
+#include "wabt/shared-validator.h"
+#include "wabt/stream.h"
namespace wabt {
namespace interp {
diff --git a/src/interp/interp-util.cc b/src/interp/interp-util.cc
index b4f53ba9..5267f4ae 100644
--- a/src/interp/interp-util.cc
+++ b/src/interp/interp-util.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#include "src/interp/interp-util.h"
+#include "wabt/interp/interp-util.h"
#include <cinttypes>
-#include "src/stream.h"
+#include "wabt/stream.h"
namespace wabt {
namespace interp {
diff --git a/src/interp/interp-wasi.cc b/src/interp/interp-wasi.cc
index 61b6f71d..3f8f310b 100644
--- a/src/interp/interp-wasi.cc
+++ b/src/interp/interp-wasi.cc
@@ -28,8 +28,8 @@
* https://github.com/WebAssembly/wasi-libc/blob/master/libc-bottom-half/headers/public/wasi/api.h
*/
-#include "src/interp/interp-wasi.h"
-#include "src/interp/interp-util.h"
+#include "wabt/interp/interp-wasi.h"
+#include "wabt/interp/interp-util.h"
#ifdef WITH_WASI
diff --git a/src/interp/interp-wasm-c-api.cc b/src/interp/interp-wasm-c-api.cc
index 14bfa83b..fe5be6c5 100644
--- a/src/interp/interp-wasm-c-api.cc
+++ b/src/interp/interp-wasm-c-api.cc
@@ -16,12 +16,12 @@
#include <wasm.h>
-#include "src/binary-reader.h"
-#include "src/cast.h"
-#include "src/error-formatter.h"
-#include "src/interp/binary-reader-interp.h"
-#include "src/interp/interp-util.h"
-#include "src/interp/interp.h"
+#include "wabt/binary-reader.h"
+#include "wabt/cast.h"
+#include "wabt/error-formatter.h"
+#include "wabt/interp/binary-reader-interp.h"
+#include "wabt/interp/interp-util.h"
+#include "wabt/interp/interp.h"
using namespace wabt;
using namespace wabt::interp;
diff --git a/src/interp/interp.cc b/src/interp/interp.cc
index 161724b1..e78cb76b 100644
--- a/src/interp/interp.cc
+++ b/src/interp/interp.cc
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-#include "src/interp/interp.h"
+#include "wabt/interp/interp.h"
#include <algorithm>
#include <cassert>
#include <cinttypes>
-#include "src/interp/interp-math.h"
-#include "src/make-unique.h"
+#include "wabt/interp/interp-math.h"
+#include "wabt/make-unique.h"
namespace wabt {
namespace interp {
diff --git a/src/interp/istream.cc b/src/interp/istream.cc
index 7ef27688..bea32105 100644
--- a/src/interp/istream.cc
+++ b/src/interp/istream.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/interp/istream.h"
+#include "wabt/interp/istream.h"
#include <cinttypes>
diff --git a/src/ir-util.cc b/src/ir-util.cc
index 099ee8c3..ee9262cc 100644
--- a/src/ir-util.cc
+++ b/src/ir-util.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/ir-util.h"
+#include "wabt/ir-util.h"
#include <algorithm>
#include <array>
@@ -27,16 +27,16 @@
#include <string>
#include <vector>
-#include "src/cast.h"
-#include "src/common.h"
-#include "src/expr-visitor.h"
-#include "src/ir-util.h"
-#include "src/ir.h"
-#include "src/literal.h"
-#include "src/stream.h"
+#include "wabt/cast.h"
+#include "wabt/common.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir-util.h"
+#include "wabt/ir.h"
+#include "wabt/literal.h"
+#include "wabt/stream.h"
#define WABT_TRACING 0
-#include "src/tracing.h"
+#include "wabt/tracing.h"
using namespace wabt;
diff --git a/src/ir.cc b/src/ir.cc
index 2d9c8b3a..12263ce7 100644
--- a/src/ir.cc
+++ b/src/ir.cc
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-#include "src/ir.h"
+#include "wabt/ir.h"
#include <cassert>
#include <cstddef>
#include <numeric>
-#include "src/cast.h"
+#include "wabt/cast.h"
namespace {
diff --git a/src/leb128.cc b/src/leb128.cc
index 6d15e2f3..29b20f61 100644
--- a/src/leb128.cc
+++ b/src/leb128.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#include "src/leb128.h"
+#include "wabt/leb128.h"
#include <type_traits>
-#include "src/stream.h"
+#include "wabt/stream.h"
#define MAX_U32_LEB128_BYTES 5
#define MAX_U64_LEB128_BYTES 10
diff --git a/src/lexer-source-line-finder.cc b/src/lexer-source-line-finder.cc
index 833cb900..4d407e9d 100644
--- a/src/lexer-source-line-finder.cc
+++ b/src/lexer-source-line-finder.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#include "src/lexer-source-line-finder.h"
+#include "wabt/lexer-source-line-finder.h"
#include <algorithm>
-#include "src/lexer-source.h"
+#include "wabt/lexer-source.h"
namespace wabt {
diff --git a/src/lexer-source.cc b/src/lexer-source.cc
index 896a52e9..eff56e25 100644
--- a/src/lexer-source.cc
+++ b/src/lexer-source.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/lexer-source.h"
+#include "wabt/lexer-source.h"
#include <algorithm>
diff --git a/src/literal.cc b/src/literal.cc
index 615d8cb5..e1a79958 100644
--- a/src/literal.cc
+++ b/src/literal.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/literal.h"
+#include "wabt/literal.h"
#include <cassert>
#include <cerrno>
diff --git a/src/opcode-code-table.c b/src/opcode-code-table.c
index c3e06d03..b9b32a1a 100644
--- a/src/opcode-code-table.c
+++ b/src/opcode-code-table.c
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#include "src/opcode-code-table.h"
+#include "wabt/opcode-code-table.h"
-#include "config.h"
+#include "wabt/config.h"
#include <stdint.h>
@@ -24,7 +24,7 @@ typedef enum WabtOpcodeEnum {
#define WABT_OPCODE(rtype, type1, type2, type3, mem_size, prefix, code, Name, \
text, decomp) \
Name,
-#include "opcode.def"
+#include "wabt/opcode.def"
#undef WABT_OPCODE
Invalid,
} WabtOpcodeEnum;
@@ -36,6 +36,6 @@ uint32_t WabtOpcodeCodeTable[WABT_OPCODE_CODE_TABLE_SIZE] = {
#define WABT_OPCODE(rtype, type1, type2, type3, mem_size, prefix, code, Name, \
text, decomp) \
[(prefix << 8) + code] = Name,
-#include "opcode.def"
+#include "wabt/opcode.def"
#undef WABT_OPCODE
};
diff --git a/src/opcode.cc b/src/opcode.cc
index cfa23f1d..c948ab21 100644
--- a/src/opcode.cc
+++ b/src/opcode.cc
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#include "src/opcode.h"
+#include "wabt/opcode.h"
-#include "src/feature.h"
+#include "wabt/feature.h"
namespace wabt {
@@ -26,7 +26,7 @@ Opcode::Info Opcode::infos_[] = {
text, decomp) \
{text, decomp, Type::rtype, {Type::type1, Type::type2, Type::type3}, \
mem_size, prefix, code, PrefixCode(prefix, code)},
-#include "src/opcode.def"
+#include "wabt/opcode.def"
#undef WABT_OPCODE
{"<invalid>", "", Type::Void, {Type::Void, Type::Void, Type::Void}, 0, 0, 0, 0},
@@ -35,7 +35,7 @@ Opcode::Info Opcode::infos_[] = {
#define WABT_OPCODE(rtype, type1, type2, type3, mem_size, prefix, code, Name, \
text, decomp) \
/* static */ Opcode Opcode::Name##_Opcode(Opcode::Name);
-#include "src/opcode.def"
+#include "wabt/opcode.def"
#undef WABT_OPCODE
Opcode::Info Opcode::GetInfo() const {
diff --git a/src/option-parser.cc b/src/option-parser.cc
index fe06fe94..9c799c37 100644
--- a/src/option-parser.cc
+++ b/src/option-parser.cc
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-#include "src/option-parser.h"
+#include "wabt/option-parser.h"
#include <cstdarg>
#include <cstdio>
#include <cstring>
-#include "config.h"
+#include "wabt/config.h"
#if HAVE_ALLOCA
#include <alloca.h>
diff --git a/src/resolve-names.cc b/src/resolve-names.cc
index fcd274c9..9f0b3b02 100644
--- a/src/resolve-names.cc
+++ b/src/resolve-names.cc
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-#include "src/resolve-names.h"
+#include "wabt/resolve-names.h"
#include <cassert>
#include <cstdio>
-#include "src/cast.h"
-#include "src/expr-visitor.h"
-#include "src/ir.h"
-#include "src/wast-lexer.h"
+#include "wabt/cast.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir.h"
+#include "wabt/wast-lexer.h"
namespace wabt {
diff --git a/src/shared-validator.cc b/src/shared-validator.cc
index 6513f2d7..0bff3266 100644
--- a/src/shared-validator.cc
+++ b/src/shared-validator.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/shared-validator.h"
+#include "wabt/shared-validator.h"
#include <algorithm>
#include <cinttypes>
diff --git a/src/stream.cc b/src/stream.cc
index b1d18c04..5f27e01b 100644
--- a/src/stream.cc
+++ b/src/stream.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/stream.h"
+#include "wabt/stream.h"
#include <cassert>
#include <cctype>
diff --git a/src/test-binary-reader.cc b/src/test-binary-reader.cc
index ee206013..b3e3540d 100644
--- a/src/test-binary-reader.cc
+++ b/src/test-binary-reader.cc
@@ -16,10 +16,10 @@
#include "gtest/gtest.h"
-#include "src/binary-reader-nop.h"
-#include "src/binary-reader.h"
-#include "src/leb128.h"
-#include "src/opcode.h"
+#include "wabt/binary-reader-nop.h"
+#include "wabt/binary-reader.h"
+#include "wabt/leb128.h"
+#include "wabt/opcode.h"
using namespace wabt;
diff --git a/src/test-circular-array.cc b/src/test-circular-array.cc
index aefea514..a2a8919e 100644
--- a/src/test-circular-array.cc
+++ b/src/test-circular-array.cc
@@ -18,7 +18,7 @@
#include <memory>
-#include "src/circular-array.h"
+#include "wabt/circular-array.h"
using namespace wabt;
diff --git a/src/test-filenames.cc b/src/test-filenames.cc
index a0552bf8..b734f58b 100644
--- a/src/test-filenames.cc
+++ b/src/test-filenames.cc
@@ -16,7 +16,7 @@
#include "gtest/gtest.h"
-#include "src/filenames.h"
+#include "wabt/filenames.h"
using namespace wabt;
diff --git a/src/test-hexfloat.cc b/src/test-hexfloat.cc
index 7b493518..6dba8c06 100644
--- a/src/test-hexfloat.cc
+++ b/src/test-hexfloat.cc
@@ -20,7 +20,7 @@
#include "gtest/gtest.h"
-#include "src/literal.h"
+#include "wabt/literal.h"
#define FOREACH_UINT32_MULTIPLIER 1
diff --git a/src/test-interp.cc b/src/test-interp.cc
index e3de004b..11e4770f 100644
--- a/src/test-interp.cc
+++ b/src/test-interp.cc
@@ -16,11 +16,11 @@
#include "gtest/gtest.h"
-#include "src/binary-reader.h"
-#include "src/error-formatter.h"
+#include "wabt/binary-reader.h"
+#include "wabt/error-formatter.h"
-#include "src/interp/binary-reader-interp.h"
-#include "src/interp/interp.h"
+#include "wabt/interp/binary-reader-interp.h"
+#include "wabt/interp/interp.h"
using namespace wabt;
using namespace wabt::interp;
diff --git a/src/test-intrusive-list.cc b/src/test-intrusive-list.cc
index dfc3dbb3..ec817ecf 100644
--- a/src/test-intrusive-list.cc
+++ b/src/test-intrusive-list.cc
@@ -18,8 +18,8 @@
#include <memory>
-#include "src/intrusive-list.h"
-#include "src/make-unique.h"
+#include "wabt/intrusive-list.h"
+#include "wabt/make-unique.h"
using namespace wabt;
diff --git a/src/test-literal.cc b/src/test-literal.cc
index 57a933a4..d9990d16 100644
--- a/src/test-literal.cc
+++ b/src/test-literal.cc
@@ -21,7 +21,7 @@
#include "gtest/gtest.h"
-#include "src/literal.h"
+#include "wabt/literal.h"
using namespace wabt;
diff --git a/src/test-option-parser.cc b/src/test-option-parser.cc
index 6d6c4db5..757e6578 100644
--- a/src/test-option-parser.cc
+++ b/src/test-option-parser.cc
@@ -16,7 +16,7 @@
#include <string>
-#include "src/option-parser.h"
+#include "wabt/option-parser.h"
using namespace wabt;
diff --git a/src/test-utf8.cc b/src/test-utf8.cc
index 8e420628..d19077e9 100644
--- a/src/test-utf8.cc
+++ b/src/test-utf8.cc
@@ -16,7 +16,7 @@
#include "gtest/gtest.h"
-#include "src/utf8.h"
+#include "wabt/utf8.h"
using namespace wabt;
diff --git a/src/test-wast-parser.cc b/src/test-wast-parser.cc
index 00a27bf5..69b5cf67 100644
--- a/src/test-wast-parser.cc
+++ b/src/test-wast-parser.cc
@@ -18,8 +18,8 @@
#include <memory>
-#include "src/wast-lexer.h"
-#include "src/wast-parser.h"
+#include "wabt/wast-lexer.h"
+#include "wabt/wast-parser.h"
using namespace wabt;
diff --git a/src/token.cc b/src/token.cc
index cb1a19df..576fadd1 100644
--- a/src/token.cc
+++ b/src/token.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/token.h"
+#include "wabt/token.h"
namespace wabt {
@@ -23,7 +23,7 @@ const char* GetTokenTypeName(TokenType token_type) {
#define WABT_TOKEN(name, string) string,
#define WABT_TOKEN_FIRST(name, string)
#define WABT_TOKEN_LAST(name, string)
-#include "token.def"
+#include "wabt/token.def"
#undef WABT_TOKEN
#undef WABT_TOKEN_FIRST
#undef WABT_TOKEN_LAST
diff --git a/src/tools/spectest-interp.cc b/src/tools/spectest-interp.cc
index 2e842dfd..af50bfb2 100644
--- a/src/tools/spectest-interp.cc
+++ b/src/tools/spectest-interp.cc
@@ -24,21 +24,21 @@
#include <string>
#include <vector>
-#include "src/binary-reader.h"
-#include "src/cast.h"
-#include "src/common.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/interp/binary-reader-interp.h"
-#include "src/interp/interp-util.h"
-#include "src/interp/interp.h"
-#include "src/literal.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
-#include "src/string-util.h"
-#include "src/validator.h"
-#include "src/wast-lexer.h"
-#include "src/wast-parser.h"
+#include "wabt/binary-reader.h"
+#include "wabt/cast.h"
+#include "wabt/common.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/interp/binary-reader-interp.h"
+#include "wabt/interp/interp-util.h"
+#include "wabt/interp/interp.h"
+#include "wabt/literal.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
+#include "wabt/string-util.h"
+#include "wabt/validator.h"
+#include "wabt/wast-lexer.h"
+#include "wabt/wast-parser.h"
using namespace wabt;
using namespace wabt::interp;
diff --git a/src/tools/wasm-decompile.cc b/src/tools/wasm-decompile.cc
index df2bd2b5..5c8c1252 100644
--- a/src/tools/wasm-decompile.cc
+++ b/src/tools/wasm-decompile.cc
@@ -19,18 +19,18 @@
#include <cstdio>
#include <cstdlib>
-#include "src/apply-names.h"
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/decompiler.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/generate-names.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-lexer.h"
+#include "wabt/apply-names.h"
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/decompiler.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/generate-names.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-lexer.h"
using namespace wabt;
diff --git a/src/tools/wasm-interp.cc b/src/tools/wasm-interp.cc
index 465ad611..addde767 100644
--- a/src/tools/wasm-interp.cc
+++ b/src/tools/wasm-interp.cc
@@ -22,15 +22,15 @@
#include <string>
#include <vector>
-#include "src/binary-reader.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/interp/binary-reader-interp.h"
-#include "src/interp/interp-util.h"
-#include "src/interp/interp-wasi.h"
-#include "src/interp/interp.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
+#include "wabt/binary-reader.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/interp/binary-reader-interp.h"
+#include "wabt/interp/interp-util.h"
+#include "wabt/interp/interp-wasi.h"
+#include "wabt/interp/interp.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
#ifdef WITH_WASI
#include "uvwasi.h"
diff --git a/src/tools/wasm-objdump.cc b/src/tools/wasm-objdump.cc
index 59060432..d553c742 100644
--- a/src/tools/wasm-objdump.cc
+++ b/src/tools/wasm-objdump.cc
@@ -18,11 +18,11 @@
#include <cstdlib>
#include <cstring>
-#include "src/binary-reader-objdump.h"
-#include "src/binary-reader.h"
-#include "src/common.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
+#include "wabt/binary-reader-objdump.h"
+#include "wabt/binary-reader.h"
+#include "wabt/common.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
using namespace wabt;
diff --git a/src/tools/wasm-opcodecnt.cc b/src/tools/wasm-opcodecnt.cc
index f3abb868..63153d39 100644
--- a/src/tools/wasm-opcodecnt.cc
+++ b/src/tools/wasm-opcodecnt.cc
@@ -24,10 +24,10 @@
#include <map>
#include <vector>
-#include "src/binary-reader-opcnt.h"
-#include "src/binary-reader.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
+#include "wabt/binary-reader-opcnt.h"
+#include "wabt/binary-reader.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
#define ERROR(fmt, ...) \
fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__)
diff --git a/src/tools/wasm-strip.cc b/src/tools/wasm-strip.cc
index f7abd5ff..8d8b33a0 100644
--- a/src/tools/wasm-strip.cc
+++ b/src/tools/wasm-strip.cc
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-#include "src/binary-reader-nop.h"
-#include "src/binary-reader.h"
-#include "src/binary.h"
-#include "src/error-formatter.h"
-#include "src/leb128.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
+#include "wabt/binary-reader-nop.h"
+#include "wabt/binary-reader.h"
+#include "wabt/binary.h"
+#include "wabt/error-formatter.h"
+#include "wabt/leb128.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
using namespace wabt;
diff --git a/src/tools/wasm-validate.cc b/src/tools/wasm-validate.cc
index dd48e121..d093f1be 100644
--- a/src/tools/wasm-validate.cc
+++ b/src/tools/wasm-validate.cc
@@ -19,14 +19,14 @@
#include <cstdio>
#include <cstdlib>
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/error-formatter.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-lexer.h"
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/error-formatter.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-lexer.h"
using namespace wabt;
diff --git a/src/tools/wasm2c.cc b/src/tools/wasm2c.cc
index 3dd14483..b00bce58 100644
--- a/src/tools/wasm2c.cc
+++ b/src/tools/wasm2c.cc
@@ -19,20 +19,20 @@
#include <cstdio>
#include <cstdlib>
-#include "src/apply-names.h"
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/filenames.h"
-#include "src/generate-names.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-lexer.h"
-
-#include "src/c-writer.h"
+#include "wabt/apply-names.h"
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/filenames.h"
+#include "wabt/generate-names.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-lexer.h"
+
+#include "wabt/c-writer.h"
using namespace wabt;
@@ -101,7 +101,7 @@ static void ParseOptions(int argc, char** argv) {
any_non_supported_feature |= \
(s_features.variable##_enabled() != default_) && \
!IsFeatureSupported(flag);
-#include "src/feature.def"
+#include "wabt/feature.def"
#undef WABT_FEATURE
if (any_non_supported_feature) {
diff --git a/src/tools/wasm2wat-fuzz.cc b/src/tools/wasm2wat-fuzz.cc
index 1318ef62..52474248 100644
--- a/src/tools/wasm2wat-fuzz.cc
+++ b/src/tools/wasm2wat-fuzz.cc
@@ -16,10 +16,10 @@
//
// https://github.com/google/oss-fuzz/blob/master/projects/wabt/wasm2wat_fuzzer.cc
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/common.h"
-#include "src/ir.h"
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/common.h"
+#include "wabt/ir.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
wabt::ReadBinaryOptions options;
diff --git a/src/tools/wasm2wat.cc b/src/tools/wasm2wat.cc
index 2c50fea7..7846f710 100644
--- a/src/tools/wasm2wat.cc
+++ b/src/tools/wasm2wat.cc
@@ -19,18 +19,18 @@
#include <cstdio>
#include <cstdlib>
-#include "src/apply-names.h"
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/generate-names.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-lexer.h"
-#include "src/wat-writer.h"
+#include "wabt/apply-names.h"
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/generate-names.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-lexer.h"
+#include "wabt/wat-writer.h"
using namespace wabt;
diff --git a/src/tools/wast2json.cc b/src/tools/wast2json.cc
index e3afed4d..bdc4a674 100644
--- a/src/tools/wast2json.cc
+++ b/src/tools/wast2json.cc
@@ -21,20 +21,20 @@
#include <cstdlib>
#include <string>
-#include "config.h"
-
-#include "src/binary-writer-spec.h"
-#include "src/binary-writer.h"
-#include "src/common.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/filenames.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/resolve-names.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-parser.h"
+#include "wabt/config.h"
+
+#include "wabt/binary-writer-spec.h"
+#include "wabt/binary-writer.h"
+#include "wabt/common.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/filenames.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/resolve-names.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-parser.h"
using namespace wabt;
diff --git a/src/tools/wat-desugar.cc b/src/tools/wat-desugar.cc
index 85c2d8a5..69a5dd54 100644
--- a/src/tools/wat-desugar.cc
+++ b/src/tools/wat-desugar.cc
@@ -20,18 +20,18 @@
#include <cstdio>
#include <cstdlib>
-#include "config.h"
-
-#include "src/apply-names.h"
-#include "src/common.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/generate-names.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/stream.h"
-#include "src/wast-parser.h"
-#include "src/wat-writer.h"
+#include "wabt/config.h"
+
+#include "wabt/apply-names.h"
+#include "wabt/common.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/generate-names.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/stream.h"
+#include "wabt/wast-parser.h"
+#include "wabt/wat-writer.h"
using namespace wabt;
diff --git a/src/tools/wat2wasm.cc b/src/tools/wat2wasm.cc
index 39eeed01..eab17ebf 100644
--- a/src/tools/wat2wasm.cc
+++ b/src/tools/wat2wasm.cc
@@ -21,19 +21,19 @@
#include <cstdlib>
#include <string>
-#include "config.h"
-
-#include "src/binary-writer.h"
-#include "src/common.h"
-#include "src/error-formatter.h"
-#include "src/feature.h"
-#include "src/filenames.h"
-#include "src/ir.h"
-#include "src/option-parser.h"
-#include "src/resolve-names.h"
-#include "src/stream.h"
-#include "src/validator.h"
-#include "src/wast-parser.h"
+#include "wabt/config.h"
+
+#include "wabt/binary-writer.h"
+#include "wabt/common.h"
+#include "wabt/error-formatter.h"
+#include "wabt/feature.h"
+#include "wabt/filenames.h"
+#include "wabt/ir.h"
+#include "wabt/option-parser.h"
+#include "wabt/resolve-names.h"
+#include "wabt/stream.h"
+#include "wabt/validator.h"
+#include "wabt/wast-parser.h"
using namespace wabt;
diff --git a/src/tracing.cc b/src/tracing.cc
index 3208acdf..21f512f5 100644
--- a/src/tracing.cc
+++ b/src/tracing.cc
@@ -15,7 +15,7 @@
*/
#define WABT_TRACING 1
-#include "src/tracing.h"
+#include "wabt/tracing.h"
namespace {
diff --git a/src/type-checker.cc b/src/type-checker.cc
index 7282c5b2..01b5e233 100644
--- a/src/type-checker.cc
+++ b/src/type-checker.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/type-checker.h"
+#include "wabt/type-checker.h"
#include <cinttypes>
diff --git a/src/utf8.cc b/src/utf8.cc
index f3ca98e4..dd95c8c6 100644
--- a/src/utf8.cc
+++ b/src/utf8.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/utf8.h"
+#include "wabt/utf8.h"
#include <cstdint>
diff --git a/src/validator.cc b/src/validator.cc
index d44764cb..f05018ab 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -14,20 +14,20 @@
* limitations under the License.
*/
-#include "src/validator.h"
+#include "wabt/validator.h"
#include <cassert>
#include <cinttypes>
#include <cstdarg>
#include <cstdio>
-#include "config.h"
+#include "wabt/config.h"
-#include "src/binary-reader.h"
-#include "src/cast.h"
-#include "src/expr-visitor.h"
-#include "src/ir.h"
-#include "src/shared-validator.h"
+#include "wabt/binary-reader.h"
+#include "wabt/cast.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir.h"
+#include "wabt/shared-validator.h"
namespace wabt {
diff --git a/src/wast-lexer.cc b/src/wast-lexer.cc
index 50c5d558..a601b75d 100644
--- a/src/wast-lexer.cc
+++ b/src/wast-lexer.cc
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-#include "src/wast-lexer.h"
+#include "wabt/wast-lexer.h"
#include <cassert>
#include <cstdio>
-#include "config.h"
+#include "wabt/config.h"
-#include "src/lexer-source.h"
-#include "src/wast-parser.h"
+#include "wabt/lexer-source.h"
+#include "wabt/wast-parser.h"
#define ERROR(...) parser->Error(GetLocation(), __VA_ARGS__)
@@ -30,7 +30,7 @@ namespace wabt {
namespace {
-#include "src/prebuilt/lexer-keywords.cc"
+#include "prebuilt/lexer-keywords.cc"
} // namespace
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index d804e21e..a3cc7a66 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -14,20 +14,20 @@
* limitations under the License.
*/
-#include "src/wast-parser.h"
-
-#include "src/binary-reader-ir.h"
-#include "src/binary-reader.h"
-#include "src/cast.h"
-#include "src/expr-visitor.h"
-#include "src/make-unique.h"
-#include "src/resolve-names.h"
-#include "src/stream.h"
-#include "src/utf8.h"
-#include "src/validator.h"
+#include "wabt/wast-parser.h"
+
+#include "wabt/binary-reader-ir.h"
+#include "wabt/binary-reader.h"
+#include "wabt/cast.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/make-unique.h"
+#include "wabt/resolve-names.h"
+#include "wabt/stream.h"
+#include "wabt/utf8.h"
+#include "wabt/validator.h"
#define WABT_TRACING 0
-#include "src/tracing.h"
+#include "wabt/tracing.h"
#define EXPECT(token_type) CHECK_RESULT(Expect(TokenType::token_type))
diff --git a/src/wat-writer.cc b/src/wat-writer.cc
index 265f4285..5b0e6599 100644
--- a/src/wat-writer.cc
+++ b/src/wat-writer.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/wat-writer.h"
+#include "wabt/wat-writer.h"
#include <algorithm>
#include <array>
@@ -27,16 +27,16 @@
#include <string>
#include <vector>
-#include "src/cast.h"
-#include "src/common.h"
-#include "src/expr-visitor.h"
-#include "src/ir-util.h"
-#include "src/ir.h"
-#include "src/literal.h"
-#include "src/stream.h"
+#include "wabt/cast.h"
+#include "wabt/common.h"
+#include "wabt/expr-visitor.h"
+#include "wabt/ir-util.h"
+#include "wabt/ir.h"
+#include "wabt/literal.h"
+#include "wabt/stream.h"
#define WABT_TRACING 0
-#include "src/tracing.h"
+#include "wabt/tracing.h"
#define INDENT_SIZE 2
#define NO_FORCE_NEWLINE 0