Xed-Editor / KarbonIDE

Extended Version of Karbon
MIT License
5 stars 0 forks source link

Feature Request: Support for Compiling C Programs #2

Open Brajesh3 opened 1 month ago

Brajesh3 commented 1 month ago

Is your feature request related to a problem? Please describe. As a student, I often need to compile and run C programs for my coursework. It’s frustrating that the editor currently doesn’t support this, forcing me to switch between the editor and other environments. This disrupts my learning process and makes it harder to focus on coding.

Describe the solution you'd like I would like the editor to support compiling C programs using GCC or Clang with single click. This feature should allow students like me to compile and execute C programs directly within the editor, making it easier to test code without leaving the environment.

Describe alternatives you've considered (Termux) + (nano/neovim) + (gcc,clang,make)

Additional context Leveraging libtermux to utilize Termux’s package manager for installing necessary compilers could be an effective way to implement this feature. An intuitive interface within the editor for compiling and running C code would greatly benefit students by making the learning process smoother and more integrated.

AndroMaster436 commented 1 month ago

At the moment, the termux library is used in the application as a regular android terminal emulator. To solve your problem, @RohitKushvaha01 need to replace it with termux bootstrap and configure the runner so that it starts a terminal session with a ready-made command to launch your application on .c

Brajesh3 commented 1 month ago

If the plugin system could eventually support this kind of functionality, it would open up a lot of possibilities, not just for C programming but for other languages as well. Looking forward to seeing how the project evolves!

RohitKushvaha01 commented 1 month ago

due to changes in Android's security policies starting from Android 9 (API level 28), it's no longer possible for apps to execute binaries. This limitation is one of the reasons why Termux has remained on API level 29, as updating to a higher target API would prevent it from functioning as intended, particularly on Android 10 and later.Given that Karbon targets API level 33, these restrictions are even more stringent, meaning that executing external binaries is not feasible unless they are bundled directly with the app or the app is targeting Api 29 or below. I am considering to change the target Api to 29 to make this possible

Brajesh3 commented 3 weeks ago

Runner for c/c++