-
Notifications
You must be signed in to change notification settings - Fork 10
Hacking Anyolite
If you are still not entirely happy with the scope of Anyolite, feel encouraged to add your own features to it. This page will give some details on the code structure and some other information about the Anyolite code.
-
anyolite.cr - The file where everything comes together.
-
configs/*.json - Anyolite configuration files.
-
examples/*.rb - Ruby example scripts.
-
glue/**/*.c - Thin layer between Ruby API and the respective Crystal bindings.
-
Rakefile.rb - Build script for Anyolite.
-
src/BytecodeCompiler.cr - A simple script-like file to compile Ruby files into bytecode files.
-
src/BytecodeGetter.cr - A simple script-like file to compile Ruby files into bytecode arrays.
-
src/Macro.cr - A file in which all macro files are required.
-
src/Main.cr - The
Anyolite
module including most methods for regular use. -
src/Preloader.cr - Bytecode routines and macros.
-
src/RbArgCache.cr - A singleton module for temporarily storing block arguments.
-
src/RbCast.cr - Collection of methods for casting values between Ruby and Crystal.
-
src/RbClass.cr - A wrapper for Ruby classes.
-
src/RbClassCache.cr - Cache for wrapped classes and modules.
-
src/RbInternal.cr - Loads implementation-dependent Ruby API methods.
-
src/RbInterpreter.cr - A wrapper for the Ruby interpreter.
-
src/RbModule.cr - A wrapper for Ruby modules.
-
src/RbRefTable.cr - The reference table for the current interpreter and Crystal objects passed to Ruby.
-
src/RbTypeCache.cr - Container of internal Ruby data structures and destructors.
-
src/helper_classes/AnyolitePointer.cr - A special pointer container.
-
src/helper_classes/HelperClasses.cr - A template for binding helper classes.
-
src/implementations/**/FormatString.cr - Macros for generating format strings for methods.
-
src/implementations/**/Implementation.cr - Main file for implementation details.
-
src/implementations/**/KeywordArgumentStruct.cr - A structure for holding keyword arguments.
-
src/implementations/**/RbCore.cr - Actual bindings to the Ruby API methods.
-
src/macros/ArgConversions.cr - Macros to transform Ruby arguments into Crystal values.
-
src/macros/ArgTuples.cr - Generator for argument tuples.
-
src/macros/FunctionCalls.cr - Macros for calling wrapped methods.
-
src/macros/FunctionGenerators.cr - Macros for generating special methods.
-
src/macros/ObjectAllocations.cr - Generator for Ruby objects with Crystal content.
-
src/macros/RubyConversions.cr - Macros to retrieve Crystal data from Ruby objects.
-
src/macros/RubyTypes.cr - Macros for converting Ruby values into appropriate containers.
-
src/macros/UnionCasts.cr - Macros to resolve union arguments.
-
src/macros/WrapAll.cr - Macros to wrap all methods and constants of a class or module.
-
src/macros/WrapMethodIndex.cr - Special macro to find the right callbacks for a given method.
-
src/macros/Wrappers.cr - Macros used for generating callbacks.
-
test.cr - Test file (obviously).
-
utility/mruby_build_config.rb - Configuration file for mruby.
Beginner topics:
Advanced topics:
Modifications of Anyolite:
Other useful links: