Skip to content

Modularity and support for a second language (discussion) #142

Description

@maxirmx

Current state of modularity

Existing tebako packager includes two compore modularity

  • libdwarfs
  • tebako

libdwarfs

libdwarfs is a library that provides our implementation of IO functions used by Ruby. This implementation reroutes calls to memfs or host filesystem.

libdwarfs uses upstream dwars project. dwarfs provides filesystem driver API and libdwarfs implements application API atop. 'application API' is a subset of Posix API plus some OS-specific functions used by Ruby as mentioned above.

  • conventional, meaning that there is nothing unsual in functions that implement Posix API ontop of custom user-space filesystem driver
  • reusable, meaning that the same library can be used to support packaging of multiple languages in addition to Ruby
  • extendable, meaning that if languages other then Ruby require functions not currently supported by libdwarfs then such functions can be added to libdwarfs

Reusability and extendability statement is correct for Liinux (gnu, musl) and MacOS implementation of tebako.
Windows version of Ruby implements its own Posix compatibility layer so Windows version of libdwarfs includes a module that implements our version of Ruby Posix compatibility layer.

tebako

Existing tebako component implements Ruby code patching and drives tebako pac are skage builds and rebuilds
Ruby patching is required to meet two objectives

  • static ("single file") linking. Theoretically, static linking is supported by Ruby. Practically Ruby team does not test it after version 2.5. It results in issues and these issues differ from version to version anbd from platform to platform
  • routing IO calls to libdwarfs.

Tebako itself is

  • uncoventional, meaning that Ruby (or any other language) core team won't suppose and support such patching
  • not resuable, meaning that all research, tests and implementation created for Ruby have little value for other languages
  • not extendable, meaning that it does not look feasible to extend exisitng code to support other languages. I believe for other language we have do develop independent patching and independent build driver

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions