Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH (or other) support in Squircle-CE for executing code in termux (or other compiler) #200

Open
Dani3I opened this issue May 28, 2023 · 1 comment
Assignees
Labels
feature A new feature or improvement

Comments

@Dani3I
Copy link

Dani3I commented May 28, 2023

Is your feature request related to a problem? Please describe.
It would be cool if I would be able to run code that I write in this code editor.

Describe alternatives you've considered

  • adding full compiler into this code editor - but I know that adding compilers to android app probably is not easy task.
  • putting termux inside Squircle-CE or having direct integration with termux app - termux have package manager and you can install code compilers inside termux to compile code into working program. But it also might be not easy task to integrate termux with Squircle-CE.

Describe the solution you'd like
I am not sure if it is easy to do but I thought that maybe instead of integrating termux or entire compiler into this app (or making some other direct integration), it would be possible to create "simple" ssh (or other remote access - maybe some information about remote access on termux wiki will help: https://wiki.termux.com/wiki/Remote_Access ) client inside Squircle-CE, which would be connected to server created inside termux on this same android device. Maybe other app instead of termux would be also suitable: but I know only about "Nix-on-Droid" ( https://f-droid.org/packages/com.termux.nix/ ), which is Nix package manager inside port of termux if I understand correctly.

Additional context
I have few ideas which would maybe simplify experience:

  • creating quick shortcuts in Squircle-CE which would paste command into SSH which you need to run to compile code in language you are writing code.
  • If needed, create guide (or probably preferably script; or maybe even package for termux package manager) on how to setup termux to work with Squircle-CE.

How I imagine it working in real world:

  1. You run (needed only at first time) command inside termux to have access to files on your device ("termux-setup-storage").
  2. You download compiler you want inside termux.
  3. You run SSH (or other remote access) server inside termux.
  4. You setup your Squircle-CE to connect to this SSH server (either automatically connect to SSH when you run Squircle-CE or via button inside app).
  5. You click button to run code. This button:
    1. opens "terminal" inside Squircle-CE (it might be on half of the screen or on completely separate screen or "tab"),
    2. runs command inside ssh which moves you into directory where file you want to compile is located,
    3. runs command that compiles code (probably based on extension of file you want to compile; but also probably it would be a good idea to have option to run compiler you selected),
    4. runs command that run compiled code and shows it inside ssh.

All of this might be also simplified, for example, as I said before, via script inside termux, and also in a way that for example, when you click button to run code in Squircle-CE, then it automatically detects if compiler for language you want to run is present - if not then it downloads it.

Also, instead of moving into directory where file is located, there might be some dedicated directory for Squircle-CE.

Also, of course I guess there might be more buttons, for example to only compile code etc.

@Dani3I Dani3I added the feature A new feature or improvement label May 28, 2023
@massivemadness
Copy link
Owner

Hi @Dani3I, thank you for well formatted and described issue.

I absolutely understand the need of this feature, however the termux has very unintuitive and poorly documented SDK (it's just my personal opinion), which greatly hinders development. Last time I looked into integration I ran into a problem where I/O didn't work at all, I couldn't send a command and receive the output even with all the permissions granted.

I don't want to go through the same steps over and over again because I have other high priority projects right now, but if I find some good integration examples I'll try to make it work 🙆‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants