Skip to content

Fy-nite/uhigh.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

209 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

μHigh Programming Language

A simple, modern language that compiles to C# and runs on .NET. μHigh offers accessible syntax with full .NET power.

Quick Start

Install: There are three ways to install uhigh. There are stable releases on the releases page, Most recent builds are avaliable with the actions, or you can build from source with the following commands

git clone https://github.com/fy-nite/uhigh.net
cd uhigh.net
pwsh -c ./install.ps1

Hello World:

func main() {
    print("Hello, μHigh!")
}
uhigh hello.uh

REPL:

uhigh repl

Features

  • Simple, C#/Java-like syntax
  • Project system: executables, libraries, NuGet support
  • Interactive REPL
  • .NET integration
  • Modern tooling: LSP, syntax highlighting, debugging

Usage

Single File:

uhigh myfile.uh           # Run in memory
uhigh myfile.uh myapp.exe # Build executable
uhigh compile myfile.uh --save-cs ./output # Save C# code

Projects:

uhigh create MyApp --type Exe
uhigh build MyApp/MyApp.uhighproj


# Run project (auto-detects .uhighproj in current directory)
uhigh run

# Run specific project file
uhigh run MyApp/MyApp.uhighproj

# Run .uh source file directly
uhigh run myfile.uh

# Add dependencies

uhigh add-package MyApp/MyApp.uhighproj Newtonsoft.Json
uhigh restore-packages MyApp/MyApp.uhighproj

Tools:

uhigh repl
uhigh ast myfile.uh
uhigh lsp
uhigh test

Language Overview

μHigh combines familiar syntax with modern features:

var name = "World"
const PI = 3.14159

func greet(person: string) {
    return "Hello, " + person + "!"
}

namespace MyApp {
    public class Calculator {
        public func add(a: int , b: int): int {
            return a + b
        }
    }
}


// Control flow
if name != "" {

    print(greet(name))
} else {
    print("Hello, Anonymous!")
}

Console.WriteLine("Direct .NET access")

Examples

Basic:

func main() {
    var name = input("What's your name? ")
    print("Nice to meet you, " + name + "!")
}

Class:

public class Person {
    private field name: string
    public var Age: int 
    public func constructor(personName: string) {
        this.name = personName
    }
    public func greet() {
        Console.WriteLine("Hi, I'm " + this.name)
    }
}

Project Structure:

MyProject/
├── MyProject.uhighproj
├── main.uh
├── utils.uh
└── models/
    └── user.uh

Documentation

Why μHigh?

  • Beginners: Easy, readable syntax
  • .NET Developers: Familiar, concise, rapid prototyping
  • Everyone: Simplicity + .NET ecosystem

Contributing

We welcome:

  • Bug reports, feature requests
  • Docs and code contributions
  • IDE/tooling extensions

See GitHub to get started.

License

AGPL

See LICENSE for details.

Custom Code Generation Targets

μHigh's backend is modular: you can implement custom code generators for new target languages (e.g., Python, JavaScript, etc.).

  • Implement ICodeGenerator (see CodeGen/ICodeGenerator.cs)
  • Register your generator with the compiler
  • Select the target via CLI or API

Example usage:

uhigh compile myfile.uh --target javascript
uhigh compile myfile.uh --target csharp
uhigh list-targets

Example API:

var compiler = new Compiler(verboseMode: true, stdLibPath: null, targetLanguage: "javascript");
var jsCode = compiler.CompileToTarget(source, "javascript");

μHigh: Simple syntax, powerful runtime

About

Micro-High's official compiler for Dotnet

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •