Output Targets¶
Codcel generates production-ready code in multiple languages and frameworks. Each output target produces a complete, buildable project with its own build configuration, tests, and documentation.
The Rust Calculation Library is always generated and forms the foundation. All other targets either wrap the Rust engine (via JNI or FFI) or provide additional layers such as REST servers, web clients, and full-stack applications.
How It Works¶
Codcel's code generation follows a layered architecture:
Excel Workbook
|
v
Transpiler
|
+---> Rust Calculation Library (always generated)
| |
| +---> JNI Library (Java/Kotlin bridge)
| | |
| | +---> Java Calculation Library
| | +---> Kotlin Calculation Library
| |
| +---> FFI Library (C-compatible bridge)
| |
| +---> C# Calculation Library
| +---> Visual Basic Calculation Library
| +---> Python Calculation Library
| | +---> Excel Python Interface (.xlsm)
| +---> Go Calculation Library
| +---> Swift Calculation Library
|
+---> WASM Calculation Library (browser)
+---> REST Servers (Rust, Java, Kotlin, C#, Go)
+---> Web Clients (Rust, Java, Kotlin, C#, Python, Go, JS, TS, Swift)
| +---> Excel Web Client Python Interface (.xlsm)
+---> Fullstack UI (Dioxus)
+---> Command Line Tool
+---> MCP Server (AI integration)
+---> OpenAPI Document
Target Categories¶
Calculation Libraries¶
Standalone libraries for embedding calculations in your own applications. Available in Rust, WASM, Java, Kotlin, C#, Visual Basic, Python, Go, and Swift.
REST Servers¶
HTTP REST API servers that expose your calculations as web endpoints. Available in Rust, Java, Kotlin, C#, and Go.
Web Clients¶
Client libraries for calling the generated REST APIs. Available in Rust, Java, Kotlin, C#, Python, Go, JavaScript, TypeScript, and Swift.
Fullstack UI¶
A complete web application with server and UI components, built with the Dioxus framework in Rust.
Integrations¶
OpenAPI specifications, command-line tools, MCP servers for AI integration, and low-level JNI/FFI bindings.
Excel Python Interface¶
Excel workbooks (.xlsm) with xlwings integration, providing a familiar spreadsheet interface for Python-powered calculations. Requires Microsoft Excel on Windows or macOS.
Excel Web Client Python Interface¶
Excel workbooks (.xlsm) with xlwings integration that call a remote REST API via the Python Web Client. Requires Microsoft Excel on Windows or macOS and a running Codcel server.
Selecting Output Targets¶
In the desktop app, open Generate Project from the sidebar and check the boxes for the targets you want. The Rust Calculation Library is always selected.
Some targets require a Codcel account. See Authentication for details.
Output target selections are stored in the [settings] section of your codcel.toml file. See Settings Reference for the full list.
Build Order¶
When building generated projects that depend on native libraries, follow this order:
- Build the Rust Calculation Library --
cargo build --releasein the calculation directory - Build JNI or FFI (if using Java, Kotlin, C#, VB, Python, Go, or Swift) --
cargo build --releasein thejni/orffi/directory - Build the target-language library -- using the target's build system (Gradle, .NET, Go, pip, Swift PM)
- Build the server (if applicable) -- using the target's build system
- Build the web client (if applicable)
The Fullstack UI, Command Line, and MCP Server targets are self-contained Rust projects that only need cargo build --release.
The Excel Python Interface requires the FFI Library and Python Calculation Library to be built first, then pip install -r requirements.txt in the excel-python-xlwings/ directory. See Excel Python Interface for details.
The Excel Web Client Python Interface requires a running REST server and the Python Web Client to be installed, then pip install -r requirements.txt in the excel-web-client-python-xlwings/ directory. See Excel Web Client Python Interface for details.
Environment Variables¶
Several targets require the CODCEL_TABLE_PATH environment variable to locate table data files:
This applies to: Go, Swift, C#, Visual Basic, and the MCP Server.
Runtime Formatting¶
All generated targets support runtime locale detection and CODCEL_* environment variable overrides for formatting (decimal separator, currency symbol, thousands separator, and more). REST servers also accept the Accept-Language HTTP header, and calculation libraries provide per-call language override APIs.
See Runtime Formatting for full details.