Skip to content

Commit d3820c5

Browse files
authoredDec 17, 2022
cargo(build): expose tls for next-binding (vercel#3040)
1 parent 9e71640 commit d3820c5

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed
 

‎.github/workflows/test.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ jobs:
322322
# next-swc/core
323323
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
324324
# next-swc/napi
325-
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
325+
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
326+
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
326327
# next-swc/wasm
327328
cargo check -p next-binding --features __swc_core_binding_wasm,__swc_core_binding_wasm_plugin,__feature_mdx_rs --target wasm32-unknown-unknown
328329
@@ -637,12 +638,19 @@ jobs:
637638
args: build --release -p node-file-trace -p next-dev --target ${{ matrix.os.target }}
638639
if: matrix.os.target == 'x86_64-pc-windows-msvc'
639640

640-
- name: Build next-dev
641+
- name: Build next-dev (native-tls)
641642
uses: actions-rs/cargo@v1
642643
with:
643644
command: build
644645
args: --release -p next-dev --target ${{ matrix.os.target }}
645-
if: matrix.os.target != 'x86_64-pc-windows-msvc'
646+
if: matrix.os.target != 'x86_64-pc-windows-msvc' && matrix.os.target != 'x86_64-unknown-linux-musl'
647+
648+
- name: Build next-dev (rustls-tls)
649+
uses: actions-rs/cargo@v1
650+
with:
651+
command: build
652+
args: --release -p next-dev --target ${{ matrix.os.target }} --no-default-features --features cli,custom_allocator,rustls-tls
653+
if: matrix.os.target == 'x86_64-unknown-linux-musl'
646654

647655
- uses: actions/upload-artifact@v3
648656
with:
@@ -883,7 +891,10 @@ jobs:
883891
pnpm install
884892
pnpm run build
885893
886-
- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
894+
- run: |
895+
pnpm i -g playwright-chromium@1.29.0
896+
pnpx playwright install --with-deps
897+
pnpx playwright install-deps
887898
timeout-minutes: 15
888899
889900
- run: npx @replayio/playwright install chromium

‎crates/next-binding/Cargo.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ __turbo = []
7777
__turbo_next_dev_server = ["__turbo", "next-dev/serializable"]
7878
__turbo_node_file_trace = ["__turbo", "node-file-trace/node-api"]
7979

80+
# set tls for downstream dependenices of turbo
81+
__turbo_native_tls = ["next-dev/native-tls"]
82+
__turbo_rustls_tls = ["next-dev/rustls-tls"]
83+
8084
__features = []
8185
__feature_mdx_rs = ["__features", "mdxjs/serializable"]
8286

@@ -98,7 +102,10 @@ __swc_testing = ["__swc", "testing"]
98102
[dependencies]
99103
mdxjs = { optional = true, workspace = true }
100104
modularize_imports = { optional = true, workspace = true }
101-
next-dev = { optional = true, workspace = true }
105+
# TODO: Not sure what's going on, but using `workspace = true` noops `default-features = false`?
106+
next-dev = { optional = true, path = "../next-dev", version = "0.1.0", default-features = false, features = [
107+
"custom_allocator",
108+
] }
102109
node-file-trace = { optional = true, workspace = true }
103110
styled_components = { optional = true, workspace = true }
104111
styled_jsx = { optional = true, workspace = true }

0 commit comments

Comments
 (0)
Please sign in to comment.