stapeln follows hyperpolymath language policy: Deno only, no npm/Node.js.
- Deno 2.0+
# Install Deno (if not already installed)
curl -fsSL https://deno.land/install.sh | sh
# Add to PATH (add to ~/.bashrc)
export PATH="$HOME/.deno/bin:$PATH"- ReScript Compiler via Deno
# Install ReScript using Deno's npm compatibility
deno install --allow-read --allow-write --allow-env --allow-run \
-n rescript \
npm:rescript@11
# Verify installation
rescript -version- Elixir + Phoenix (for backend)
# Fedora
sudo dnf install elixir
# Install Phoenix
mix archive.install hex phx_new- Idris2 (for formal proofs)
# Fedora
sudo dnf install idris2- Rust (for codegen NIFs)
# Already installed on your system
rustc --versioncd ~/Documents/hyperpolymath-repos/stapeln/frontend
# Compile ReScript to JavaScript
rescript build
# Start Deno dev server
deno task dev
# Open browser
xdg-open http://localhost:8000# Watch mode (recompile on save)
rescript build -w &
# In another terminal, run dev server
deno task devstapeln requires these Deno permissions:
--allow-read- Read frontend files--allow-write- Write compiled output--allow-net- HTTP server--allow-env- Environment variables
These are declared in deno.json tasks.
cd ~/Documents/hyperpolymath-repos/stapeln/backend
# Create Phoenix project (if not exists)
mix phx.new . --app stapeln --no-html --no-webpack --binary-id
# Install dependencies
mix deps.get
# Create database
mix ecto.create
# Run migrations
mix ecto.migrate
# Start server
mix phx.server
# API available at http://localhost:4010cd ~/Documents/hyperpolymath-repos/stapeln/validation
# Compile Idris2 proofs
idris2 --build validation.ipkg
# Run tests
idris2 --repl src/Proofs.idr# Install Tauri CLI
cargo install tauri-cli
# Development build
cargo tauri dev
# Production build
cargo tauri buildThe Deno install didn't add to PATH. Add to ~/.bashrc:
export PATH="$HOME/.deno/bin:$PATH"Deno's npm compatibility needs the import map. Check frontend/import_map.json:
{
"imports": {
"@rescript/core": "https://esm.sh/@rescript/core@1.0.0"
}
}Check frontend/rescript.json for correct configuration:
"module": "es6""suffix": ".res.js""in-source": true
Create frontend/.env:
# Backend API
STAPELN_API_URL=http://localhost:4010
# GraphQL endpoint
STAPELN_GRAPHQL_URL=http://localhost:4010/graphql
# WebSocket
STAPELN_WS_URL=ws://localhost:4010/socket# Install ReScript VSCode extension
code --install-extension chenglou92.rescript-vscode" Install rescript-vim plugin
Plug 'rescript-lang/vim-rescript'cd frontend
deno test --allow-read --allow-envcd backend
mix testcd frontend
rescript build
deno bundle src/Main.res.js dist/bundle.jscd backend
MIX_ENV=prod mix releasestapeln is 100% Deno-based for JavaScript runtime. We use:
- ✅ Deno for runtime
- ✅ Deno's npm: specifier for ReScript compiler
- ✅ Deno's import maps for dependencies
- ❌ No package.json
- ❌ No node_modules/
- ❌ No npm install
This follows hyperpolymath standards and ensures security-first execution.