https://github.com/peterhellberg/w4-init
Initialize a Zig ⚡ WASM-4 cart project
https://github.com/peterhellberg/w4-init
Last synced: 10 months ago
JSON representation
Initialize a Zig ⚡ WASM-4 cart project
- Host: GitHub
- URL: https://github.com/peterhellberg/w4-init
- Owner: peterhellberg
- License: mit
- Created: 2023-11-29T00:33:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T10:42:43.000Z (11 months ago)
- Last Synced: 2025-04-11T06:18:26.974Z (10 months ago)
- Language: Go
- Size: 27.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# w4-init :sparkles:
This is a command line tool that acts as a companion to my
[w4](https://github.com/peterhellberg/w4) module
for [Zig](https://ziglang.org/) :zap:
`w4-init` is used to create a directory containing code that
allows you to promptly get started coding on a cart for the
lovely little fantasy console [WASM-4](https://wasm4.org/).
The Zig build `.target` is declared as `.{ .cpu_arch = .wasm32, .os_tag = .wasi }`
and `.optimize` is set to `.ReleaseSmall`
> [!Important]
> No need to specify `-Doptimize=ReleaseSmall`
## Installation
(Requires you to have [Go](https://go.dev/) installed)
```sh
go install github.com/peterhellberg/w4-init@latest
```
## Usage
(Requires you to have an up to date (_nightly_) version of
[Zig](https://ziglang.org/download/#release-master) installed.
```sh
w4-init mycart
cd mycart
zig build run
```
> [!Note]
> There is also a `zig build --watch` command that can be used to trigger automatic reload of the WASM-4 cart running in the browser when a file is changed.
:seedling: