At a glance.
- Easy to learn.
- Dynamic and gradual types.
- Concurrency with fibers.
- Multithreaded.
- Memory safe.
- FFI and Embeddable.
NOTE: Cyber is currently at (v0.2) and is unstable. Multithread features are still in the design phase.
import m 'math'
worlds = ['World', '世界', 'दुनिया']
worlds.append(m.random())
for worlds each w:
print 'Hello, {w}!'
func fib(n int) int:
coyield
if n < 2:
return n
return fib(n - 1) + fib(n - 2)
count = 0 -- Counts iterations.
fiber = coinit fib(30)
while fiber.status() != #done:
res = coresume fiber
count += 1
print '{res} {count}'
Who's it for.
Cyber wants to provide fast and delightful scripting. You can embed Cyber into your applications, games, and engines on desktop or the web. Cyber also comes with a CLI so you can do scripting on your computer.
Performance.
Cyber is fast on various benchmarks. See more Benchmarks. The fast performance is due to careful design of the compiler, bytecode, and interpreter. Read about Performance.
Concurrency.
Cyber provides granular control over script execution with fibers. Cyber plans to add multithread support with actors and channels. Read about Concurrency.
Memory safety.
Cyber achieves memory safety through automatic reference counting instead of a tracing garbage collector. This gives Cyber scripts reliable performance in realtime applications. Read about Memory safety.
Gradual types.
Cyber is dynamically typed by default with gradual typing to provide type checks and guarantees. Using types also helps the compiler create more efficient bytecode resulting in faster script execution.
FFI and embedding.
Cyber supports calling into C ABI compatible libraries. You can also embed Cyber into your application, game, or engine.
Support the Project.
If you like Cyber, please consider supporting the project via Github Sponsors or Patreon!
You can also hop over to our Discord if you have any questions about Cyber.