Files
hakorune/projects/nyash-wasm/pkg
Moe Charm ee59c4ee60 🚀 fix: WebAssembly成果物を追加してプレイグラウンド修正
 修正内容:
• pkg/nyash_rust.js - WebAssembly JSバインディング
• pkg/nyash_rust_bg.wasm - コンパイル済みWASM実行ファイル
• TypeScript型定義ファイル

🎯 これでブラウザーでNyashが正常動作します!
GitHub Pages完全対応完了
2025-08-09 15:26:35 +09:00
..

🐱 Nyash Programming Language

Everything is Box - Revolutionary Programming Language

Build Status Everything is Box WebAssembly MIT License

Key Features

  • Everything is Box Philosophy: Every value is a unified Box object
  • WebAssembly Ready: Run natively in browsers with zero setup
  • Web Integration: Control HTML5 Canvas, DOM elements directly from code
  • Self-Hosting: Written in itself using revolutionary Box architecture
  • Modern Syntax: Clean, expressive syntax with powerful abstractions

🚀 Quick Start

Try in Browser (No Installation Required!)

Open Nyash Playground in your browser and start coding immediately!

Local Development

# Clone the repository
git clone https://github.com/user/nyash.git
cd nyash

# Build with Cargo
cargo build --release

# Run your first program
./target/release/nyash examples/hello_world.nyash

💡 Philosophy: Everything is Box

Nyash revolutionizes programming by treating everything as a Box:

// Traditional languages: different types, complex syntax
// Nyash: unified Box approach

greeting = new StringBox("Hello!")      // Text is a Box
number = new IntegerBox(42)             // Numbers are Boxes
display = new WebDisplayBox("output")   // Even web elements are Boxes!

// Everything works the same way
display.print(greeting.toString())
display.print("The answer is: " + number)

🎮 Examples

Hello World

print("🐱 Hello, Nyash World!")
greeting = new StringBox("Welcome to Everything is Box!")
print(greeting.toString())

Web Canvas Graphics

canvas = new WebCanvasBox("my-canvas", 400, 300)
canvas.setFillStyle("red")
canvas.fillRect(50, 50, 100, 75)
canvas.fillText("Nyash WebCanvas", 150, 200)

Game of Life (Conway)

game = new GameOfLifeBox(50, 30)
game.randomize()
loop (game.generation < 100) {
    game.step()
    game.display()
}

📚 Documentation

🌐 Web Integration

Nyash provides seamless browser integration:

// Control web page elements directly
display = new WebDisplayBox("output")
display.setHTML("<h1>Generated by Nyash!</h1>")

// Draw on HTML5 Canvas
canvas = new WebCanvasBox("graphics", 800, 600)
canvas.drawScene()

// Interactive web apps in pure Nyash
button = new WebButtonBox("click-me")
button.onClick = new MethodBox(app, "handleClick")

🎯 Sample Projects

Explore our curated examples:

Performance & Architecture

  • Rust Backend: High-performance native execution
  • WebAssembly Target: Zero-overhead browser deployment
  • Box Unification: Simplified memory model, optimized for speed
  • Self-Hosting: Bootstrap compiler written in Nyash itself

🛠 Building from Source

Prerequisites

  • Rust 1.70+
  • wasm-pack (for WebAssembly builds)

Commands

# Native build
cargo build --release

# WebAssembly build
wasm-pack build --target web --out-dir projects/nyash-wasm/pkg

# Run tests
cargo test

# Generate documentation
cargo doc --open

🤝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Add your changes and tests
  4. Ensure all tests pass (cargo test)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to your branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

See our Contributing Guidelines for detailed information.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Why Nyash?

  • Unified Philosophy: No more juggling different types and paradigms
  • Web-First: Built for the modern web development ecosystem
  • Self-Documenting: Everything is Box makes code naturally readable
  • Performance: Rust backend ensures native-level speed
  • Innovation: Revolutionary approach to programming language design

Everything is Box. Everything is Simple. Everything is Nyash. 🐱

WebsiteDocumentationExamplesCommunity