The embeddable scripting language that doesn't fear real threads
mut counter: Owned i32 = 0;
fn addOne() {
for i in 0..10000 {
sync mut counter {
counter += 1;
}
}
}
fn addTwo(n: usize) {
for i in 0..n {
sync mut counter {
counter += 2;
}
}
}
fn main() {
const t2 = parallel addOne();
const t2 = parallel addTwo(20000);
addOne();
await t1;
await t2;
sync counter {
print(counter); // 60000
}
}Enable modders and designers to write gameplay scripts that leverage all CPU cores. Complex AI, physics callbacks, and game logic can run in parallel without sacrificing safety or determinism.
Add scriptable extensibility to audio workstations, video editors, and other latency-sensitive software. No garbage collector pauses, predictable performance, and true parallel execution.
Build simulations where thousands of interconnected entities share state across worker threads. Sync's ownership model ensures data consistency while maximizing throughput.
COMING SOON! Necessary primitives, robust error handling, powerful synchronization system (including deadlock detection), compiler, and interpreter.
Build a native package manager for Sync for easy sharing and integration. Minimizing supply chain attacks is a top priority.
Both the language server, and clients for popular code editors.
As an embeddable language, supporting all possible targets is a priority. In theory, it should work, but testing must be done.
For platforms that support it, a JIT compiler will push Sync to be the language of choice for extending applications.