Full FFI support, independent of the compiler

The full FFI support all the features of the light FFI and more:

  • More foreign languages: C++, Java and Objective-C.
  • Callbacks to Nit from foreign codes. The callbacks are declared in Nit using the import annotation on extern methods. They are then generated on demand for the target foreign language.
  • Static Nit types in C for precise typing and static typing errors in C.
  • Propagating public code blocks at the module level (C Header). This allows to use extern classes in foreign code in other modules without having to import the related headers. This is optional in C as it is easy to find the correct importation. However it is important in Java and other complex FFIs.
  • Reference pinning of Nit objects from foreign code. This ensure that objects referenced from foreign code are not liberated by the GC.
  • FFI annotations:
  • cflags, ldflags and cppflags pass arguments to the C and C++ compilers and linker.
  • pkgconfig calls the pkg-config program to get the arguments to pass to the C copiler and linker.
  • extra_java_files adds Java source file to the compilation chain.

All subgroups and modules

module c

nitc :: c

Support for nesting C code within a Nit program using its FFI
module c_compiler_options

nitc :: c_compiler_options

Offers the annotations cflags and ldflags to specify
module cpp

nitc :: cpp

Supports the use of the C++ language through the FFI
module extern_classes

nitc :: extern_classes

Manages all extern classes and their associated foreign type.
module extra_java_files

nitc :: extra_java_files

Intro the annotation extra_java_files to compile extra java files
module ffi

nitc :: ffi

Full FFI support, independent of the compiler
module ffi_base

nitc :: ffi_base

Tools and utilities for implement FFI with different languages
module header_dependency

nitc :: header_dependency

Tracks which modules has public header code that must be imported
module java

nitc :: java

FFI support for the Java language
module light_c

nitc :: light_c

Support for nesting C code within a Nit program using its FFI
module light_ffi

nitc :: light_ffi

Light FFI support, independent of the compiler
module light_ffi_base

nitc :: light_ffi_base

Tools and utilities for implement FFI with different languages
module objc

nitc :: objc

FFI support for Objective-C
module pkgconfig

nitc :: pkgconfig

Offers the PkgconfigPhase to use the external program "pkg-config" in order
package_diagram nitc\>ffi\> ffi nitc\>platform\> platform nitc\>ffi\>->nitc\>platform\> nitc\>modelize\> modelize nitc\>ffi\>->nitc\>modelize\> nitc\>nitni\> nitni nitc\>ffi\>->nitc\>nitni\> nitc nitc nitc\>ffi\>->nitc nitc\>platform\>->nitc\>modelize\> nitc\>platform\>->nitc nitc\>compiler\> compiler nitc\>platform\>->nitc\>compiler\> nitc\>semantize\> semantize nitc\>platform\>->nitc\>semantize\> nitc\>nitni\>->nitc nitc->nitc\>compiler\> nitc\>compiler\>->nitc\>ffi\> ...nitc\>compiler\> ... ...nitc\>compiler\>->nitc\>compiler\> ...nitc ... ...nitc->nitc ...nitc\>semantize\> ... ...nitc\>semantize\>->nitc\>semantize\> ...nitc\>modelize\> ... ...nitc\>modelize\>->nitc\>modelize\> nitc\>compiler\>compiler_ffi\> compiler_ffi nitc\>compiler\>compiler_ffi\>->nitc\>ffi\> nitc\>compiler\>compiler_ffi\>->nitc\>compiler\> nitc\>interpreter\>dynamic_loading_ffi\> dynamic_loading_ffi nitc\>interpreter\>dynamic_loading_ffi\>->nitc\>ffi\> nitc... ... nitc...->nitc nitc\>compiler\>compiler_ffi\>... ... nitc\>compiler\>compiler_ffi\>...->nitc\>compiler\>compiler_ffi\> nitc\>platform\>... ... nitc\>platform\>...->nitc\>platform\> nitc\>interpreter\> interpreter nitc\>interpreter\>->nitc\>interpreter\>dynamic_loading_ffi\> nitc\>interpreter\>... ... nitc\>interpreter\>...->nitc\>interpreter\>

Ancestors

group api

nitc > doc > api

Components required to build a web server about the nit model.
group base64

base64

Offers the base 64 encoding and decoding algorithms
group c

c

Structures and services for compatibility with the C language
group catalog

nitc > catalog

Basic catalog generator for Nit packages
group codecs

core > codecs

Group module for all codec-related manipulations
group collection

core > collection

This module define several collection classes.
group commands

nitc > doc > commands

group compiler

nitc > compiler

Compilation to C
group compiler_ffi

nitc > compiler > compiler_ffi

Full FFI support for the compiler
group config

config

Configuration options for nit tools and apps
group console

