From 6cf487c6b836bb61b93b2a2fe585a9a57afa846a Mon Sep 17 00:00:00 2001 From: "M.Amin Rayej" Date: Thu, 7 Nov 2024 01:01:15 +0330 Subject: [PATCH] add make target for building wasmer api for js as cdylib --- Makefile | 3 +++ lib/api/src/lib.rs | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4f625e9499b..2304081a8b3 100644 --- a/Makefile +++ b/Makefile @@ -404,6 +404,9 @@ build-wasmer-wasmi: build-wasmer-jsc: $(CARGO_BINARY) build $(CARGO_TARGET_FLAG) --release --manifest-path lib/cli/Cargo.toml --no-default-features --features="jsc,wat" --bin wasmer --locked +build-wasmer-api-js: + $(CARGO_BINARY) rustc --target wasm32-unknown-unknown --release --manifest-path lib/api/Cargo.toml --no-default-features --features "js, js-default, wasm-types-polyfill, enable-serde" --crate-type=cdylib --locked + build-wasmer-debug: $(CARGO_BINARY) build $(CARGO_TARGET_FLAG) --manifest-path lib/cli/Cargo.toml $(compiler_features) --bin wasmer --locked diff --git a/lib/api/src/lib.rs b/lib/api/src/lib.rs index ec69685a6d4..52b13c18e64 100644 --- a/lib/api/src/lib.rs +++ b/lib/api/src/lib.rs @@ -19,8 +19,6 @@ clippy::unicode_not_nfc, clippy::use_self )] -#![allow(deprecated_cfg_attr_crate_type_name)] -#![cfg_attr(feature = "js", crate_type = "cdylib")] //! [`Wasmer`](https://wasmer.io/) is the most popular //! [WebAssembly](https://webassembly.org/) runtime for Rust. It supports