Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- vite
- cli
- postcss
- workers

# Exclude windows and macos from being built on feature branches
on-main-branch:
Expand Down
2 changes: 2 additions & 0 deletions crates/node/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ linker = "arm-linux-gnueabihf-gcc"
rustflags = ["-C", "target-feature=+crt-static"]
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.'cfg(target_env = "gnu")']
rustflags = ["-C", "link-args=-Wl,-z,nodelete"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to do this way b/c we only pass compiler flags for Musl which isn't affected by this rust bug

32 changes: 32 additions & 0 deletions integrations/workers/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { js, json, test } from '../utils'

test(
'@tailwindcss/oxide can be loaded into a Node.js worker thread',
{
fs: {
'package.json': json`
{
"dependencies": {
"@tailwindcss/oxide": "workspace:^"
}
}
`,
'start.js': js`
let { Worker } = require('worker_threads')
new Worker('./worker.js')
`,
'worker.js': js`
require('@tailwindcss/oxide')
process.on('exit', () => console.log('worker thread exited'))
`,
},
},
async ({ exec, expect }) => {
let output = await exec('node ./start.js').then(
(out) => out.trim(),
(err) => `${err}`,
)

expect(output).toEqual('worker thread exited')
},
)
2 changes: 2 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"./build.rs",
"./package.json",
"./Cargo.toml",
"./.cargo/config.toml",
"../oxide/src/**/*",
"../oxide/Cargo.toml",
"../Cargo.toml",
Expand All @@ -24,6 +25,7 @@
"./build.rs",
"./package.json",
"./Cargo.toml",
"./.cargo/config.toml",
"../oxide/src/**/*",
"../oxide/Cargo.toml",
"../Cargo.toml",
Expand Down