Skip to content

Commit

Permalink
ci: add missing default and release routing features and add makefile…
Browse files Browse the repository at this point in the history
… command to build wasm (#3107)
  • Loading branch information
vspecky authored Dec 12, 2023
1 parent e1e23fd commit 9d010b1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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 :
Expand All @@ -93,4 +105,4 @@ precommit : fmt clippy test


hack:
cargo hack check --workspace --each-feature --all-targets
cargo hack check --workspace --each-feature --all-targets
1 change: 1 addition & 0 deletions crates/euclid_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions crates/router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 9d010b1

Please sign in to comment.