ReferenceTarget Platforms

Target Platforms

JOEL can compile to multiple target platforms.

Native

Compile to native machine code.

[Compiled]
[target native]

# Compiles to:
# - Linux: ELF binary
# - macOS: Mach-O binary
# - Windows: PE binary

Use Cases:

  • System utilities
  • CLI tools
  • High-performance applications

WebAssembly (WASM)

Compile to WebAssembly for web and mobile.

[Compiled]
[target wasm32]

# Compiles to .wasm file
# Can run in browsers, Node.js, mobile apps

Use Cases:

  • Web applications
  • Mobile apps (via WASM)
  • Cross-platform libraries

Ethereum (EVM)

Compile to Ethereum Virtual Machine bytecode.

[Compiled]
[target evm]

contract Token {
  # Smart contract code
}

Use Cases:

  • Smart contracts
  • DeFi applications
  • NFTs

Solana

Compile to Solana WASM programs.

[Compiled]
[target wasm-solana]

contract Counter {
  # Solana program
}

Use Cases:

  • Solana programs
  • High-throughput dApps

Cosmos SDK

Compile to Cosmos SDK smart contracts (WASM).

[Compiled]
[target cosmos]

contract Token {
  # Cosmos contract
}

Use Cases:

  • Cosmos smart contracts
  • Inter-blockchain communication

Polkadot/Substrate

Compile to Polkadot/Substrate runtime modules (WASM).

[Compiled]
[target polkadot]

contract Runtime {
  # Substrate runtime module
}

Use Cases:

  • Substrate runtime modules
  • Polkadot parachains

iOS

Compile to native iOS frameworks.

[Compiled]
[target ios]

fn calculate() -> i32 {
  return 42
}

Use Cases:

  • iOS applications
  • Native iOS libraries

Android

Compile to native Android libraries.

[Compiled]
[target android]

fn process() -> i32 {
  return 100
}

Use Cases:

  • Android applications
  • Native Android libraries

Compilation Commands

# Native
joel build app.joel --target native
 
# WASM
joel build app.joel --target wasm32
 
# EVM
joel build contract.joel --target evm
 
# Solana
joel build program.joel --target wasm-solana
 
# Cosmos
joel build contract.joel --target cosmos
 
# Polkadot
joel build runtime.joel --target polkadot
 
# iOS
joel build app.joel --target ios --arch arm64
 
# Android
joel build app.joel --target android --arch aarch64
 
# With optimizations
joel build app.joel --target native --optimize
 
# With debug symbols
joel build app.joel --target native --debug

Next Steps