René's URL Explorer Experiment


Title: Register pslua as a first-class Spago backend (`--run`) + docs on the published set by Unisay · Pull Request #119 · purescript-lua/purescript-lua · GitHub

Open Graph Title: Register pslua as a first-class Spago backend (`--run`) + docs on the published set by Unisay · Pull Request #119 · purescript-lua/purescript-lua

X Title: Register pslua as a first-class Spago backend (`--run`) + docs on the published set by Unisay · Pull Request #119 · purescript-lua/purescript-lua

Description: Part of #117. Makes pslua usable as a real Spago backend so spago build and spago run target Lua directly, and updates the docs to the new spago.yaml form. What Spago's backend contract actually is I measured it empirically with a throwaway project pointed at the published Lua set. With a workspace.backend configured, Spago compiles to CoreFn and then runs the backend command: spago build runs pslua once. This already worked with no code change: pslua reads the corefn from --ps-output, and foreign .lua is resolved next to each module's source path recorded in the corefn (modulePath), so dependency FFI living in .spago/** is found automatically. --foreign-path is only a secondary fallback, not the primary lookup. spago run runs the build phase and then invokes the backend a second time as pslua --run ., without the build-phase args. pslua had no --run, so the run phase failed with Invalid option --run even though the build succeeded. The change Add a --run ENTRY flag. It compiles the given application entry point, writes the linked chunk to a temp file, executes it with lua, and forwards lua's exit code. The execution lives in Language.PureScript.Backend.Lua.Run.runChunk, with a regression test that pins exit-code propagation (os.exit(3) must surface as ExitFailure 3, not be swallowed). --run overrides --entry, matching the run phase that passes only --run. The progress line is suppressed in run mode so a program's own stdout stays clean when piped. Docs README.md: the legacy spago.dhall backend snippet is replaced with the spago.yaml form (workspace.packageSet.url at the published set plus workspace.backend), and a note on what spago build vs spago run do. CLAUDE.md: documents the backend contract, the --run round-trip, and the foreign-resolution rule. Out of scope Migrating the template and example repos to the new spago.yaml is the other half of #117 and lands separately (those are direct pushes to their own repos). Library forks stay on the per-module manual pslua calls in scripts/build: a single backend command can only produce one entry point, which fits applications, not multi-module libraries. Testing Full suite green (316 examples, 0 failures; the 2 new ones are the runChunk regression tests). No golden churn: codegen is untouched, so the .ir/.lua/eval goldens are unchanged. spago run verified end-to-end against the published set: build links dist/Main.lua, run prints the program output and exits 0.

Open Graph Description: Part of #117. Makes pslua usable as a real Spago backend so spago build and spago run target Lua directly, and updates the docs to the new spago.yaml form. What Spago's backend contract actuall...

X Description: Part of #117. Makes pslua usable as a real Spago backend so spago build and spago run target Lua directly, and updates the docs to the new spago.yaml form. What Spago's backend contract act...

