Create MiLost apps with WASM and SharedArrayBuffer support out of the box
npm install create-milost-appCreate MiLost applications with WebAssembly, WebGL, and SharedArrayBuffer support out of the box.
You don't need to install this package globally. Use npx:
``bash`
npx create-milost-app my-app
bash
npx create-milost-app my-app
`$3
`bash
npx create-milost-app my-app --ui
`What You Get
Every MiLost app created includes:
$3
- ✅ WebAssembly acceleration - 10-100x performance boost
- ✅ SIMD support - 1.7-4.5x additional speedup
- ✅ SharedArrayBuffer threading - Multi-threading support
- ✅ WebGL rendering - Hardware-accelerated UI
- ✅ Web Workers - Automatic parallelization
- ✅ Hot reload - Instant feedback during development$3
`
my-app/
├── src/
│ ├── main.ts # Application entry point
│ ├── internal/
│ │ └── bootstrap.ts # WASM/WebGL initialization
│ └── views/
│ └── MainView.ts # UI components (--ui mode)
├── public/
│ └── index.html # HTML template (--ui mode)
├── package.json
└── tsconfig.json
`$3
`bash
npm run dev # Start dev server with hot reload
npm run build # Build for production
npm run start # Start production server
npm run type-check # TypeScript type checking
npm run clean # Clean build artifacts
`Development Server
UI applications automatically use
milost-dev-server which provides:- Automatic CORS headers for SharedArrayBuffer
- WebSocket-based hot reload
- WASM streaming compilation
- Proper MIME types for all assets
- Zero configuration required
Browser Support
- Basic WASM: 100% of modern browsers
- SIMD acceleration: 85%+ of browsers
- SharedArrayBuffer: ~70% of browsers (with proper headers)
- WebGL: 98%+ of browsers
- Automatic fallbacks ensure 100% compatibility
Examples
$3
`typescript
import { Vec, Option, Result } from 'milost';const numbers = Vec.from([1, 2, 3, 4, 5]);
const doubled = numbers.batchMap(x => x * 2);
console.log('Doubled:', doubled.toArray());
`$3
`typescript
import { MiLostUI, View, Text, VStack } from 'milost/ui';export class MainView extends View {
build() {
return VStack([
Text('Hello from WebGL!').fontSize(24),
Text('Powered by MiLost').color('#667eea')
]).padding(20);
}
}
``- Node.js >= 16.0.0
- Modern browser with WebAssembly support
MIT