{build,wasmserve}: use wasmserve, drop apple_pie
This commit is contained in:
parent
ebb4b9c2fe
commit
5be9f04d85
18 changed files with 747 additions and 133 deletions
31
tools/wasmserve/README.md
Normal file
31
tools/wasmserve/README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# mach/wasmserve
|
||||
|
||||
Small web server specifically for serving Zig WASM applications in development
|
||||
|
||||
## Getting started
|
||||
|
||||
### Adding dependency
|
||||
|
||||
In a `libs` subdirectory of the root of your project:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/machlibs/wasmserve
|
||||
```
|
||||
|
||||
Then in your `build.zig` add:
|
||||
|
||||
```zig
|
||||
...
|
||||
const wasmserve = @import("libs/wasmserve/wasmserve.zig");
|
||||
|
||||
pub fn build(b: *Builder) void {
|
||||
...
|
||||
const serve_step = try wasmserve.serve(exe, .{ .watch_paths = &.{"src/main.zig"} });
|
||||
const run_step = b.step("run", "Run development web server");
|
||||
run_step.dependOn(&serve_step.step);
|
||||
}
|
||||
```
|
||||
|
||||
## Join the community
|
||||
|
||||
Join the Mach community [on Discord](https://discord.gg/XNG3NZgCqp) or [Matrix](https://matrix.to/#/#hexops:matrix.org) to discuss this project, ask questions, get help, etc.
|
||||
Loading…
Add table
Add a link
Reference in a new issue