summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-18 10:53:04 +0000
committerGitHub <noreply@github.com>2026-01-18 10:53:04 +0000
commit26d4d700f3b20579e48306b3171eedf1a09b060b (patch)
tree4953900e28f663ecc994236467d4ed623982b938 /README.md
parentddec9e9d167cc051f0d73df6733c63c31c4513fc (diff)
parent35e4160e642f91dfb6a1b46b812dbead6380ea55 (diff)
Merge pull request #67 from lamweilun/dev/weilun/emscripten_example
Minimal raylib game example to demonstrate compilation with emscripten
Diffstat (limited to 'README.md')
-rw-r--r--README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md
index af8ec31..7def09c 100644
--- a/README.md
+++ b/README.md
@@ -340,6 +340,8 @@ impl Point {
#### Traits
Define shared behavior.
```zc
+struct Circle { radius: f32; }
+
trait Drawable {
fn draw(self);
}
@@ -347,6 +349,9 @@ trait Drawable {
impl Drawable for Circle {
fn draw(self) { ... }
}
+
+var circle = Circle{};
+var drawable: Drawable = &circle;
```
#### Composition