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

API? #201

Open
marss72 opened this issue Jun 21, 2024 · 3 comments
Open

API? #201

marss72 opened this issue Jun 21, 2024 · 3 comments

Comments

@marss72
Copy link

marss72 commented Jun 21, 2024

I have two questions. One is about whether the bflat compiler is standalone, and the second is about API.

  1. Is the bflat executable really standalone? So, can I automate the download in my app from this GitHub repo (from releases) and use the bflat executable from the compressed zip, without any other dependencies than everything inside the downloaded archive?
  2. Is there an API I could use in my app to better integrate with bflat? I'm able to use the Process.Start, but is there something, or some wrapper I could use?

Thanks!

@MichalStrehovsky
Copy link
Member

Yes, it's standalone and shouldn't need anything. If you're on linux and need crypto APIs, you'll need libssl installed.

There's no API besides the command line interface of bflat.

@marss72
Copy link
Author

marss72 commented Jun 22, 2024

Thanks for your reply!

There's no API besides the command line interface of bflat.

Is there anything I could use to not write the C# script on the disk or the assembly on the disk? Like output/input redirection to bflat? I tried input redirection, but that did not work. I think this would be a great feature to add (reading C# script to compile from redirected input and possibly output, but that would introduce some problems with symbols file for example). If this would be added, one of the options to read from the redirected input would be to specify a specific input arg so for example $rinput <redirected_input>.

Thanks! I theoretically could be able to make a PR for that, but I don't want to break anything as I'm new to bflat.

@MichalStrehovsky
Copy link
Member

I think the redirection should "just work".

I tried:

bflat build con -o test.exe
System.Console.WriteLine("Hello!");
^Z

And it worked for me on Windows. On Linux, I assume you'd use /dev/tty and whatever is the sequence to send EOF or something like that.

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

No branches or pull requests

2 participants