GitShow/facebook/dotslash
facebook

dotslash

Simplified executable deployment

by facebook
Star on GitHubForkWebsite

Rust

895 stars74 forks113 contributorsActive · 4h agoSince 2024v0.5.9Apache-2.0

Meet the team

See all 113 on GitHub →
zertosh
zertosh46 contributions
dependabot[bot]Bot
dependabot[bot]33 contributions
bolinfest
bolinfest17 contributions
sdwilsh
sdwilsh14 contributions
ericweb2
ericweb211 contributions
bigfootjon
bigfootjon10 contributions
cfsmp3
cfsmp39 contributions
diliop
diliop9 contributions

Languages

View on GitHub →
Rust75%
Python15.9%
JavaScript5.9%
Shell1.6%
CSS0.7%
Just0.7%
Other0.1%

Commit activity

Last 12 weeks · 102 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
75
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 4h ago
See all on GitHub →
boxlegs
macOS binaries are not signedOpenIssue

The binaries available for macOS via Homebrew / GitHub Releases are currently distributed without code signing. To reduce risks posed by the execution of untrusted binaries, enterprises environments are beginning to enforce aggressive binary authorisation policies that restrict the execution of unsigned code. Having signed with one of Meta's Developer ID certificates would allow folks to maintain these policies without disrupting engineers' workflows.

boxlegs · 3d ago
dgollahon-plaid
Add LRU cache eviction gated by DOTSLASH_CACHE_MAX_SIZEOpenPR

DotSlash's artifact cache grows without bound as tool versions turn over. See https://github.com/facebook/dotslash/issues/114. This adds an opt-in cap (, e.g. ) that LRU-evicts whole artifact directories after a download. Unset means unbounded; is a cap of zero bytes, not a disable switch. trims to at most SIZE (no hysteresis); bare still wipes. Auto-GC uses an 80% low-water mark so a few later downloads do not immediately re-trigger a walk. The flag is rather than a positional so a later can sit beside it. Cache hits stay cheap: bump the artifact directory mtime (not the executable) and skip all size accounting. Eviction is miss-path only, and only when this process actually installed the artifact (a waiter that finds the download already finished does not double-count usage). A running total () is the gate, so we do not walk the cache on every miss. We walk to validate only when the total exceeds the limit or the file is missing (missing means unknown, never zero). The counter may run high if files vanish out of band; a validate walk heals it and rewrites the true sum. If another process holds the GC lock, auto-GC skips without walking. Invalid env values warn once on stderr and are ignored so they cannot break execution. Eviction renames the artifact out of its hash path before deleting, so a partial delete cannot strand a broken entry that fetch would refuse to replace. Artifacts whose download lock cannot be taken are skipped. Other options considered and deferred: a central catalog or per-artifact size sidecars (unnecessary if the total is the gate); grouping by logical tool name like (the JSON is often versioned, and that policy would not cap total disk); using the manifest field (that is the compressed download, not extracted size); parallel sizing/deletes (easy later, but this path must finish before execv). The just-downloaded artifact is never evicted in that pass. Possible extension points Add a and an flag to clean Parallelize gc run across the walk when it happens Background/make gc run non-blocking/best effort

dgollahon-plaid · 1w ago
bolinfest
Build Windows shim as part of a GitHub release?OpenIssue

Now that https://github.com/facebook/dotslash/pull/46 is in, can the shim be part of the GitHub release so it can be found on e.g. https://github.com/facebook/dotslash/releases And then update the docs to link to it?

bolinfest · 2w ago

Recent fixes

View closed PRs →
ofek
Document support for the new GCS providerMergedPR

https://github.com/facebook/dotslash/pull/104

ofek · 2w ago
ofek
Reduce the size of the Windows shimMergedPR

