CrossBridge is an
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
toolset developed by
Adobe Systems
Adobe Inc. ( ), formerly Adobe Systems Incorporated, is an American software, computer software company based in San Jose, California. It offers a wide range of programs from web design tools, photo manipulation and vector creation, through to ...
, that
cross-compiles C and
C++ code to run in
Adobe Flash Player
Adobe Flash Player (known in Internet Explorer, Firefox, and Google Chrome as Shockwave Flash) is a discontinuedExcept in China, where it continues to be used, as well as Harman for enterprise users. computer program for viewing multimedia ...
or
Adobe AIR
Adobe AIR (also known as Adobe Integrated Runtime and codenamed Apollo) is a cross-platform runtime system currently developed by Harman International, in collaboration with Adobe Inc., for building desktop applications and mobile application ...
. Projects compiled with CrossBridge run up to 10 times faster than
ActionScript 3
ActionScript is an object-oriented programming language originally developed by Macromedia Inc. (later acquired by Adobe). It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript (meani ...
projects.
[Alchemy:FAQ](_blank)
, Adobe Labs[Optimizing ActionScript Bytecode using LLVM](_blank)
Adobe[Adobe Alchemy, is it ActionScript heresy?](_blank)
, Unit Zero One CrossBridge was also known as "Alchemy" and the "Flash Runtime C++ Compiler", or "FlasCC".
Adobe Blogs, November 17, 2008
Adobe Blogs, December 11, 2008
Adobe Blogs, October 8, 2012
CrossBridge uses high-performance
memory-access opcode
In computing, an opcode (abbreviated from operation code) is an enumerated value that specifies the operation to be performed. Opcodes are employed in hardware devices such as arithmetic logic units (ALUs), central processing units (CPUs), and ...
s in the Flash Player (known as "Domain Memory") to work with in-memory data quickly. CrossBridge uses the
LLVM
LLVM, also called LLVM Core, is a target-independent optimizer and code generator. It can be used to develop a Compiler#Front end, frontend for any programming language and a Compiler#Back end, backend for any instruction set architecture. LLVM i ...
and
GCC as compiler backends, in order to compile C++ code, optimize it, and transform it to run within
AVM2 (
ActionScript Virtual Machine 2). Programs built with CrossBridge are up to 10 times faster than normal ActionScript code,
but up to 2× to 10× slower than native C++ code.
CrossBridge can generate Flash Player movies (
.swf files), or Flash Libraries (
.swc files), which can then be used by larger projects written in ActionScript 3 and compiled using the free
Apache Flex
Apache Flex, formerly Adobe Flex, is a software development kit (SDK) for the development and deployment of cross-platform rich web applications based on the Adobe Flash platform. Initially developed by Macromedia and then acquired by Adobe System ...
SDK (formerly the Adobe Flex SDK). CrossBridge also uses the
GPU-based 3D rendering acceleration present in Flash Player 11 (known as
Stage3D
Stage3D (codenamed ''Molehill'') is an Adobe Flash Player API for rendering interactive 3D graphics with GPU-acceleration, within Flash games and applications. Flash Player or AIR applications written in ActionScript 3 may use Stage3D to render ...
).
Using CrossBridge, Adobe ported
OpenGL
OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
for use within Flash Player Stage3D and released it as an open-source project in 2012. The
Lua programming language (version 5.1) was also ported to run in Flash Player using CrossBridge, and released on Google Code. CrossBridge-compiled projects also enabled running client-side
digital signal processing
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner are a ...
in real-time, including
fast Fourier transform
A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). A Fourier transform converts a signal from its original domain (often time or space) to a representation in ...
and
Mexican hat wavelet transform.
History
In 2008, CrossBridge was released by Adobe as "Project Alchemy", on the
Adobe Labs website. It enabled compilation of specially modified C++ projects to SWF, using the LLVM and GCC compilers.
In 2012, in an attempt to monetize Flash Player, Adobe restricted use of the Stage3D and Domain Memory features of Flash Player under the "Premium Features" brand. The "Premium Features" were licensed for use and publishers were to pay royalties to Adobe for use of the same. Project Alchemy was commercially released as the Flash Runtime C++ Compiler.
In 2013, Adobe open-sourced the Flash Runtime C++ Compiler as CrossBridge, and released it on the
GitHub
GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
code hosting website.
[Open Source Flash C++ Compiler, CrossBridge](_blank)
, Adobe Blogs, June 25, 2013 The "Premium Features" were also made free for use, and no longer required licensing or royalties.
Adobe Devnet
See also
* asm.js
* Emscripten
Emscripten is an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly, primarily for execution in web browsers.
Emscripten allows applications and libraries written in C or C++ to be compiled ahead of time and run effi ...
* Google Native Client
Google Native Client (NaCl) is a discontinued sandboxing technology for running either a subset of Intel x86, ARM, or MIPS native code, or a portable executable, in a sandbox. It allows safely running native code from a web browser, independ ...
(NaCl)
* WebAssembly
WebAssembly (Wasm) defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating communication between such programs and their host environment.
The main goal of ...
– an in-development bytecode for browsers
References
External links
*
Adobe Flash C++ Compiler (FlasCC)
from Adobe devnet
*
*
*
*
{{Adobe Flash
Adobe Flash
Adobe software
Cross-compilers
Free software programmed in C++