Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 12 additions & 1 deletion .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ env:
PYTHON_VERSION: '3.14'
FLAKY_TESTS: keep_retrying
CLANG_VERSION: '19'
RUSTC_VERSION: '1.85'

permissions:
contents: read

jobs:
build-tarball:
if: github.event.pull_request.draft == false
runs-on: ubuntu-slim
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand All @@ -82,6 +83,11 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
allow-prereleases: true
- name: Install Rust ${{ env.RUSTC_VERSION }}
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
rustup override set "$RUSTC_VERSION"
rustup --version
- name: Environment Information
run: npx envinfo
- name: Make tarball
Expand Down Expand Up @@ -114,6 +120,11 @@ jobs:
uses: ./.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}
- name: Install Rust ${{ env.RUSTC_VERSION }}
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
rustup override set "$RUSTC_VERSION"
rustup --version
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:
CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19
SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
SCCACHE_IDLE_TIMEOUT: '0'
RUSTC_VERSION: '1.82'
RUSTC_VERSION: '1.85'

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ env:
PYTHON_VERSION: '3.14'
XCODE_VERSION: '16.4'
FLAKY_TESTS: keep_retrying
RUSTC_VERSION: '1.82'
RUSTC_VERSION: '1.85'

permissions:
contents: read
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/test-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ concurrency:

env:
FLAKY_TESTS: keep_retrying
RUSTC_VERSION: '1.85'

permissions:
contents: read
Expand All @@ -112,13 +113,19 @@ jobs:
build-tarball:
if: github.event.pull_request.draft == false
name: ${{ github.event_name == 'workflow_dispatch' && 'Skipped job' || 'Build slim tarball' }}
runs-on: ubuntu-slim
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
persist-credentials: false

- name: Install Rust ${{ env.RUSTC_VERSION }}
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
rustup override set "$RUSTC_VERSION"
rustup --version

- name: Make tarball
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
Expand Down Expand Up @@ -159,6 +166,12 @@ jobs:
name: tarballs
path: tarballs

- name: Install Rust ${{ env.RUSTC_VERSION }}
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
rustup override set "$RUSTC_VERSION"
rustup --version

- name: Extract tarball
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
Expand Down
2 changes: 2 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ Consult previous versions of this document for older versions of Node.js:
### Prerequisites

* [A supported version of Python][Python versions] for building and testing.
* A Rust toolchain (`rustc` >= 1.85, `cargo` >= 1.85) for compiling native
dependencies. See <https://rustup.rs/> for installation instructions.
Comment on lines +235 to +236
Copy link
Contributor

Choose a reason for hiding this comment

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

Other dependency needs are not only listed at the top level, there are also explicit instructions given for each operating system. These explicit instructions per operating system for Rust are missing here.

* Memory: at least 8GB of RAM is typically required when compiling with 4 parallel jobs (e.g: `make -j4`)

### Unix and macOS
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,6 @@ ifeq ($(SKIP_SHARED_DEPS), 1)
$(RM) -r $(TARNAME)/deps/ada
$(RM) -r $(TARNAME)/deps/brotli
$(RM) -r $(TARNAME)/deps/cares
$(RM) -r $(TARNAME)/deps/crates
$(RM) -r $(TARNAME)/deps/googletest
$(RM) -r $(TARNAME)/deps/histogram
$(RM) -r $(TARNAME)/deps/icu-small
Expand Down
48 changes: 30 additions & 18 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,12 @@
default=False,
help='node will load builtin modules from disk instead of from binary')

parser.add_argument('--output-transpiled-ts',
action='store',
dest='output_transpiled_ts',
default='',
help='write transpiled TypeScript output to the given directory for debugging')

parser.add_argument('--node-snapshot-main',
action='store',
dest='node_snapshot_main',
Expand Down Expand Up @@ -1535,23 +1541,24 @@ def check_compiler(o):

o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0'

# cargo and rustc are needed for Temporal.
if options.v8_enable_temporal_support and not options.shared_temporal_capi:
# Minimum cargo and rustc versions should match values in BUILDING.md.
min_cargo_ver_tuple = (1, 82)
min_rustc_ver_tuple = (1, 82)
cargo_ver = get_cargo_version('cargo')
print_verbose(f'Detected cargo: {cargo_ver}')
cargo_ver_tuple = tuple(map(int, cargo_ver.split('.')))
if cargo_ver_tuple < min_cargo_ver_tuple:
warn(f'cargo {cargo_ver} too old, need cargo {".".join(map(str, min_cargo_ver_tuple))}')
# cargo supports RUSTC environment variable to override "rustc".
rustc = os.environ.get('RUSTC', 'rustc')
rustc_ver = get_rustc_version(rustc)
print_verbose(f'Detected rustc (RUSTC={rustc}): {rustc_ver}')
rust_ver_tuple = tuple(map(int, rustc_ver.split('.')))
if rust_ver_tuple < min_rustc_ver_tuple:
warn(f'rustc {rustc_ver} too old, need rustc {".".join(map(str, min_rustc_ver_tuple))}')
# cargo and rustc are always required:
# - SWC (deps/crates) is used by js2c to transpile TypeScript builtins.
# - Temporal (when enabled) also builds from deps/crates.
# Minimum cargo and rustc versions should match values in BUILDING.md.
min_cargo_ver_tuple = (1, 85)
min_rustc_ver_tuple = (1, 85)
cargo_ver = get_cargo_version('cargo')
print_verbose(f'Detected cargo: {cargo_ver}')
cargo_ver_tuple = tuple(map(int, cargo_ver.split('.')))
if cargo_ver_tuple < min_cargo_ver_tuple:
warn(f'cargo {cargo_ver} too old, need cargo {".".join(map(str, min_cargo_ver_tuple))}')
# cargo supports RUSTC environment variable to override "rustc".
rustc = os.environ.get('RUSTC', 'rustc')
rustc_ver = get_rustc_version(rustc)
print_verbose(f'Detected rustc (RUSTC={rustc}): {rustc_ver}')
rust_ver_tuple = tuple(map(int, rustc_ver.split('.')))
if rust_ver_tuple < min_rustc_ver_tuple:
warn(f'rustc {rustc_ver} too old, need rustc {".".join(map(str, min_rustc_ver_tuple))}')

# Need xcode_version or gas_version when openssl asm files are compiled.
if options.without_ssl or options.openssl_no_asm or options.shared_openssl:
Expand Down Expand Up @@ -1737,7 +1744,7 @@ def gcc_version_ge(version_checked):
return True

def configure_node_lib_files(o):
o['variables']['node_library_files'] = SearchFiles('lib', 'js')
o['variables']['node_library_files'] = SearchFiles('lib', 'js') + SearchFiles('lib', 'ts')

def configure_node_cctest_sources(o):
o['variables']['node_cctest_sources'] = [ 'src/node_snapshot_stub.cc' ] + \
Expand Down Expand Up @@ -1976,6 +1983,11 @@ def configure_node(o):
print('Warning! Loading builtin modules from disk is for development')
o['variables']['node_builtin_modules_path'] = options.node_builtin_modules_path

if options.output_transpiled_ts:
o['variables']['output_transpiled_ts'] = os.path.abspath(options.output_transpiled_ts)
else:
o['variables']['output_transpiled_ts'] = ''

def configure_napi(output):
version = getnapibuildversion.get_napi_version()
output['variables']['napi_build_version'] = version
Expand Down
Loading
Loading