René's URL Explorer Experiment


Title: sea: generate single executable directly with Node.js binary by joyeecheung · Pull Request #61167 · nodejs/node · GitHub

Open Graph Title: sea: generate single executable directly with Node.js binary by joyeecheung · Pull Request #61167 · nodejs/node

X Title: sea: generate single executable directly with Node.js binary by joyeecheung · Pull Request #61167 · nodejs/node

Description: For reviewers: the bulk of the core changes are in the commit sea: add --build-sea to generate SEA directly with Node.js binary; The dependency updating tools and license updates are in deps: add tools and scripts to pull LIEF as a dependency. The rest are mostly refactoring and pulling LIEF using the script added in the previous commit. Instead of relying on a WASM build of postject to perform the injection, add LIEF as dependency and generate the SEA directly from core via a new CLI option --build-sea which takes the SEA config. Thi simplifies SEA generation for users and makes it easier to debug/maintain the SEA building process. For the time being, backward compatibility with the postject-based SEA building process will be maintained, until there's motivation to break it (e.g. for optimizations) The new process is simplified to as follows - no more knowledge about the blob location in the binary needed: $ echo 'console.log("Hello")' > hello.js $ echo '{ "main": "hello.js", "output": "sea" }' > sea-config.json $ node --build-sea sea-config.json $ ./sea Hello This idea was discussed a while back (brought up by @marco-ippolito) at the collaboration summit to improve the UX of SEA building process, which currently requires users to use an external tool (i.e. postject) to perform the injection, and know about the layout of the target binary. For most users, the details are probably not very useful. Moving the injection process into core simplifies the process. Bringing it into core may also make it easier to implement some of the ideas brought up back in 2022 that would require close coordination with core to implement (e.g. trimming ICU data post-build to reduce binary size). I've been helping out with the SEA feature from time to time and as I see it, apart from UX improvement, I found the current WASM-based tool somewhat difficult to debug when I was trying to fix #61483. Also, the WASM build is significantly slower than a native build, which adds friction to the debugging process. $ time out/Release/node test/sea/test-single-executable-application.js Copied /Users/joyee/projects/node/out/Release/node to /Users/joyee/projects/node/test/.tmp.0/sea Injected /Users/joyee/projects/node/test/.tmp.0/sea-prep.blob into /Users/joyee/projects/node/test/.tmp.0/sea Signed /Users/joyee/projects/node/test/.tmp.0/sea User time: 5.12s System time: 0.38s CPU time: 90% Total time: 6.06s $ time out/Release/node test/sea/test-build-sea.js Signed /Users/joyee/projects/node/test/.tmp.0/sea User time: 1.79s System time: 0.34s CPU time: 74% Total time: 2.85s At the summit @RaisinTen mentioned one concern about the potential binary size increase. With this POC the binary size is only increased by 5-6 MB on macOS/Linux, and ~3MB on Windows, which seems acceptable (as a reference, this is smaller than the decrease we recently got from compiling V8 with default hidden visibility #56290 (comment)) # Linux $ ls -lah ./node_without_lief ./out/Release/node -rwxr-xr-x 1 developer developer 122M Dec 24 16:50 ./node_without_lief -rwxr-xr-x 1 developer developer 128M Dec 24 16:51 ./out/Release/node # macOS $ ls -lah ./node_without_lief ./out/Release/node -rwxr-xr-x@ 1 joyee staff 125M Dec 24 17:48 ./node_without_lief -rwxr-xr-x@ 1 joyee staff 130M Dec 24 17:48 ./out/Release/node # Windows $ ls -lah out\Release\node.exe .\node_main.exe -rwxr-xr-x 1 joyee 197121 87M Jan 1 19:29 '.\node_main.exe' -rwxr-xr-x 1 joyee 197121 90M Jan 1 19:42 'out\Release\node.exe' In addition, I think the LIEF library may also be useful for other purposes e.g. demangling the names in the V8 prof profiles, which is a current bottleneck when trying to analyze logs via --prof-process by calling out to nm and c++filt. Commits test: use fixture directories for sea tests Instead of copying and writing files on the fly for SEA tests, put the fixtures into a directory and copy them into tmpdir for testing. This allows easier reproduction and debugging when they do fail - we can just copy the entire fixture directory and test directly from there. deps: add tools and scripts to pull LIEF as a dependency deps: add LIEF as a dependency sea: split sea binary manipulation code Split the sea binary manipulation code to a seperate file so that adding more low-level binary manipulation code doesn't clobber the higher-level code. sea: add --build-sea to generate SEA directly with Node.js binary Instead of relying on a WASM build of postject to perform the injection, add LIEF as dependency and generate the SEA directly from core via a new CLI option --build-sea which takes the SEA config. This simplifies SEA generation for users and makes it easier to debug/maintain the SEA building process. test: migrate to --build-sea in existing SEA tests Only leave a smoking test for the postject-based workflow in test-single-executable-application.js

Open Graph Description: For reviewers: the bulk of the core changes are in the commit sea: add --build-sea to generate SEA directly with Node.js binary; The dependency updating tools and license updates are in deps: add t...

X Description: For reviewers: the bulk of the core changes are in the commit sea: add --build-sea to generate SEA directly with Node.js binary; The dependency updating tools and license updates are in deps: add t...

