Skip to content
Zwetan Kjukov edited this page Jun 16, 2016 · 4 revisions

Application Programming Interface

Essential read about the Redtamarin API.

It is ActionScript 3.0 but it is not Flash nor Adobe AIR.

Redtamarin is first the C/C++ source code that produce a runtime,
this is what we call the Redtamarin Shell or reshell.

  • the Flash Player is a runtime
    that execute inside a browser as a plugin
    and embed the playerglobal.swc
  • Adobe AIR is a runtime
    that execute at the operating system level
    like a GUI application (Outside of the browser)
    and embed the airglobal.swc
  • the Redtamarin Shell is a runtime
    that execute at the operating system level
    like a CLI program (command-line application,
    interactive shell, background service, etc.)
    and embed redtamarin.abc

The API is the second most important part of Redtamarin
and is defined by native code (implemented in C/C++) and
ActionScript 3.0 code organised in 3 layers

  • the C API
    in the C.* package
    see clib (the "C Library")
  • the Native API
    in the shell.* package
    see rnlib (the "Redtamarin Native Library")
  • the AVMGlue API
    in the flash.* and air.* packages
    see avmglue (the "Flash Platform API")

Important

The Redtamarin API is embedded in the runtime (redshell), that means you have access to it at all time without the need to load an external ABC library.

But that also means you can not override it (or some part of it) with your own implementation, without recompiling the runtime itself.

Design

The Redtamarin API design follow 3 simple principles

  • native implementations are very simple and low-level
  • ActionScript 3 builtins are used to organise the logic and glue the native
  • it is cross-platform as much as possible

The whole design is based on this prerogative

A good ActionScript 3.0 developer will be able
to reuse the API to write anything, high and low-level

We put the AS3 language upfront and center.

The C API

Combine definitions of the C Standard Library and POSIX to provide low-level native C functions and system call.

This is almost an opposite approach to Crossbridge.

The Native API

The AVMGlue API

Clone this wiki locally