console

Defines some ANSI Terminal Control Escape Sequences.
group core

core

Nit common library of core classes and methods
group counter

counter

Simple numerical statistical analysis and presentation
group csv

csv

CSV document handling.
group curl

curl

Data transfer powered by the native curl library
group doc

nitc > doc

group dot

dot

Dot rendering library
group dynamic_loading_ffi

nitc > interpreter > dynamic_loading_ffi

This group implement a partial support for the Nit FFI in the interpreter.
group frontend

nitc > frontend

Collect and orchestration of main frontend phases
group gen_nit

gen_nit

Support to generate and otherwise manipulate Nit code
group github

github

Nit wrapper for Github API
group graph

graph

group html

html

HTML output facilities
group ini

ini

ini - Read and write INI configuration files
group interpreter

nitc > interpreter

Interpretation of Nit programs
group json

json

read and write JSON formatted text
group libevent

libevent

Low-level wrapper around the libevent library to manage events on file descriptors
group logger

logger

A simple logger for Nit
group markdown

markdown

A markdown parser for Nit.
group md5

md5

Native MD5 digest implementation as Text::md5
group meta

meta

Simple user-defined meta-level to manipulate types of instances as object.
group metrics

nitc > metrics

Various statistics about Nit models and programs
group model

nitc > model

The meta model of Nit programs
group mongodb

mongodb

MongoDB Nit Driver.
group more_collections

more_collections

Highly specific, but useful, collections-related classes.
group neo4j

neo4j

Neo4j connector through its JSON REST API using curl.
group nitcorn

nitcorn

Lightweight framework for Web applications development
group opts

opts

Management of options on the command line
group ordered_tree

ordered_tree

Manipulation and presentation of ordered trees.
group parser

nitc > parser

Parser and AST for the Nit language
group parser_base

parser_base

Simple base for hand-made parsers of all kinds
group perfect_hashing

perfect_hashing

Perfect hashing and perfect numbering
group performance_analysis

performance_analysis

Services to gather information on the performance of events by categories
group pipeline

pipeline

Pipelined filters and operations on iterators.
group popcorn

popcorn

Popcorn
group poset

poset

Pre order sets and partial order set (ie hierarchies)
group prompt

prompt

Basic services to display a prompt
group pthreads

pthreads

POSIX Threads support
group realtime

realtime

Services to keep time of the wall clock time
group saf

nitc > saf

Nit Static Analysis Framework.
group semantize

nitc > semantize

Process bodies of methods in regard with the model.
group serialization

serialization

Abstract serialization services
group static

nitc > doc > static

Nitdoc generation framework
group template

template

Basic template system
group term

nitc > doc > term

group testing

nitc > testing

Test unit generation and execution for Nit.
group text

core > text

All the classes and methods related to the manipulation of text entities
group trees

trees

General module for tree data structures
group uml

nitc > uml

Group head module for UML generation services
group vm

nitc > vm

Entry point of all vm components

Parents

group modelize

nitc > modelize

Create a model from nit source files
group nitc

nitc

Nit compiler and tools
group nitni

nitc > nitni

Native interface related services (used underneath the FFI)
group platform

nitc > platform

Platform system, used to customize the behavior of the compiler.

Children

group compiler

nitc > compiler

Compilation to C
group compiler_ffi

nitc > compiler > compiler_ffi

Full FFI support for the compiler
group dynamic_loading_ffi

nitc > interpreter > dynamic_loading_ffi

This group implement a partial support for the Nit FFI in the interpreter.
group platform

nitc > platform

Platform system, used to customize the behavior of the compiler.

Descendants

group api

nitc > doc > api

Components required to build a web server about the nit model.
group catalog

nitc > catalog

Basic catalog generator for Nit packages
group commands

nitc > doc > commands

group doc

nitc > doc

group frontend

nitc > frontend

Collect and orchestration of main frontend phases
group interpreter

nitc > interpreter

Interpretation of Nit programs
group metrics

nitc > metrics

Various statistics about Nit models and programs
group model

nitc > model

The meta model of Nit programs
group modelize

nitc > modelize

Create a model from nit source files
group nitc

nitc

Nit compiler and tools
group nitni

nitc > nitni

Native interface related services (used underneath the FFI)
group parser

nitc > parser

Parser and AST for the Nit language
group saf

nitc > saf

Nit Static Analysis Framework.
group semantize

nitc > semantize

Process bodies of methods in regard with the model.
group static

nitc > doc > static

Nitdoc generation framework
group term

nitc > doc > term

group testing

nitc > testing

Test unit generation and execution for Nit.
group uml

nitc > uml

Group head module for UML generation services
group vm

nitc > vm

Entry point of all vm components