Opengraph URL: https://github.com/nodejs/node/pull/61167

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ed8f18ed-fd4e-ffcb-dfc8-3ab6c12b180c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8B14:2C345B:1B7084:244846:6A4C245A
html-safe-nonce9c18a5a7300a65fd82a1cbd3f2b0fa6ebcb3cb493e644a7479bc077b3e808b06
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjE0OjJDMzQ1QjoxQjcwODQ6MjQ0ODQ2OjZBNEMyNDVBIiwidmlzaXRvcl9pZCI6IjY4MzA2NTA2MjQyMzQ0OTcxMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0a6a12c62f92477af689b35bf176ff75b5a824437aec7ebc1b1a00d61a2c8e6f
hovercard-subject-tagpull_request:3128991624
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/61167/files
twitter:imagehttps://avatars.githubusercontent.com/u/4299420?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4299420?s=400&v=4
og:image:altFor reviewers: the bulk of the core changes are in the commit sea: add --build-sea to generate SEA directly with Node.js binary; The dependency updating tools and license updates are in deps: add t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9ee13484b32cf23e15fde191da4c9aa47d41201c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/61167/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F61167%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F61167%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/61167/files
Reloadhttps://github.com/nodejs/node/pull/61167/files
Reloadhttps://github.com/nodejs/node/pull/61167/files
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 967 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
joyeecheunghttps://github.com/joyeecheung
nodejs:mainhttps://github.com/nodejs/node/tree/main
joyeecheung:build-seahttps://github.com/joyeecheung/node/tree/build-sea
Conversation 22 https://github.com/nodejs/node/pull/61167
Commits 6 https://github.com/nodejs/node/pull/61167/commits
Checks 60 https://github.com/nodejs/node/pull/61167/checks
Files changed https://github.com/nodejs/node/pull/61167/files
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
sea: generate single executable directly with Node.js binary https://github.com/nodejs/node/pull/61167/files#top
Show all changes 6 commits https://github.com/nodejs/node/pull/61167/files
20b62ff test: use fixture directories for sea tests joyeecheung Jan 1, 2026 https://github.com/nodejs/node/pull/61167/commits/20b62ff488af5fac547931ed73cf07cbff286ff9
01f335d deps: add tools and scripts to pull LIEF as a dependency joyeecheung Dec 22, 2025 https://github.com/nodejs/node/pull/61167/commits/01f335d9680dc6c8c58455f675c7f3c1a4b6ae19
d82ae9e deps: add LIEF as a dependency joyeecheung Dec 22, 2025 https://github.com/nodejs/node/pull/61167/commits/d82ae9ee5c5540b33a5f49503da9e85b791e9f06
320b2d2 sea: split sea binary manipulation code joyeecheung Dec 22, 2025 https://github.com/nodejs/node/pull/61167/commits/320b2d2b49bf39cbef2f26f59ec7339f8365093b
b935a39 sea: add --build-sea to generate SEA directly with Node.js binary joyeecheung Dec 23, 2025 https://github.com/nodejs/node/pull/61167/commits/b935a3970bd141a272e829b54ecde0f990f07eb1
6eaf1b8 test: migrate to --build-sea in existing SEA tests joyeecheung Jan 2, 2026 https://github.com/nodejs/node/pull/61167/commits/6eaf1b85edbd9721788e8cbb1124a5faa4bce133
Clear filters https://github.com/nodejs/node/pull/61167/files
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
.github/CODEOWNERShttps://github.com/nodejs/node/pull/61167/files#diff-3d36a1bf06148bc6ba1ce2ed3d19de32ea708d955fed212c0d27c536f0bd4da7
View file https://github.com/joyeecheung/node/blob/6eaf1b85edbd9721788e8cbb1124a5faa4bce133/.github/CODEOWNERS
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61167/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61167/files#diff-3d36a1bf06148bc6ba1ce2ed3d19de32ea708d955fed212c0d27c536f0bd4da7
https://github.com/nodejs/node/pull/61167/files#diff-3d36a1bf06148bc6ba1ce2ed3d19de32ea708d955fed212c0d27c536f0bd4da7
.gitignorehttps://github.com/nodejs/node/pull/61167/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
View file https://github.com/joyeecheung/node/blob/6eaf1b85edbd9721788e8cbb1124a5faa4bce133/.gitignore
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61167/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61167/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
https://github.com/nodejs/node/pull/61167/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
LICENSEhttps://github.com/nodejs/node/pull/61167/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7
View file https://github.com/joyeecheung/node/blob/6eaf1b85edbd9721788e8cbb1124a5faa4bce133/LICENSE
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61167/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61167/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7
https://github.com/nodejs/node/pull/61167/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7
https://github.com/nodejs/node/pull/61167/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7
https://github.com/nodejs/node/pull/61167/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7
configure.pyhttps://github.com/nodejs/node/pull/61167/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c
View file https://github.com/joyeecheung/node/blob/6eaf1b85edbd9721788e8cbb1124a5faa4bce133/configure.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61167/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61167/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c
https://github.com/nodejs/node/pull/61167/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c
https://github.com/nodejs/node/pull/61167/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c
https://github.com/nodejs/node/pull/61167/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
Please reload this pagehttps://github.com/nodejs/node/pull/61167/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.