@spglib/moyo-wasm 0.11.0 → 0.12.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 CHANGED
@@ -1,22 +1,26 @@
1
- # `moyo-wasm`
1
+ # moyo-wasm
2
2
 
3
- WASM bindings for the Rust crystal symmetry library `moyo`, for use in web apps.
3
+ [![image](https://img.shields.io/npm/v/%40spglib%2Fmoyo-wasm)](https://www.npmjs.com/package/@spglib/moyo-wasm)
4
4
 
5
- ## Usage
5
+ JavaScript and WebAssembly interface of [moyo](https://github.com/spglib/moyo), a fast and robust crystal symmetry finder.
6
+
7
+ - npm: <https://www.npmjs.com/package/@spglib/moyo-wasm>
6
8
 
7
- Install from a registry or local path:
9
+ ## Installation
8
10
 
9
- ```bash
10
- pnpm add moyo-wasm
11
- # or from cloned repo during development
12
- pnpm add file:/path/to/moyo/moyo-wasm/pkg
11
+ ```shell
12
+ npm install @spglib/moyo-wasm
13
+ # or from a cloned repo during development
14
+ npm install file:/path/to/moyo/moyo-wasm/pkg
13
15
  ```
14
16
 
17
+ ## Usage
18
+
15
19
  Initialize and analyze a structure:
16
20
 
17
21
  ```ts
18
- import init, { analyze_cell, type MoyoDataset, type MoyoCell } from 'moyo-wasm'
19
- import wasm_url from 'moyo-wasm/moyo_wasm_bg.wasm?url'
22
+ import init, { analyze_cell, type MoyoDataset, type MoyoCell } from '@spglib/moyo-wasm'
23
+ import wasm_url from '@spglib/moyo-wasm/moyo_wasm_bg.wasm?url'
20
24
 
21
25
  await init(wasm_url)
22
26
 
@@ -36,24 +40,18 @@ console.log(`Wyckoffs: ${result.wyckoffs.join(', ')}`)
36
40
 
37
41
  The package exports TypeScript types generated from Rust (e.g. `MoyoDataset`).
38
42
 
39
- ## Building
43
+ ## Development
40
44
 
41
- ```bash
42
- wasm-pack build moyo-wasm --target web --release
43
- ```
44
-
45
- The package code ready for publishing is in `moyo-wasm/pkg`.
45
+ Run from the repo root with `just` (or the equivalent npm commands from this directory):
46
46
 
47
- ## Testing
48
-
49
- ```bash
50
- cd moyo-wasm
51
- # Install dependencies
52
- npm install
53
- # Run tests
54
- npm test
47
+ ```shell
48
+ just js-install # npm install
49
+ just js-build # wasm-pack build --target web --release --scope spglib
50
+ just js-test # npm test
55
51
  ```
56
52
 
57
- ## Publish
53
+ The package code ready for publishing is generated in `moyo-wasm/pkg`. It is published to npm by CI when a new git tag is pushed to the monorepo.
54
+
55
+ ## How to cite moyo-wasm
58
56
 
59
- This crate is published as an [NPM package](https://www.npmjs.com/package/@spglib/moyo-wasm) with CI when a new `git` tag is pushed to the Rust monorepo.
57
+ See the citation information in [the root README](https://github.com/spglib/moyo/blob/main/README.md)
package/moyo_wasm_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@spglib/moyo-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for moyo crystal symmetry analysis",
5
- "version": "0.11.0",
5
+ "version": "0.12.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",