Programming language & toolchain

Familiar syntax.
Native code.

Nexa is an experimental Java-like language and ahead-of-time compiler. Write familiar source, then build a standalone native executable or target the browser with WebAssembly.

Main.jn
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, Nexa!");
    }
}
OUTPUT Hello, Nexa!
.jn and .java sourceLLVM native backendBrowser WebAssembly

The language

Java-shaped source.
A standalone runtime.

Use classes, interfaces, arrays, lambdas and exceptions in Nexa’s supported language subset. The compiler runs on Java 21 or later. A compiled native program runs with the Nexa runtime, with no JVM or JRE required.

Write familiar code

Use .jn or .java files. Nexa implements its own standard library and supports a subset of Java syntax and APIs. Java SE and arbitrary JAR loading are out of scope.

Build for the host

The native backend emits LLVM IR and uses clang to link the executable with Nexa’s runtime. macOS on Apple silicon is the primary verified host.

Target the web

The experimental wasm32-browser target emits a WebAssembly module with JavaScript glue for browser services.

Compiler & architecture

From source to executable.

The frontend parses and type-checks your program. Nexa lowers it to its own intermediate representation, applies optimizations, and emits code for the chosen backend.

  1. Source
  2. Parse & type-check
  3. Nexa IR & optimization
  4. LLVM / WebAssembly
  5. Executable / browser module
Nexa target architecture showing desktop, web, mobile and game applications above the UI framework, SDK, runtime, compiler and toolchain.
The target architecture spans desktop, web, mobile and games. The platform table below shows the boundaries of the current implementation.

SDK & runtime

Shared APIs where the
platforms overlap.

NEXA-002 brings common runtime services under a shared API. Target-specific adapters handle differences in clocks, HTTP and host access.

Time & cancellation

Measure elapsed time with the monotonic clock. Use NexaDeadline and cancellation tokens to stop cooperative work at checkpoints.

HTTP & paths

NexaHttp exposes GET, HEAD and text POST. Browser requests use Fetch and follow CORS rules. NexaPath handles path strings across targets.

Console & resources

Shared logging routes to native streams or the browser console. Runtime APIs expose processor count and garbage collection. WASM uses a single execution lane.

Platform support at a glance

CapabilityNativeBrowser WASMMobile WebView
Execution modelHost executableExperimental browser moduleExperimental WASM container
Clocks, logging, cancellationShared APIsShared APIsUses browser-target APIs
HTTP clientNative transportBrowser Fetch and CORSUses WebView Fetch
Host filesystemAvailableUnavailableUnavailable through the shared runtime
Threads, raw sockets, native FFINative APIsUnavailableUnavailable through the shared runtime

Development tools

Nexa Studio

The experimental Studio CLI can open, edit, build and run Nexa projects. The proposed visual editor brings component layout, property editing and device previews into the same workspace.

Visual editor concept

Nexa Studio concept showing a mobile preview, layers panel, inspector and code pane.

Quickstart

Build your first executable.

From a Nexa source checkout, use Java 21+, Maven 3.9+ and clang on your PATH. The included example prints Hello, Nexa!.

Native build

mvn -q -DskipTests package
./scripts/nexa doctor
./scripts/nexa examples/guide-hello/src/Main.jn -o Hello
./Hello

Next projects to try

  • Command-line app — examples/tutorials/cli-todo
  • HTTP server — examples/http-server
  • Browser example — examples/browser/float-calc

See docs/en/start-here.md in your checkout for a guided tour.

Roadmap

What comes next.

The SDK and runtime are the foundation for cross-platform UI, visual tooling and a broader application ecosystem.

Unify the SDK

Continue narrowing platform differences in shared services and run the same core regression cases on multiple hosts.

Unify the UI model

Bring component trees, layout and events into a common model, then use it as the foundation for Studio’s visual designer.

Expand target coverage

Validate native mobile workflows and browser behavior. Explore 2D game tooling, packaging and debugger integration.