Something went wrong. Try again.
WIP experiment with 95% vibe coding
Something went wrong. Try again.
tiny-workshop dev.bat
3.1 kB · 137 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138@echo offREM Tiny Workshop - Development Runner (Windows)REM Builds backend and runs the full application
setlocal enabledelayedexpansion
echo.echo Tiny Workshop Dev Runnerecho ==========================echo.
REM Parse argumentsset BUILD_BACKEND=1set BUILD_RUST=1set RUN=1set DEBUG_SERVER=0
:parse_argsif "%~1"=="" goto :mainif "%~1"=="--skip-backend" ( set BUILD_BACKEND=0 shift goto :parse_args)if "%~1"=="--skip-rust" ( set BUILD_RUST=0 shift goto :parse_args)if "%~1"=="--build-only" ( set RUN=0 shift goto :parse_args)if "%~1"=="--debug-server" ( set DEBUG_SERVER=1 shift goto :parse_args)if "%~1"=="--help" goto :helpif "%~1"=="-h" goto :helpecho Unknown option: %~1exit /b 1
:helpecho Usage: dev.bat [options]echo.echo Options:echo --skip-backend Skip building the backend executableecho --skip-rust Skip building the Rust frontendecho --build-only Build everything but don't runecho --debug-server Enable debug HTTP server (port 8765)echo --help, -h Show this help messageexit /b 0
:main
REM Step 1: Build backendif %BUILD_BACKEND%==1 ( echo [1/3] Building backend standalone executable...
REM Check if bun is installed where bun >nul 2>nul if errorlevel 1 ( echo Error: bun is not installed or not in PATH echo Install bun: https://bun.sh exit /b 1 )
REM Install dependencies if needed if not exist "backend\node_modules" ( echo Installing backend dependencies... cd backend call pnpm install cd .. )
REM Build the standalone executable echo Compiling TypeScript to standalone exe... cd backend\packages\adapter call bun run build cd ..\..\..
echo [OK] Backend built: backend\packages\adapter\dist\tiny-workshop-backend.exe) else ( echo [1/3] Skipping backend build)
echo.
REM Step 2: Build Rust frontendif %BUILD_RUST%==1 ( echo [2/3] Building Rust frontend... cd tiny-workshop if %DEBUG_SERVER%==1 ( echo Building with debug server enabled... cargo build --package executor --features debug_server ) else ( cargo build --package executor ) cd .. echo [OK] Rust frontend built) else ( echo [2/3] Skipping Rust build)
echo.
REM Step 3: Run the applicationif %RUN%==1 ( echo [3/3] Starting Tiny Workshop...
REM Clear old log file if exist "tiny-workshop\tiny-workshop.log" ( del "tiny-workshop\tiny-workshop.log" echo Cleared old log file )
echo. echo ======================================== echo Tiny Workshop is starting up! if %DEBUG_SERVER%==1 ( echo Debug server: http://localhost:8765 ) echo ======================================== echo. cd tiny-workshop if %DEBUG_SERVER%==1 ( cargo run --package executor --features debug_server ) else ( cargo run --package executor )) else ( echo [3/3] Build complete! Run with: cd tiny-workshop ^&^& cargo run --package executor)
endlocal