Summary Reduce both checked-in Windows shim binaries from 4,096 to 2,560 bytes. This also adds a checked-in, generated 69-byte PE stub and exact artifact-size regression tests. Size impact Changes are cumulative; each delta is relative to the preceding row. Overall reduction: 1,536 bytes per binary, or 37.5%. Changes that reduced file size Bounded local UTF-16 copying: -512 bytes Replace and with a single bounded copy loop. This removes two imports and, importantly, brings below a 512-byte file-alignment boundary. It also fixes the previous terminator-boundary overflow: the command buffer now explicitly reserves one UTF-16 code unit for the terminating null. Merge into : -512 bytes Use with LLD. LLD's smaller read-only data layout leaves enough room for the unwind records in the existing allocation. The PE exception directory still points to all five runtime-function records on both architectures. Unlike the rejected experiment, the resulting metadata remains read-only and non-executable. Compact PE stub: -512 bytes Generate and check in a minimal valid 69-byte stub and pass it through . This moves the PE header to offset 72 and allows all PE headers to fit in one 512-byte file-alignment block, reducing from 1,024 to 512 bytes. Changes retained despite no immediate file-size reduction These changes reduced complexity and imports but did not individually cross a file-alignment boundary: Pass directly to , removing . Truncate the final four code units under the documented shim naming contract, removing . Extensionless shims were already nonfunctional: the previous implementation passed the PE executable itself to DotSlash as though it were the manifest, and the removed test asserted that this failed. Unconditional truncation therefore changes only how an incorrectly named shim fails, not any working behavior under the documented contract. Quote the manifest path directly, removing . Locate the raw argument tail with a local quote-state parser, removing . Free the command buffer immediately after . On failure, capture before freeing it so the existing diagnostic remains unchanged. Restoring adds one import but does not change the aligned artifact size. Let process teardown close the child handles, removing . Retain ; it tied without changing the aligned artifact size. Use Rust's bundled ; switching linkers alone tied at 3,584 bytes, but its smaller layout enabled the subsequent safe section merge. Ignore the unused default request with , allowing the CRT-free LLD cross-build. Together, the source cleanups reduce imports from 19 functions across three DLLs to 12 functions from . Resource-cleanup tradeoff All three options produced 2,560-byte binaries: Although restoring both cleanup APIs currently fits within the same aligned file size, restoring only leaves more section headroom for future changes. The section impact is measurable even though every option retains 1,024-byte raw and sections: The selected option therefore recovers 22 bytes of x86-64 , 24 bytes of ARM64 , and 32 bytes of on both architectures compared with restoring both APIs. You can run the following command to confirm: Experiments not retained Emitting each complete diagnostic with one call did not improve the final size. Silent or generic diagnostics, removing differentiated missing-DotSlash handling, and weakening wait-result checks were measured only as lower-bound experiments and reverted to preserve behavior. Leaving the command buffer allocated until process exit removed the import but retained a 65,534-byte heap allocation for the lifetime of every waiting shim. Restoring explicit cleanup did not change the 2,560-byte artifact size, so the removal was reverted. A static command buffer removed two imports but tied in total size while adding a writable section. and the other strip/profile combinations were not smaller than the selected profile. Disabling LLD tool-version information had no effect. Forced helper inlining increased both binaries from 2,560 to 3,072 bytes. A stack command buffer failed to link because it introduced an unresolved architecture-specific dependency. Merging or into executable worsened section permissions. reached 3,072 bytes, but executable unwind metadata was rejected. was measured on x86-64 and reverted because disabling ASLR was outside the acceptable security contract and it had no effect on size. Considered but deliberately not attempted I didn't pursue changes likely to violate user-visible or platform contracts: Stop waiting for the child or stop propagating its exit status. Disable handle inheritance or alter stdin/stdout/stderr forwarding. Reconstruct the argument list instead of forwarding the raw command-line tail. Switch to lossy ANSI APIs or reduce Unicode support. Reduce the command buffer below the documented maximum or truncate arguments. Remove required x86-64 or ARM64 unwind metadata. Use nonstandard PE alignment or writable/executable section combinations. Supply custom architecture-specific stack probing merely to support a stack buffer. Testing All Windows shim tests pass without skips. The final x86-64 shim successfully executes a DotSlash file for jq 1.8.2. Both architectures were structurally inspected for headers, sections, imports, unwind metadata, and security characteristics. ARM64 was cross-built and structurally validated; runtime testing was performed on x86-64.

ofek · 2w ago
ilyagr
docs: clarify `get-extracted-cache-path` docsMergedPR

Make it clearer that the artifact is not fetched, and that the command succeeds even if the artifact is missing.

ilyagr · 3w ago
Structured data for AI agents

Repository: facebook/dotslash. Description: Simplified executable deployment Stars: 895, Forks: 74. Primary language: Rust. Languages: Rust (75%), Python (15.9%), JavaScript (5.9%), Shell (1.6%), CSS (0.7%). License: Apache-2.0. Homepage: https://dotslash-cli.com Latest release: v0.5.9 (4mo ago). Open PRs: 7, open issues: 21. Last activity: 4h ago. Community health: 75%. Top contributors: zertosh, dependabot[bot], bolinfest, sdwilsh, ericweb2, bigfootjon, cfsmp3, diliop, zsol, motiz88 and others.

·@ofershap

Replace github.com with gitshow.dev