Opengraph URL: https://github.com/purescript-lua/purescript-lua/pull/119

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f729661d-bfaf-5784-8265-56c9780b7392
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEACA:29AEE8:8D26EB:BE1D85:6B00E4AB
html-safe-nonce4e7e37c6a2fed1bf5ac9d961d82938518dec5691e04a794029d9c68ed724e3e6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUNBOjI5QUVFODo4RDI2RUI6QkUxRDg1OjZCMDBFNEFCIiwidmlzaXRvcl9pZCI6IjQ1NDM2NjM2MjUyNjg2ODM5NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace2e3a51bc049171b38c7bc15086e35f154c9c928f9fa9562132cce604541e0e4
hovercard-subject-tagpull_request:3927989948
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/purescript-lua/purescript-lua/pull/119/files
twitter:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
og:image:altPart of #117. Makes pslua usable as a real Spago backend so spago build and spago run target Lua directly, and updates the docs to the new spago.yaml form. What Spago's backend contract actuall...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git
octolytics-dimension-user_id131581790
octolytics-dimension-user_loginpurescript-lua
octolytics-dimension-repository_id587200487
octolytics-dimension-repository_nwopurescript-lua/purescript-lua
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id587200487
octolytics-dimension-repository_network_root_nwopurescript-lua/purescript-lua
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
release624179fb8b88d26ba5bba08894eb60a1c5a1d93d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua/pull/119/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F119%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F119%2Ffiles
Sign uphttps://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=purescript-lua%2Fpurescript-lua
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/119/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/119/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/119/files
purescript-luahttps://github.com/purescript-lua
purescript-luahttps://github.com/purescript-lua/purescript-lua
Codehttps://github.com/purescript-lua/purescript-lua
Issues48 (48)https://github.com/purescript-lua/purescript-lua/issues
Pull requestshttps://github.com/purescript-lua/purescript-lua/pulls
Discussionshttps://github.com/purescript-lua/purescript-lua/discussions
Actionshttps://github.com/purescript-lua/purescript-lua/actions
Projectshttps://github.com/purescript-lua/purescript-lua/projects
Security and qualityhttps://github.com/purescript-lua/purescript-lua/security
Insightshttps://github.com/purescript-lua/purescript-lua/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
Unisayhttps://github.com/Unisay
mainhttps://github.com/purescript-lua/purescript-lua/tree/main
issue-117/spago-backendhttps://github.com/purescript-lua/purescript-lua/tree/issue-117/spago-backend
Conversation 7 https://github.com/purescript-lua/purescript-lua/pull/119
Commits 2 https://github.com/purescript-lua/purescript-lua/pull/119/commits
Checks 2 https://github.com/purescript-lua/purescript-lua/pull/119/checks
Files changed https://github.com/purescript-lua/purescript-lua/pull/119/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/119/files
Register pslua as a first-class Spago backend (--run) + docs on the published set https://github.com/purescript-lua/purescript-lua/pull/119/files#top
Show all changes 2 commits https://github.com/purescript-lua/purescript-lua/pull/119/files
e8b7a53 feat: add a --run flag so pslua works as a first-class Spago backend Unisay Jun 24, 2026 https://github.com/purescript-lua/purescript-lua/pull/119/commits/e8b7a53f02d612bcfeb84fcf842cf8cd85207059
018471e address copilot review on PR #119 Unisay Jun 24, 2026 https://github.com/purescript-lua/purescript-lua/pull/119/commits/018471ea314d1567f284ce5de0ea66aaa2546441
Clear filters https://github.com/purescript-lua/purescript-lua/pull/119/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/119/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/119/files
CLAUDE.md https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
README.md https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
Cli.hs https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-4d7cd81fb4d664287449f8ecf63a15690837520fc472996432d9c0529dcbdd4e
Main.hs https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-0112bebea0de3c81e028aa03d5c02c142338c604573ce86df55f0791de47af36
Run.hs https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-943c074df6f7d7ffd799575c4d55cac604c436f06881a8c007e6cbf5f8d84faa
pslua.cabal https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-aa991a1a8b3a3da4018902e3624644d078a91b5233a36e4ecb33a8252c258184
Main.hs https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-9e8bdd24d557cfe94781d844e68e97f4b626c833420d18df4e04619a54273b34
CLAUDE.mdhttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/CLAUDE.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7
README.mdhttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
exe/Cli.hshttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-4d7cd81fb4d664287449f8ecf63a15690837520fc472996432d9c0529dcbdd4e
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/exe/Cli.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-4d7cd81fb4d664287449f8ecf63a15690837520fc472996432d9c0529dcbdd4e
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-4d7cd81fb4d664287449f8ecf63a15690837520fc472996432d9c0529dcbdd4e
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-4d7cd81fb4d664287449f8ecf63a15690837520fc472996432d9c0529dcbdd4e
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-4d7cd81fb4d664287449f8ecf63a15690837520fc472996432d9c0529dcbdd4e
exe/Main.hshttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-0112bebea0de3c81e028aa03d5c02c142338c604573ce86df55f0791de47af36
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/exe/Main.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-0112bebea0de3c81e028aa03d5c02c142338c604573ce86df55f0791de47af36
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-0112bebea0de3c81e028aa03d5c02c142338c604573ce86df55f0791de47af36
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-0112bebea0de3c81e028aa03d5c02c142338c604573ce86df55f0791de47af36
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-0112bebea0de3c81e028aa03d5c02c142338c604573ce86df55f0791de47af36
lib/Language/PureScript/Backend/Lua/Run.hshttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-943c074df6f7d7ffd799575c4d55cac604c436f06881a8c007e6cbf5f8d84faa
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/lib/Language/PureScript/Backend/Lua/Run.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/119/files
pslua.cabalhttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/pslua.cabal
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-cf0302393cf6443df4429c19c0fc326753a83405d0366075a98ac2753e5e1ab2
test/Language/PureScript/Backend/Lua/Run/Spec.hshttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-aa991a1a8b3a3da4018902e3624644d078a91b5233a36e4ecb33a8252c258184
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/test/Language/PureScript/Backend/Lua/Run/Spec.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
test/Main.hshttps://github.com/purescript-lua/purescript-lua/pull/119/files#diff-9e8bdd24d557cfe94781d844e68e97f4b626c833420d18df4e04619a54273b34
View file https://github.com/purescript-lua/purescript-lua/blob/018471ea314d1567f284ce5de0ea66aaa2546441/test/Main.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/119/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-9e8bdd24d557cfe94781d844e68e97f4b626c833420d18df4e04619a54273b34
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-9e8bdd24d557cfe94781d844e68e97f4b626c833420d18df4e04619a54273b34
https://github.com/purescript-lua/purescript-lua/pull/119/files#diff-9e8bdd24d557cfe94781d844e68e97f4b626c833420d18df4e04619a54273b34
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/119/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.