Skip to content

Commit

Permalink
cargo(build): expose tls for next-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Dec 16, 2022
1 parent 9e71640 commit ca191f3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ jobs:
# next-swc/core
cargo check -p next-binding --features __swc_core_next_core,__swc_core_binding_napi_plugin,__swc_core_testing_transform,__swc_testing,__swc_transform_styled_components,__swc_transform_styled_jsx,__swc_transform_emotion,__swc_transform_modularize_imports
# next-swc/napi
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__turbo_next_dev_server,__turbo_node_file_trace,__feature_mdx_rs
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__turbo_next_dev_server,__turbo_node_file_trace,__feature_mdx_rs,__turbo_native_tls
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__turbo_next_dev_server,__turbo_node_file_trace,__feature_mdx_rs,__turbo_rustls_tls
# next-swc/wasm
cargo check -p next-binding --features __swc_core_binding_wasm,__swc_core_binding_wasm_plugin,__feature_mdx_rs --target wasm32-unknown-unknown
Expand Down Expand Up @@ -637,12 +638,19 @@ jobs:
args: build --release -p node-file-trace -p next-dev --target ${{ matrix.os.target }}
if: matrix.os.target == 'x86_64-pc-windows-msvc'

- name: Build next-dev
- name: Build next-dev (native-tls)
uses: actions-rs/cargo@v1
with:
command: build
args: --release -p next-dev --target ${{ matrix.os.target }}
if: matrix.os.target != 'x86_64-pc-windows-msvc'
if: matrix.os.target != 'x86_64-pc-windows-msvc' && matrix.os.target != 'x86_64-unknown-linux-musl'

- name: Build next-dev (rustls-tls)
uses: actions-rs/cargo@v1
with:
command: build
args: --release -p next-dev --target ${{ matrix.os.target }} --no-default-features --features custom_allocator,rustls-tls
if: matrix.os.target == 'x86_64-unknown-linux-musl'

- uses: actions/upload-artifact@v3
with:
Expand Down
9 changes: 8 additions & 1 deletion crates/next-binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ __turbo = []
__turbo_next_dev_server = ["__turbo", "next-dev/serializable"]
__turbo_node_file_trace = ["__turbo", "node-file-trace/node-api"]

# set tls for downstream dependenices of turbo
__turbo_native_tls = ["next-dev/native-tls"]
__turbo_rustls_tls = ["next-dev/rustls-tls"]

__features = []
__feature_mdx_rs = ["__features", "mdxjs/serializable"]

Expand All @@ -98,7 +102,10 @@ __swc_testing = ["__swc", "testing"]
[dependencies]
mdxjs = { optional = true, workspace = true }
modularize_imports = { optional = true, workspace = true }
next-dev = { optional = true, workspace = true }
# TODO: Not sure what's going on, but using `workspace = true` noops `default-features = false`?
next-dev = { optional = true, path = "../next-dev", version = "0.1.0", default-features = false, features = [
"custom_allocator",
] }
node-file-trace = { optional = true, workspace = true }
styled_components = { optional = true, workspace = true }
styled_jsx = { optional = true, workspace = true }
Expand Down

0 comments on commit ca191f3

Please sign in to comment.