Skip to content

Implement C Code Generation and Usage in Java (similar to Python) #1

Description

@floxdeveloper

Summary

Implement a feature for C code generation and its usage in Java, similar to the existing functionality available in Python.

Background

Currently, C code generation and its runtime usage are supported through the Python interface. Providing the same workflow for Java users of JCasADi would streamline high-performance computation and enable integration with Java applications.

Requirements

  • Extend the code generation module to enable C code export via Java APIs.
  • Implement mechanisms for compiling and invoking generated C code from Java.
  • Ensure seamless loading, linking, and execution of generated code within Java environments.
  • Add user and developer documentation for the new functionality (including example usage).
  • Create tests demonstrating the intended workflow.

Acceptance Criteria

  • Java users can generate C code from CasADi expressions.
  • A documented example shows using generated C code in Java, similar to Python usage.
  • Automated tests verify code generation, compilation, and usage in Java.

Additional Notes

  • Reuse and adapt as much of the core code generation infrastructure as possible.
  • Reference Python workflow where reasonable when documenting Java approach.

Label: enhancement

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions