3 Commits

Author SHA1 Message Date
Philipp Spiess
21c7624bd3
Bring back rust-toolchain.toml (#14585)
We accidentally removed this in #14565.
2024-10-03 14:37:24 +00:00
Robin Malfait
35b84cc313
Improve @tailwindcss/postcss performance for initial builds (#14565)
This PR improves the performance of the `@tailwindcss/postcss` plugin.
Before this change we created 2 compiler instances instead of a single
one. On a project where a `tailwindcss.config.ts` file is used, this
means that the timings look like this:

```
[@tailwindcss/postcss] Setup compiler: 137.525ms
⋮
[@tailwindcss/postcss] Setup compiler: 43.95ms
```

This means that with this small change, we can easily shave of ~50ms for
initial PostCSS builds.

---------

Co-authored-by: Philipp Spiess <hello@philippspiess.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-10-03 16:21:54 +02:00
Philipp Spiess
52f2993069
Pin rust toolchain to work around Windows regression (#14406)
This PR works around a current regression in the Rust toolchain that
caused our Windows workers to start failing with:

```
    Finished `test` profile [unoptimized + debuginfo] target(s) in 32.63s
     Running unittests src\lib.rs (target\debug\deps\tailwind_oxide-ce6a5d43a3798437.exe)
Load Node-API [napi_get_last_error_info] from host runtime failed: GetProcAddress failed
fatal runtime error: thread::set_current should only be called once per thread
Load Node-API [napi_get_uv_event_loop] from host runtime failed: GetProcAddress failed
Load Node-API [napi_fatal_exception] from host runtime failed: GetProcAddress failed
Load Node-API [napi_create_threadsafe_function] from host runtime failed: GetProcAddress failed
error: test failed, to rerun pass `-p tailwind-oxide --lib`
```

The workaround is to pin the rust toolchain version so that the
regression isn't applied when we build on Windows in test mode.
2024-09-12 14:07:43 +02:00