Skip to content

huntergps/uno

 
 

Repository files navigation

Uno Core Platform

AppVeyor Build status Tracis CI Build Status

Welcome to Uno.

We're here to help Fuse development by building and maintaining several related pieces of core technology.

  • Cross-platform tools for building and running applications
  • Core libraries and platform abstraction
  • Uno programming language and compiler
  • Uno project format, build engine and package manager
  • UX markup language and compiler
  • Uno/UX test runner

Uno is used on macOS and Windows, and makes native apps for the following platforms:

  • Android
  • iOS
  • macOS (native or Mono)
  • Windows (native or .NET)

Uno syntax

class App : Uno.Application
{
    public App()
    {
        debug_log "Hello, world!";
    }
}

The Uno programming language is a fast, native dialect of C# that can cross-compile to any native platform (in theory), by emitting portable C++11 for mobile or desktop platforms, or CIL bytecode for desktop platforms (Mono/.NET) — designed for developing high-performance UI-engines, platform abstractions or integrations, and other kinds of software traditionally required written in native C/C++.

Access all APIs and features on the target platforms directly in Uno — add a snippet of foreign code, and our compiler automatically generates the glue necessary to interoperate (two-way) with a foreign language. The following foreign languages are supported:

Run-time features

  • Memory in Uno is managed semi-automatically by automatic reference counting, avoiding unpredictable GC stalls.
  • Real generics – sharing the same compiled code in all generic type instantiations, without boxing values, and with full run-time type system support – avoiding exploding code-size and compile-times (while still being fast).
  • (Opt-in) reflection on all platforms – to dynamically create objects and invoke methods based on type information only known at run-time – enabling high-level Fuse features such as live-previewing UX documents.

See https://fuse-open.github.io/docs/ for more information about the Uno/UX (and JavaScript) stack.

Building

Uno is built using the command-line on macOS or Windows. Linux is not yet supported.

Prerequisites

Build command Action
make3 Builds uno and standard library. Works on all platforms.

1: We need vswhere to locate your Visual Studio 2017 installation. Please make sure we can find vswhere in PATH or at %PROGRAMFILES(x86)%\Microsoft Visual Studio\Installer. This program is included with the installer as of Visual Studio 2017 Update 2 and later.

2: Our cross-platform build scripts are written in bash, and make is a convenient way to invoke the different build tasks.

3: You also can run bash scripts/build.sh directly if you don't have make.

Additional make targets

Build command Action
make install Creates symlinks for uno (alias uno-dev) in /usr/local/bin.
make release Creates a packaged release build for distribution.
make unocore Generates C# code for Uno.Runtime.Core.dll, based on Uno code.
make clean Removes build artifacts from the repository and Packages.SourcePaths.
make check Runs the local test suite.

Running

To run uno in your terminal, type <current-directory>/bin/uno.

Add <current-directory>/bin to your PATH to get uno (alias uno-dev) globally available in your environment.

You can also type make install if you want symlinks in /usr/local/bin.

On Windows, some additional runtimes might be needed.

Debugging

When Uno is built, a C# solution is generated in <current-directory>. To debug, open uno.sln in a capable IDE1 and go from there. Use main/Uno.CLI.Main as startup project to launch uno's main method.

1 Such as Visual Studio 2015+ or JetBrains Rider.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Reporting issues

Please report issues here.

Configuration

Please read the configuration reference documentation for details on how to set up uno's configuration files for your build-environment.

Command Line Reference

Please read the command-line reference documentation for details on how to use uno's command-line interface.

About

Uno compiler, core libs and tools

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 58.4%
  • Uno 34.6%
  • C++ 5.3%
  • Java 0.9%
  • Objective-C++ 0.3%
  • Python 0.2%
  • Other 0.3%