Skip to content

Commit 90cd1b2

Browse files
committed
kiwigrad
1 parent 0e736e5 commit 90cd1b2

File tree

3 files changed

+34
-23
lines changed

3 files changed

+34
-23
lines changed

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
</div>
1616

17-
<a href="https://github.com/Kaweees/micrograd">
17+
<a href="https://github.com/Kaweees/kiwigrad">
1818
<img alt="Zig Logo" src="assets/img/zig.svg" align="right" width="150">
1919
</a>
2020

2121
<div align="left">
22-
<h1><em><a href="https://github.com/Kaweees/micrograd">~micrograd</a></em></h1>
22+
<h1><em><a href="https://github.com/Kaweees/kiwigrad">~kiwigrad</a></em></h1>
2323
</div>
2424

2525
<!-- ABOUT THE PROJECT -->
@@ -56,8 +56,8 @@ To get a local copy of the project up and running on your machine, follow these
5656
1. Clone the project repository
5757

5858
```sh
59-
git clone https://github.com/Kaweees/micrograd.git
60-
cd micrograd
59+
git clone https://github.com/Kaweees/kiwigrad.git
60+
cd kiwigrad
6161
```
6262

6363
2. Install the project dependencies
@@ -81,29 +81,29 @@ To get a local copy of the project up and running on your machine, follow these
8181

8282
### Add as a dependency
8383

84-
To include `micrograd` in your Zig project, follow these steps:
84+
To include `kiwigrad` in your Zig project, follow these steps:
8585

8686
1. Add to your `build.zig.zon` file via `zig fetch`:
8787

8888
```sh
89-
zig fetch --save git+https://github.com/Kaweees/micrograd.git
89+
zig fetch --save git+https://github.com/Kaweees/kiwigrad.git
9090
```
9191

9292
2. Add the following line to your `build.zig` file:
9393

9494
```zig
95-
const micrograd = @import("micrograd");
95+
const kiwigrad = @import("kiwigrad");
9696
9797
pub fn build(b: *std.Build) void {
9898
// exe setup...
9999
100-
const micrograd_dep = b.dependency("micrograd", .{
100+
const KiwiGrad_dep = b.dependency("kiwigrad", .{
101101
.target = target,
102102
.optimize = optimize,
103103
});
104104
105-
const micrograd_module = micrograd_dep.module("micrograd");
106-
exe.root_module.addImport("micrograd", micrograd_module);
105+
const KiwiGrad_module = KiwiGrad_dep.module("kiwigrad");
106+
exe.root_module.addImport("kiwigrad", KiwiGrad_module);
107107
108108
// additional build steps...
109109
}
@@ -112,17 +112,28 @@ To include `micrograd` in your Zig project, follow these steps:
112112

113113
## Usage
114114

115-
`micrograd` is designed to be easy to use. You can include the library in your Zig project by adding the following line to your source files:
115+
`kiwigrad` is designed to be easy to use. You can include the library in your Zig project by adding the following line to your source files:
116116

117117
```zig
118-
const micrograd = @import("micrograd");
118+
const kiwigrad = @import("kiwigrad");
119119
```
120120

121+
### Benchmarks
122+
123+
`kiwigrad` is capable of rendering 3D scenes with thousands of triangles at interactive frame rates. The following benchmarks were conducted on a 2019 MacBook Pro with a 2.3 GHz 8-Core Intel Core i9 processor and 16 GB of RAM.
124+
125+
| Benchmark | Description | Result |
126+
| --------- | ----------- | ------ |
127+
| `cube` | Render a cube with 12 triangles | 60 FPS |
128+
| `sphere` | Render a sphere with 960 triangles | 60 FPS |
129+
| `bunny` | Render a Stanford Bunny with 69451 triangles | 60 FPS |
130+
| `dragon` | Render a Stanford Dragon with 871306 triangles | 60 FPS |
131+
121132
<!-- PROJECT FILE STRUCTURE -->
122133
## Project Structure
123134

124135
```sh
125-
micrograd/
136+
kiwigrad/
126137
├── .github/ # GitHub Actions CI/CD workflows
127138
├── src/ # Library source files
128139
│ ├── lib.zig # Public API entry point
@@ -135,17 +146,17 @@ micrograd/
135146

136147
## License
137148

138-
The source code for [Kaweees/micrograd](https://github.com/Kaweees/micrograd) is distributed under the terms of the MIT License, as I firmly believe that collaborating on free and open-source software fosters innovations that mutually and equitably beneficial to both collaborators and users alike. See [`LICENSE`](./LICENSE) for details and more information.
149+
The source code for [Kaweees/kiwigrad](https://github.com/Kaweees/kiwigrad) is distributed under the terms of the MIT License, as I firmly believe that collaborating on free and open-source software fosters innovations that mutually and equitably beneficial to both collaborators and users alike. See [`LICENSE`](./LICENSE) for details and more information.
139150

140151
<!-- MARKDOWN LINKS & IMAGES -->
141152
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
142153

143-
[contributors-shield]: https://img.shields.io/github/contributors/Kaweees/micrograd.svg?style=for-the-badge
144-
[contributors-url]: https://github.com/Kaweees/micrograd/graphs/contributors
145-
[forks-shield]: https://img.shields.io/github/forks/Kaweees/micrograd.svg?style=for-the-badge
146-
[forks-url]: https://github.com/Kaweees/micrograd/network/members
147-
[stars-shield]: https://img.shields.io/github/stars/Kaweees/micrograd.svg?style=for-the-badge
148-
[stars-url]: https://github.com/Kaweees/micrograd/stargazers
154+
[contributors-shield]: https://img.shields.io/github/contributors/Kaweees/kiwigrad.svg?style=for-the-badge
155+
[contributors-url]: https://github.com/Kaweees/kiwigrad/graphs/contributors
156+
[forks-shield]: https://img.shields.io/github/forks/Kaweees/kiwigrad.svg?style=for-the-badge
157+
[forks-url]: https://github.com/Kaweees/kiwigrad/network/members
158+
[stars-shield]: https://img.shields.io/github/stars/Kaweees/kiwigrad.svg?style=for-the-badge
159+
[stars-url]: https://github.com/Kaweees/kiwigrad/stargazers
149160

150161
<!-- MARKDOWN SHIELD BAGDES & LINKS -->
151162
<!-- https://github.com/Ileriayo/markdown-badges -->

build.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub fn build(b: *std.Build) void {
6060
// Modules can depend on one another using the `std.Build.Module.addImport` function.
6161
// This is what allows Zig source code to use `@import("foo")` where 'foo' is not a
6262
// file path. In this case, we set up `exe_mod` to import `lib_mod`.
63-
exe_mod.addImport("micrograd", lib_mod);
63+
exe_mod.addImport("kiwigrad", lib_mod);
6464

6565
// This creates another `std.Build.Step.Compile`, but this one builds an executable
6666
// rather than a static library.
@@ -120,7 +120,7 @@ pub fn build(b: *std.Build) void {
120120

121121
// Creates a step for generating documentation
122122
const lib_docs = b.addObject(.{
123-
.name = "micrograd-docs",
123+
.name = "kiwigrad-docs",
124124
.root_module = lib_mod,
125125
});
126126

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// It is redundant to include "zig" in this name because it is already
88
// within the Zig package namespace.
9-
.name = .micrograd,
9+
.name = .kiwigrad,
1010

1111
// This is a [Semantic Version](https://semver.org/).
1212
// In a future version of Zig it will be used for package deduplication.

0 commit comments

Comments
 (0)