Skip to content

Commit

Permalink
Update to libriscv v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Jun 4, 2024
1 parent 28f749e commit 7fbd594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ For discussions & help, [visit Discord](https://discord.gg/n4GcXr66X5).

This project aims to change how scripting is done in game engines. Lua, Luau and even LuaJIT have fairly substantial overheads when making function calls into the script, especially when many arguments are involved. The same is true for WebAssembly emulators that I have measured, eg. wasmtime. I have yet to find another low latency emulator, actually. As a result, script functions are considered expensive to call, regardless of how little or how much they do, especially when used from a game engine where there is a tight deadline every frame. That changes thinking and design in projects accordingly. This repository is an attempt at making game scripting low latency, so that even automation games where interactions between complex machinery requires billions of script function calls, can still be achieved in a timely manner.

Further, the emulator has a binary translation mode where the latency is lowered even further. And this translation can be cross-compiled to end-user platforms (eg. Windows), where it can be used to the same effect, transparently to users.


## Demonstration

This repository is built as a demonstration of how you could use advanced techniques to speed up and blur the lines between native and emulated modern C++. The main function is in [engine/src](engine/src/main.cpp). See also the [unit tests](/tests/).

All the host-side code is in the engine folder, and is written as if it was running inside a tiny fictional game framework.

The script programs are using modern C++20 using a GNU RISC-V compiler with RTTI and exceptions being optional. Several CRT functions have been implemented as system calls, and will have native performance.
The script programs are using modern C++20 using a GNU RISC-V compiler with RTTI and exceptions enabled, but optional. Several CRT functions have been implemented as system calls, and will have native performance.

The example programs have some basic timers and threads, as well as some examples making calls between machines.

Expand Down
2 changes: 1 addition & 1 deletion ext/libriscv

0 comments on commit 7fbd594

Please sign in to comment.