1,688 karma · joined June 6, 2017
libriscv in interpreter mode is fast compared to other interpreters, but not near native performance. As I wrote earlier in the thread using something backed by KVM is what I would do if I were architecting a solution for someone. Eg. my TinyKVM KVM-based userspace emulator would fit the bill.
I think when it comes to being integrated into a web server, you ideally want to use the web servers pipeline to make requests, so that you can benefit from the same logging and observability that Drogon (or other solutions) already have.
If you allow the VM to make requests on its own, you just have the IP and an open socket. Not much to debug with if (let's say) you have a customer asking about something.
https://github.com/moonbitlang/minimoonbit-public
So, maybe not the official compiler but something else is already using it?
I might add RISC-V support myself, as I am the author of libriscv. We'll see.
I would be talking to a lawyer. You might even consider it part of your job to have a working relationship with a lawyer.
Who doesn't have any taters in the family these days? A literal human trafficker and pimp who has been in prison is giving advice to our youth in droves. More than you will ever know. My family members stopped talking about it, and started complaining about how we can't talk about things anymore once they discovered that outside of their bubble people know what these monsters/grifters actually do.
What happened to good old sandboxing and modding APIs?
"We didn't sandbox mods from the start"
See: https://ieeexplore.ieee.org/document/10475832
I also implemented VM resets using page-table rewrites and CoW memory sharing, so that no memory is shared across different requests. This can be implemented as tail-latency in a cache.
I ended up adding support for most languages. All the systems languages, Go, v8, LuaJit etc. Go was by far the most annoying to support as it uses signals.
Or any other option. Really. So many investigations, so much time wasted.
It's especially nice to have JavaScript disabled by default, so I can enable one script at a time until it becomes readable. But not so many scripts that it becomes unreadable again.
https://github.com/libriscv/godot-sandbox
I originally started on it just to get into Godot.
function fib(n, acc, prev)
if (n < 1) then
return acc
else
return fib(n - 1, prev + acc, acc)
end
end
print(fib(50, 0, 1))
$ ./rvlinux -P ~/github/LuaRiscvJIT/src/luajit -- test.lua
12586269025
>>> Program exited, exit code = 0 (0x0)
Runtime: 0.281ms (Use --accurate for instruction counting)
Pages in use: 429 (1716 kB virtual memory, total 2674 kB)
It's definitely working!Alright, time to run some LuaJIT in my RISC-V emulator.