Giter VIP home page Giter VIP logo

Comments (2)

holzschu avatar holzschu commented on July 16, 2024

Thanks for reaching out. This is an interesting question.
For security reasons, you cannot add any binary to an app after it has been approved by Apple: the approval process must see the entire app, with all its functionalities. Or rather, you can add binaries, but the app cannot execute them.

For this reason, the app ships with a lot of bundled packages (the most essential ones). These are compiled with a regular C compiler, after being edited in a few places where iOS differs from OSX:

  • no access to $HOME, only to $HOME/Documents so all configuration files have to move.
  • stdin, stdout, stderr do nots exist, they are replaced with thread-local versions (thread_stdin, thread_stdout, thread_stderr).
  • no fork()/exec() mechanism for parallelism, it is replaced by threads.
    The repository to generate Python and all the associated packages used in a-Shell and Carnets is here: https://github.com/holzschu/cpython

To make things worse, there are differences between the binary format used in OSX and the binary format used in iOS, so you cannot take a binary generated for OSX and use it in iOS (on top of the differences between the file systems).

Which of your Python packages were you trying to add to a-Shell?

from a-shell.

Crissium avatar Crissium commented on July 16, 2024

Thanks for your detailed explanation! Much appreciated. I now understand why a-Shell can only make use of pure Python packages.

I was trying to install this one, which doesn't read from the filesystem, nor prints anything or reads any input from stdin. And no parallelism is utilised. But probably it is too special-interest to be included in a-Shell since the only functionality is to translate a special format into HTML. Anyway the pure Python alternative works well enough on powerful Apple chips…

from a-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.