ZEN CCommunity Edition
Moderne Ergonomie.
Null Overhead.
Reines C.
Strenge Sprache mit Pattern Matching.
$ git clone https://github.com/zenc-lang-ce/zenc.git
echo_server.zc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import "std/net/tcp.zc"
fn main() {
"Echo-Server hört auf :8080";
let listener = TcpListener::bind("127.0.0.1", 8080).unwrap();
loop {
// Neue Verbindungen akzeptieren
let stream = listener.accept().unwrap();
let buf: char[1024];
while true {
let n = stream.read(&buf[0], 1024).unwrap();
if n == 0 { break; }
stream.write(&buf[0], n);
}
}
}
ENTWICKELT FÜR:
SPIELE
•
HOCHLEISTUNGSSOFTWARE
•
EMBEDDED SYSTEMS
•
KERNEL-ENTWICKLUNG
Kompilieren
KLONEN
git clone https://github.com/zenc-lang-ce/zenc.git
BAUEN
make
INSTALLIEREN
sudo make install
Funktioniert mit GCC!
Null Reibung.
Transparenz von C.
liest_das_wirklich_jemand.zc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
struct Features {
transparent_compilation: bool;
native_c_abi: bool;
resource_management: bool;
monomorphization: bool;
pattern_matching: bool;
async_await: bool;
}
impl Features {
// Konstruktor. Alle Features sind aktiviert!
fn new() -> Self {
return Features{
transparent_compilation: true,
native_c_abi: true,
resource_management: true,
monomorphization: true,
pattern_matching: true,
async_await: true,
};
}
// Beschreiben Sie die Sprache in einer Zeile
fn describe(self) {
println "Moderne Ergonomie. Null Overhead. Reines C.";
}
}
fn main() {
let zc = Features::new();
zc.describe();
}
transparent_compilation
Kompiliert in C11.
native_c_abi
C-Funktionen ohne FFI.
resource_management
Drop-Trait ohne GC.
monomorphization
Zero-Overhead-Generics.
async_await
Asynchrone I/O.
pattern_matching
Pattern Matching.
zero_cost_generics
Kein virtueller Dispatch.
Polyglott
Passt sich an.
CUDA
--cudaGPU-Kernels.
@global
fn add(a: float*, b: float*) {
let i = thread_id();
a[i] += b[i];
}
C++
--cppC++ Code.
raw {
std::vector<int> get_vec() {
return {1, 2, 3};
}
}
Objective-C
--objcmacOS.
raw {
id pool = [[NSPool alloc] init];
[pool drain];
}
Videos
Tutorials ansehen.
Der Weg
Roadmap zur Reife.
0x00
Aktuell
Kern
- C-Kompilierung
- C++ Interop
- RAII
- Generics
- LSP
0x10
Als nächstes
Ökosystem
- Paketmanager
- Wasm
- LSP Extra
- std Plus
0x20
Horizont
Semantik
- async/await
- comptime
- Plugins
- Compiler
0x30
Ziel
1.0
- Spezifikation
- API Freeze
- ABI
- Kernel