ArachnidAbby / BCL

BCL Compiled Language (BCL)
https://discord.gg/sShr7fMNFn
GNU General Public License v3.0
21 stars 0 forks source link

[FEATURE REQUEST] BCL needs a cross-platform runtime #17

Open ArachnidAbby opened 1 year ago

ArachnidAbby commented 1 year ago

Description of the feature

The language needs some kind of cross-platform runtime instead of relying on the gcc C runtime. (I believe we use crt1 found in /lib on linux?). This will eventually bring us closer to full windows and mac support.

Benefits

This not only allows a larger degree of control over the execution of code in BCL, but we can also have things like default initialized global variables which are otherwise impossible without a runtime to ensure that those global actually get initialized.'

Features needed to accomplish this

Changing the runtime at compilation

bcl compile main.bcl --emit-binary --run --rt=myCustomRuntime.bcl

Possible issues that may make this feature difficult to implement

Creating a runtime can run into many issues, especially a cross-platform one. Not to mention trying to ensure everything works while updating BCL may be a pain. It may be worth looking into setting up something like azure devops. Unfortunately this is hard to setup as compiling llvmlite (a necessary dependency) is annoying. Especially as of recently.

ArachnidAbby commented 9 months ago

turns out this is less possible than I thought. We must rely on the c runtime, but we can use the libc entry symbol. This basically means we use 2 runtimes. very fun.