Sign inSign up

bvarbanov/voda

By bvarbanov

•Updated over 1 year ago

JavaScript runtime with async stackful coroutines

Image
Languages & frameworks
0

2.8K

bvarbanov/voda repository overview

JavaScript runtime with stackful coroutines. https://voda.io/⁠

Pros:

  • Massive outburst of scripts running as coroutines (https://voda.io/test.html⁠)
  • Simple API without using async/await yet running in parallel
  • Built for Linux (x86_64, arm6, arm7, arm8, arm64)
  • Memory arenas per script/coroutine using single threaded non lockable memory
  • Polymorphic c/c++ allocators sharing same memory arena as script context
  • Similar to Flutter's Isolates for message passing between threads and scripts/coroutines
  • Caching the precompiled script modules for faster reuse
  • LRU cache for small script files and file handles
  • Thread pool dynamically grows and shrinks depending of workload
  • Using io_uring optimizations for Linux
  • asynchronous threads, processes and pipes (thank you boost::asio)
  • Predictive branching favoring desired outcomes (sounds smart, but it's a macro on every if statement)
  • There are no mutexes or any synchronization/ blocking calls
  • JavaScript library (quickjs) is using reference counting for it's garbage collections which makes c/c++ binding more deterministic and memory efficient
  • C/C++ metatemplates are used to "fuse" dynamic JavaScript objects with statically typed C++ counterparts
  • Built-in modules for SSL,Crypto, Networking, TCP sockets, Http/Https, Websockets, Threads...
  • Built-in WebRtc
  • Built-in TensorFlowLite (with hw support)
  • Built-in FFmpeg
  • Built-in SQlite, LevelDB

Cons:

  • no debugger
  • no final release date
  • no stable API
  • no complete test coverage
  • plan to open-source it until fall of 2024

Tag summary

Content type

Image

Digest

sha256:f325b2b98…

Size

304.5 MB

Last updated

over 1 year ago

docker pull bvarbanov/voda