Closed fire closed 1 month ago
Discussed with @fwsGonzo to try prototyping:
linux container with elixir, postgres, filesystem mount and REST web api
Develop a webservice using Elixir, including a mounted volume and PostgreSQL database, ensuring compatibility with Linux OS. The service must compile RustScript and C++Script into .elf format. Consider using Docker for deployment flexibility and potential reuse of existing containers. Address performance concerns due to latency issues from Brisbane, Australia to Accra, Ghana, which may require efficient data handling and possibly regional server deployment. API functionality requirements outlined by fwsgonzo include: -o output for building programs, --version for API versioning, and line printing functionalities. Input structure will be a nested directory of source files, potentially received as a zip file, which will be extracted by the web service.
Brew install:
brew install riscv64-elf-binutils riscv64-elf-gcc
Development Steps
mix.exs
.elf
format output.elf
Did an initial design.
Instead of a separate website and a separate docker system unify both into one docker that hosts a webservice.
https://hexdocs.pm/alcove/readme.html can use chroot or cgroups to sandbox os process executes
We should cache for all languages.
I can punt by using ccache and there's also the cache by mozilla https://github.com/mozilla/sccache
Zig has a build option ReleaseSmall that optimized, but produces small executables
now it only takes 900ms
Need to use ubuntu:24.04
Closed as https://github.com/libriscv/godot-sandbox/pull/151/files is more active.
We want low latency editor editing of CppScript and RustScript conversion to .elf.
Optional: Provide script source so it can be verified for correctness.
Two tech stacks come to mind:
Web stack
Local stack