diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni index 7e4e9b4146e..ae564bef7eb 100644 --- a/runtime/runtime_args.gni +++ b/runtime/runtime_args.gni @@ -75,9 +75,6 @@ declare_args() { # Whether libdart should export the symbols of the Dart API. dart_lib_export_symbols = true - # Whether package:wasm should be enabled. - dart_enable_wasm = false - # Whether to use compressed pointers. dart_use_compressed_pointers = false } diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index aad3f5adc08..15a1abfd32c 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -507,29 +507,6 @@ copy("copy_analysis_summaries") { outputs = [ "$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}" ] } -copy("copy_wasmer") { - visibility = [ ":create_common_sdk" ] - deps = [ - ":copy_libraries", - "../third_party/wasmer:wasmer_wrap", - ] - if (is_win) { - prefix = "" - suffix = "dll" - } else if (is_mac) { - prefix = "lib" - suffix = "dylib" - } else { - # TODO(dartbug.com/37882): Support Fuchsia. - prefix = "lib" - suffix = "so" - } - sources = [ "$root_out_dir/${prefix}wasmer_wrap.$suffix" ] - outputs = [ - "$root_out_dir/dart-sdk/bin/third_party/wasmer/${prefix}wasmer.$suffix", - ] -} - # This rule copies dill files to lib/_internal. copy("copy_vm_dill_files") { visibility = [ ":create_common_sdk" ] @@ -850,14 +827,6 @@ group("create_common_sdk") { if (is_win) { public_deps += [ ":copy_7zip" ] } - - # CIPD only has versions of the Rust compiler for linux and mac x64 hosts. - # We also disallow cross-compialtion (it may be possible in future, but it - # isn't ready yet). - if (host_cpu == "x64" && (host_os == "linux" || host_os == "mac") && - host_cpu == current_cpu && host_os == current_os && dart_enable_wasm) { - public_deps += [ ":copy_wasmer" ] - } } # Parts specific to the platform SDK. diff --git a/third_party/wasmer/.gitignore b/third_party/wasmer/.gitignore deleted file mode 100644 index 86a9394a250..00000000000 --- a/third_party/wasmer/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -!* -Cargo.lock diff --git a/third_party/wasmer/BUILD.gn b/third_party/wasmer/BUILD.gn deleted file mode 100644 index 0f65bf7cbe1..00000000000 --- a/third_party/wasmer/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -import("../../build/rust/rust.gni") - -shared_library("wasmer_wrap") { - sources = [ - "../../runtime/include/dart_api_dl.c", - "finalizers.cc", - ] - deps = [ - ":wasmer_lib", - "../../runtime/bin:dart", - ] - include_dirs = [ "../../runtime" ] - defines = [ "DART_SHARED_LIB" ] - if (is_linux) { - libs = [ "rt" ] - } - - # Force linking of all wasmer symbols. - ldflags = [ "-Wl,--no-as-needed" ] -} - -rust_library("wasmer_lib") { - lib_name = "wasmer" -} diff --git a/third_party/wasmer/Cargo.toml b/third_party/wasmer/Cargo.toml deleted file mode 100644 index a476549e6ff..00000000000 --- a/third_party/wasmer/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "wasmer" -version = "1.0.0-alpha5" - -[lib] -name = "wasmer" -crate-type = ["staticlib"] -path = "wasmer.rs" - -[dependencies.wasmer-c-api] -version = "1.0.0-alpha5" -default-features = false -features = ["jit", "cranelift", "wasi"] diff --git a/third_party/wasmer/LICENSE b/third_party/wasmer/LICENSE deleted file mode 100644 index 62bb543eb9e..00000000000 --- a/third_party/wasmer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019-present Wasmer, Inc. and its affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third_party/wasmer/finalizers.cc b/third_party/wasmer/finalizers.cc deleted file mode 100644 index 85d52869ad9..00000000000 --- a/third_party/wasmer/finalizers.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#include "include/dart_api.h" -#include "include/dart_api_dl.h" - -#define FINALIZER(type) \ - extern "C" void wasm_##type##_delete(void*); \ - extern "C" void wasm_##type##_finalizer(void*, void* native_object) { \ - wasm_##type##_delete(native_object); \ - } \ - DART_EXPORT void set_finalizer_for_##type(Dart_Handle dart_object, \ - void* native_object) { \ - Dart_NewFinalizableHandle_DL(dart_object, native_object, 0, \ - wasm_##type##_finalizer); \ - } - -FINALIZER(engine); -FINALIZER(store); -FINALIZER(module); -FINALIZER(instance); -FINALIZER(trap); -FINALIZER(memorytype); -FINALIZER(memory); -FINALIZER(func); diff --git a/third_party/wasmer/wasmer.rs b/third_party/wasmer/wasmer.rs deleted file mode 100644 index c4bd6e5fcca..00000000000 --- a/third_party/wasmer/wasmer.rs +++ /dev/null @@ -1 +0,0 @@ -pub extern crate wasmer_c_api;