@kuncat/avoidant 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Avoidant
2
+
3
+ ## Developing
4
+
5
+ ### Prerequisites
6
+
7
+ WebAssembly compilation target
8
+
9
+ ```sh
10
+ rustup target add wasm32-unknown-unknown
11
+ ```
12
+
13
+ wasm-pack
14
+
15
+ ```sh
16
+ cargo install wasm-pack
17
+ ```
18
+
19
+ Nightly Rust toolchain (required for WebAssembly threads via wasm-bindgen-rayon)
20
+
21
+ ```sh
22
+ rustup toolchain install nightly --component rust-src --target wasm32-unknown-unknown
23
+ ```
24
+
25
+ On static hosting, ensure cross-origin isolation headers (for browser WebAssembly threads):
26
+ `Cross-Origin-Opener-Policy: same-origin` and
27
+ `Cross-Origin-Embedder-Policy: require-corp`
28
+
29
+ ### Running
30
+
31
+ Install dependencies with `npm install` then start a development server:
32
+
33
+ ```sh
34
+ npm run dev
35
+
36
+ # or start the server and open the app in a new browser tab
37
+ npm run dev -- --open
38
+ ```
39
+
40
+ ## Building
41
+
42
+ ### WASM
43
+
44
+ ```
45
+ npm run build:wasm
46
+ ```
47
+
48
+ ### App
49
+
50
+ ```sh
51
+ npm run build
52
+ ```
53
+
54
+ You can preview the production build with `npm run preview`.
55
+
56
+ ## Testing
57
+
58
+ ### WASM Headless Browser test
59
+
60
+ ```
61
+ cd crates/game && wasm-pack test --headless --firefox
62
+ ```
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>Avoidant</title><g fill="silver" stroke="#000" stroke-linejoin="round" stroke-width="1.25"><path d="m1 1 13 1 1 15-15 2Z"/><path d="M14 2 29.366.106l-.326 17.577L15 17Zm18 16-2.044 11.956-12.379.211L15 17Z"/><path d="M2.467 18.894 15 17l5 15H2Z"/></g></svg>