Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

ci: add missing default and release routing features and add makefile command to build wasm (#3107)

Shanks9d010b14df24
diff --git a/Makefile b/Makefile
index 9b62b3c5c9..780d5a993c 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,10 @@
eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\
$(findstring $(2),$(1))),1)
+
+ROOT_DIR_WITH_SLASH := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+ROOT_DIR := $(realpath $(ROOT_DIR_WITH_SLASH))
+
#
# = Targets
#
@@ -67,6 +71,14 @@ fmt :
clippy :
cargo clippy --all-features --all-targets -- -D warnings
+# Build the DSL crate as a WebAssembly JS library
+#
+# Usage :
+# make euclid-wasm
+
+euclid-wasm:
+ wasm-pack build --target web --out-dir $(ROOT_DIR)/wasm --out-name euclid $(ROOT_DIR)/crates/euclid_wasm -- --features dummy_connector
+
# Run Rust tests of project.
#
# Usage :
@@ -93,4 +105,4 @@ precommit : fmt clippy test
hack:
- cargo hack check --workspace --each-feature --all-targets
\ No newline at end of file
+ cargo hack check --workspace --each-feature --all-targets
diff --git a/crates/euclid_wasm/Cargo.toml b/crates/euclid_wasm/Cargo.toml
index 8c96a7f67d..51288a9d0f 100644
--- a/crates/euclid_wasm/Cargo.toml
+++ b/crates/euclid_wasm/Cargo.toml
@@ -11,6 +11,7 @@ crate-type = ["cdylib"]
[features]
default = ["connector_choice_bcompat"]
+release = ["connector_choice_bcompat", "connector_choice_mca_id"]
connector_choice_bcompat = ["api_models/connector_choice_bcompat"]
connector_choice_mca_id = ["api_models/connector_choice_mca_id", "euclid/connector_choice_mca_id", "kgraph_utils/connector_choice_mca_id"]
dummy_connector = ["kgraph_utils/dummy_connector"]
diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml
index b2f7f8b94a..13324aa59a 100644
--- a/crates/router/Cargo.toml
+++ b/crates/router/Cargo.toml
@@ -9,14 +9,14 @@ readme = "README.md"
license.workspace = true
[features]
-default = ["kv_store", "stripe", "oltp", "olap", "backwards_compatibility", "accounts_cache", "dummy_connector", "payouts", "profile_specific_fallback_routing", "retry", "frm"]
+default = ["kv_store", "stripe", "oltp", "olap", "backwards_compatibility", "accounts_cache", "dummy_connector", "payouts", "business_profile_routing", "connector_choice_mca_id", "profile_specific_fallback_routing", "retry", "frm"]
s3 = ["dep:aws-sdk-s3", "dep:aws-config"]
kms = ["external_services/kms", "dep:aws-config"]
email = ["external_services/email", "dep:aws-config", "olap"]
frm = []
basilisk = ["kms"]
stripe = ["dep:serde_qs"]
-release = ["kms", "stripe", "basilisk", "s3", "email", "business_profile_routing", "accounts_cache", "kv_store", "profile_specific_fallback_routing"]
+release = ["kms", "stripe", "basilisk", "s3", "email", "business_profile_routing", "accounts_cache", "kv_store", "connector_choice_mca_id", "profile_specific_fallback_routing"]
olap = ["data_models/olap", "storage_impl/olap", "scheduler/olap", "dep:analytics"]
oltp = ["storage_impl/oltp"]
kv_store = ["scheduler/kv_store"]