Files
Darren Schroeder d88d4fe0e1 Faster startup: chained fixups on Apple silicon, a cheaper banner, and async prompt pushes that survive (#19236)
## Description

Three independent changes make the REPL ready to type into sooner. With
the default config, launching `nu` until the first prompt is drawn drops
from 15.7 ms to 13.1 ms (−17%). `$nu.startup-time` is measured the same
way as before.

Measurements:
| default config, from `~` | main | this PR |
| --- | --- | --- |
| launch to first prompt | 15.70 ms | 13.10 ms |
| `$nu.startup-time` | 8.03 ms | 7.36 ms |
| instructions retired by the first prompt | 149.3M | 119.8M |


1. Change the linker on Apple silicon to
`"cargo:rustc-link-arg-bins=-Wl,-fixup_chains"`
2. Make `banner` cheaper (all architectures)
3. Keep prompt pushes that land before the prompt is rebuilt (all
architectures)

## User-facing changes (Release notes)

- Improved startup time. On Apple silicon Macs, `nu` is now linked with
chained fixups, so less work happens before Nushell's own code starts
and each `nu` process uses about 3 MiB less memory. The startup banner
no longer computes the welcome message when it only prints the startup
time.
- `date to-timezone` (all architectures) now accepts IANA time zone
names in any letter case, for example `date now | date to-timezone
america/new_york`. Before, some lowercase names were rejected as
invalid.
- Background jobs that update the prompt with `commandline set-prompt`
(all architectures), started from a `pre_prompt` or `env_change` hook or
from a prompt closure such as `$env.PROMPT_COMMAND`, no longer lose that
update when they finish before the prompt is drawn. A `commandline
set-prompt` called directly inside one of those hooks or prompt closures
now also shows on that prompt, in place of the value the prompt
variables give that segment. Before, the prompt evaluation that follows
the hooks always replaced it.


## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-10-14 16:15:25 -05:00
..

run the scripts

Note


the following table must be read as follows:

  • an x means it works
  • a ? means no data available

.nu scripts must be run as nu .../foo.nu
.sh scripts must be run as ./.../foo.sh
.ps1 scripts must be run as powershell .../foo.ps1

let's say a script is called foo

  • an x in the ./scripts column means foo can be run from ./scripts
  • an x in the root column means foo can be run from the root of nushell
  • an x in the anywhere column means foo can be run from anywhere!
script ./scripts/ root anywhere
build-all-maclin.sh x x x
build-all-windows.cmd ? x ?
build-all.nu x x x
coverage-local.nu x x x
coverage-local.sh x x x
install-all.ps1 ? x ?
install-all.sh x x x
uninstall-all.sh x x x