I want to run a c# cli with command line arguments client side through a web page. I have looked at some other implementations like WebAssembly ffmpeg. As an example i want to be able to do something like this:
Client side javascript:
const program = createCSharpCLI();
await program.load();
await program.run("first line ", " second line");
const file = program.FS("readFile", "file.txt")
console.log(file.readAsText()) // output: "first line \n second line"
Program.cs:
using System.IO;
using System.Threading.Tasks;
class TestClass
{
static void Main(string[] args)
{
// Write a file containing arguments.
await File.WriteAllLinesAsync("file.txt", args);
}
}