⚠️ Experimental Project: This adapter is currently under active development and testing. Use with caution in production environments.
A SvelteKit adapter that builds your full-stack web application as a single executable binary with zero runtime dependencies.
Unlike static builds that strip away server capabilities, this adapter preserves all server-side features of SvelteKit: SSR, API endpoints, server middleware, server-side authentication, and more.
Traditional standalone software approaches lose functionality:
With this SvelteKit adapter:
Examples: AI chat apps, project management tools, content management systems, web analytics dashboards...
Requires Bun installed on your machine to build the executable.
npm install sveltekit-exec-adapter
Bun is required as a build dependency to compile your SvelteKit application into an executable binary.
curl -fsSL https://bun.sh/install | bash
After the installation, you may need to add Bun to your system's PATH. The installer usually prompts you with instructions on how to do this, which often involves adding a line to your shell's configuration file (e.g., ~/.bashrc
, ~/.zshrc
).
Verify the installation by checking the Bun version:
bun --version
powershell -c "irm bun.sh/install.ps1|iex"
scoop install bun
bun --version
Note: For specific version installations, refer to the official Bun documentation as the commands may vary slightly depending on the desired version.
// svelte.config.js
import adapter from "sveltekit-exec-adapter";
export default {
kit: {
adapter: adapter({
binaryName: "my-app",
// Additional options...
}),
},
};
Build your application:
npm run build
Run the generated executable:
./dist/my-app
Your SvelteKit app will run at http://localhost:3000
with full server capabilities.
The adapter accepts various configuration options including comprehensive asset validation to ensure build reliability and optimize binary size.
// svelte.config.js
import adapter from "sveltekit-exec-adapter";
export default {
kit: {
adapter: adapter({
binaryName: "my-app",
embedStatic: true,
validation: {
maxAssetSize: 50 * 1024 * 1024, // 50MB per asset
maxTotalSize: 500 * 1024 * 1024, // 500MB total
skip: false, // Enable validation
},
}),
},
};
The adapter includes built-in asset validation that:
.exe
, .dll
, etc.)📖 Read the complete Asset Validation Guide
For complete configuration details, check the detailed documentation.
🎁 Bonus: When targeting linux-x64
, a Dockerfile is automatically generated, enabling easy deployment with services like Fly.io:
fly launch
This project is under active development. Contributions, bug reports, and feature requests are welcome!
MIT License - see LICENSE file for details.
This project is based on the original work by Hugo Duprez. Special thanks for the foundational concepts and initial implementation.