diff --git a/BUILD.md b/BUILD.md index 368400bf3e..fd7a0b855d 100644 --- a/BUILD.md +++ b/BUILD.md @@ -147,7 +147,6 @@ git sparse-checkout set recipes/snappy git sparse-checkout add recipes/soci git fetch origin master git checkout master -conan export --version 2.4.1 external/wamr # TODO: needs to be added to the conan center index conan export --version 1.1.10 recipes/snappy/all conan export --version 4.0.3 recipes/soci/all rm -rf .git diff --git a/CMakeLists.txt b/CMakeLists.txt index 022f45e395..073020da4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,7 @@ endif() find_package(nudb REQUIRED) find_package(date REQUIRED) find_package(xxHash REQUIRED) -find_package(wamr REQUIRED) +find_package(wasm-xrplf REQUIRED) target_link_libraries(ripple_libs INTERFACE ed25519::ed25519 diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index 98c0ef4560..2041886d21 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -65,7 +65,7 @@ target_link_libraries(xrpl.imports.main xrpl.libpb xxHash::xxhash $<$:antithesis-sdk-cpp> - wamr::wamr + wasm-xrplf::wasm-xrplf ) if (WIN32) diff --git a/conan.lock b/conan.lock index 6d0b0d3a79..82f2e939af 100644 --- a/conan.lock +++ b/conan.lock @@ -3,7 +3,7 @@ "requires": [ "zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1756234269.497", "xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1756234289.683", - "wamr/2.4.1#731b101bc8fa06d84e5c84edb4dc41a5%1756223745.11", + "wasm-xrplf/2.4.1-xrplf#dc67c558e283593ef0edd7eb00e9fa0d%1759862247.891", "sqlite3/3.49.1#8631739a4c9b93bd3d6b753bac548a63%1756234266.869", "soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1756234262.318", "snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246", @@ -54,4 +54,4 @@ ] }, "config_requires": [] -} +} \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index bc3ab9c14b..bfa256a66f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -31,7 +31,7 @@ class Xrpl(ConanFile): 'openssl/3.5.4', 'soci/4.0.3', 'zlib/1.3.1', - 'wamr/2.4.1', + 'wasm-xrplf/2.4.1-xrplf', ] test_requires = [ @@ -193,7 +193,7 @@ class Xrpl(ConanFile): 'protobuf::libprotobuf', 'soci::soci', 'sqlite3::sqlite', - 'wamr::wamr', + 'wasm-xrplf::wasm-xrplf', 'xxhash::xxhash', 'zlib::zlib', ] diff --git a/external/wamr/conanfile.py b/external/wamr/conanfile.py deleted file mode 100644 index 7057ef9808..0000000000 --- a/external/wamr/conanfile.py +++ /dev/null @@ -1,88 +0,0 @@ -from conan import ConanFile, tools -from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -#from conan.tools.files import (apply_conandata_patches, export_conandata_patches,) -from conan.tools.scm import Git - -# import os - -required_conan_version = ">=1.55.0" - - -class WamrConan(ConanFile): - name = "wamr" - version = "2.4.1" - license = "Apache License v2.0" - url = "https://github.com/ripple/wasm-micro-runtime.git" - description = "Webassembly micro runtime" - package_type = "library" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - # requires = [("llvm/20.1.1@")] - - def export_sources(self): - #export_conandata_patches(self) - pass - - # def build_requirements(self): - # self.tool_requires("llvm/20.1.1") - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def layout(self): - cmake_layout(self, src_folder="src") - - def source(self): - git = Git(self) - git.fetch_commit( - url="https://github.com/ripple/wasm-micro-runtime.git", - commit="a87e56fe8042bbe3ed99a514333ddef42e6c2a41", - ) - # get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - tc = CMakeToolchain(self) - - tc.variables["WAMR_BUILD_INTERP"] = 1 - tc.variables["WAMR_BUILD_FAST_INTERP"] = 1 - tc.variables["WAMR_BUILD_INSTRUCTION_METERING"] = 1 - tc.variables["WAMR_BUILD_AOT"] = 0 - tc.variables["WAMR_BUILD_JIT"] = 0 - tc.variables["WAMR_BUILD_FAST_JIT"] = 0 - tc.variables["WAMR_BUILD_SIMD"] = 0 - tc.variables["WAMR_BUILD_LIB_PTHREAD"] = 0 - tc.variables["WAMR_BUILD_LIB_WASI_THREADS"] = 0 - tc.variables["WAMR_BUILD_TAIL_CALL"] = 1 - tc.variables["WAMR_BUILD_BULK_MEMORY"] = 0 - tc.variables["WAMR_DISABLE_HW_BOUND_CHECK"] = 1 - tc.variables["WAMR_DISABLE_STACK_HW_BOUND_CHECK"] = 1 - tc.variables["WAMR_BH_LOG"] = "wamr_log_to_rippled" - - tc.generate() - - # This generates "foo-config.cmake" and "bar-config.cmake" in self.generators_folder - deps = CMakeDeps(self) - deps.generate() - - def build(self): - #apply_conandata_patches(self) - cmake = CMake(self) - cmake.verbose = True - cmake.configure() - cmake.build() - # self.run(f'echo {self.source_folder}') - # Explicit way: - # self.run('cmake %s/hello %s' % (self.source_folder, cmake.command_line)) - # self.run("cmake --build . %s" % cmake.build_config) - - def package(self): - cmake = CMake(self) - cmake.verbose = True - cmake.install() - - def package_info(self): - self.cpp_info.libs = ["iwasm"] - self.cpp_info.names["cmake_find_package"] = "wamr" - self.cpp_info.names["cmake_find_package_multi"] = "wamr"