Getting Started

Setup and installation guide for Arshu Assembler

Prerequisites

Before you begin, ensure you have the following tools installed for the language you wish to work with:

C#

Rust

Go

Node.js

PHP

Installation

Clone the Repository

git clone https://github.com/Arshu/Arshu.Assembler.git
cd Arshu.Assembler

Running Tests

Each language implementation includes a test suite to validate the assembler functionality.

C#

cd csharp\AssemblerTest
dotnet run .

Rust

cd rust\AssemblerTest
cargo run .

Go

cd go/AssemblerTest
go run .

Node.js

cd node/AssemblerTest
npm install
node index.js

PHP

cd php/AssemblerTest
composer install
php index.php
Testing Tips:
  • Use --skipdetails flag for concise output
  • Use --printhtml to output HTML results
  • Use --advancedtests for advanced test scenarios
  • Use --appsite <name> to test a specific appsite

Running the Web Server

Each language implementation includes a web server that exposes the assembler functionality.

⚠️ Important: All projects have idle tracking implemented with auto shutdown after 10 seconds of inactivity (for deployment on fly.io). Use --skipIdleTracking option when running locally.

C#

cd csharp\AssemblerWeb
dotnet run . --skipIdleTracking

Access at: http://localhost:5000

C# (JavaScript Assembler)

cd csharp\AssemblerWebJs
dotnet run . --skipIdleTracking

Rust

cd rust\AssemblerWeb
cargo run . --skipIdleTracking

Access at: http://localhost:8080

Go

cd go/AssemblerWeb
go run . --skipIdleTracking

Access at: http://localhost:8080

Node.js

cd node/AssemblerWeb
npm install
npm start -- --skipIdleTracking

Access at: http://localhost:3000

PHP

cd php/AssemblerWeb
composer install
php -S localhost:8001 index.php

Access at: http://localhost:8001

Project Structure

The repository is organized by language, with each language having a consistent set of subprojects:

/
├── <language>/
│ ├── Assembler/ # Core static site generation logic
│ ├── AssemblerTest/ # Test project for the Assembler
│ └── AssemblerWeb/ # Web server exposing the assembler
│ └── AssemblerWebJs/ # Web server for JavaScript assembler (C# only)
...

Key Directories

Testing Specific AppSites

To test a single AppSite with HTML output:

C#

cd csharp/AssemblerTest
dotnet run -c Release -- --skipdetails --printhtml --advancedtests --appsite HtmlRule1A

Rust

cd rust/AssemblerTest
cargo run --release -- --skipdetails --printhtml --advancedtests --appsite HtmlRule1A

Go

cd go/AssemblerTest
go run . --skipdetails --printhtml --advancedtests --appsite HtmlRule1A

Node.js

cd node/AssemblerTest
node index.js --skipdetails --printhtml --advancedtests --appsite HtmlRule1A

PHP

cd php/AssemblerTest
php index.php --skipdetails --printhtml --advancedtests --appsite HtmlRule1A
Note: Using --appsite without --advancedtests will trigger performance testing, which may slow down your testing.

Next Steps

Back to Home