motely-wasm 4.3.16 → 5.0.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 +18 -23
- package/dist/bootsharp/dotnet.native.wasm +0 -0
- package/dist/index.mjs +54 -38
- package/dist/jaml.schema.json +1 -1
- package/dist/types/bindings.g.d.ts +9 -36
- package/package.json +15 -14
- package/dist/Motely.BrowserWasm.deps.json +0 -202
- package/dist/Motely.BrowserWasm.runtimeconfig.json +0 -48
- package/dist/Motely.Orchestration.pdb +0 -0
- package/dist/Motely.pdb +0 -0
- package/dist/bindings.g.d.ts +0 -41
- package/dist/bindings.g.js +0 -32
- package/dist/boot.d.ts +0 -38
- package/dist/boot.js +0 -66
- package/dist/bootsharp/Motely.BrowserWasm.deps.json +0 -202
- package/dist/bootsharp/Motely.BrowserWasm.runtimeconfig.json +0 -48
- package/dist/bootsharp/Motely.Orchestration.pdb +0 -0
- package/dist/bootsharp/Motely.pdb +0 -0
- package/dist/bootsharp/bindings.g.d.ts +0 -41
- package/dist/bootsharp/bindings.g.js +0 -32
- package/dist/bootsharp/boot.d.ts +0 -38
- package/dist/bootsharp/boot.js +0 -66
- package/dist/bootsharp/config.d.ts +0 -6
- package/dist/bootsharp/config.js +0 -60
- package/dist/bootsharp/decoder.d.ts +0 -1
- package/dist/bootsharp/decoder.js +0 -51
- package/dist/bootsharp/dotnet.diagnostics.js +0 -4
- package/dist/bootsharp/dotnet.g.d.ts +0 -697
- package/dist/bootsharp/dotnet.g.js +0 -2
- package/dist/bootsharp/dotnet.native.g.js +0 -2
- package/dist/bootsharp/dotnet.runtime.g.js +0 -2
- package/dist/bootsharp/event.d.ts +0 -49
- package/dist/bootsharp/event.js +0 -65
- package/dist/bootsharp/exports.d.ts +0 -3
- package/dist/bootsharp/exports.js +0 -5
- package/dist/bootsharp/imports.d.ts +0 -2
- package/dist/bootsharp/imports.js +0 -9
- package/dist/bootsharp/index.d.ts +0 -22
- package/dist/bootsharp/index.js +0 -15
- package/dist/bootsharp/index.mjs +0 -377
- package/dist/bootsharp/instances.d.ts +0 -16
- package/dist/bootsharp/instances.js +0 -36
- package/dist/bootsharp/modules.d.ts +0 -17
- package/dist/bootsharp/modules.js +0 -18
- package/dist/bootsharp/resources.d.ts +0 -18
- package/dist/bootsharp/resources.g.d.ts +0 -3
- package/dist/bootsharp/resources.g.js +0 -7
- package/dist/bootsharp/resources.js +0 -3
- package/dist/config.d.ts +0 -6
- package/dist/config.js +0 -60
- package/dist/decoder.d.ts +0 -1
- package/dist/decoder.js +0 -51
- package/dist/dotnet.diagnostics.js +0 -4
- package/dist/dotnet.g.d.ts +0 -697
- package/dist/dotnet.g.js +0 -2
- package/dist/dotnet.js +0 -4
- package/dist/dotnet.native.g.js +0 -2
- package/dist/dotnet.native.js +0 -16
- package/dist/dotnet.native.wasm +0 -0
- package/dist/dotnet.runtime.g.js +0 -2
- package/dist/dotnet.runtime.js +0 -3
- package/dist/event.d.ts +0 -49
- package/dist/event.js +0 -65
- package/dist/exports.d.ts +0 -3
- package/dist/exports.js +0 -5
- package/dist/imports.d.ts +0 -2
- package/dist/imports.js +0 -9
- package/dist/index.d.ts +0 -22
- package/dist/index.js +0 -15
- package/dist/instances.d.ts +0 -16
- package/dist/instances.js +0 -36
- package/dist/modules.d.ts +0 -17
- package/dist/modules.js +0 -18
- package/dist/resources.d.ts +0 -18
- package/dist/resources.g.d.ts +0 -3
- package/dist/resources.g.js +0 -7
- package/dist/resources.js +0 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# motely-wasm
|
|
2
2
|
|
|
3
|
-
Balatro seed search engine —
|
|
3
|
+
Balatro seed search engine — C# compiled to WebAssembly via NativeAOT-LLVM + Bootsharp. Full .NET runtime in the browser, native speed, no interpreter.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -11,39 +11,34 @@ npm install motely-wasm
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```js
|
|
14
|
-
import bootsharp, {
|
|
14
|
+
import bootsharp, { Motely } from "motely-wasm";
|
|
15
15
|
|
|
16
|
-
// Boot the WASM runtime
|
|
17
16
|
await bootsharp.boot();
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
const error = Program.validateJaml(jamlString);
|
|
18
|
+
const MW = Motely.Executors.MotelyWasm;
|
|
21
19
|
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
20
|
+
// Validate a JAML filter
|
|
21
|
+
const error = MW.validateJaml(jamlString);
|
|
22
|
+
if (error) console.error(error);
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
24
|
+
// Subscribe to events before searching
|
|
25
|
+
MW.onProgress.subscribe((searched, found, elapsedMs) => { /* ... */ });
|
|
26
|
+
MW.onResult.subscribe((seed, score) => { /* ... */ });
|
|
27
|
+
MW.onComplete.subscribe((status, seedsFound, highestScore) => { /* ... */ });
|
|
30
28
|
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```js
|
|
38
|
-
import schema from 'motely-wasm/jaml.schema.json';
|
|
29
|
+
// Search modes
|
|
30
|
+
await MW.runRandomSearch(jaml, threads, count);
|
|
31
|
+
await MW.runSearch(jaml, threads, batchCharCount, startBatch, endBatch);
|
|
32
|
+
await MW.runKeywordSearch(jaml, threads, keywords, padding);
|
|
33
|
+
await MW.runSeedListSearch(jaml, threads, seeds);
|
|
34
|
+
await MW.runPalindromeSearch(jaml, threads);
|
|
39
35
|
```
|
|
40
36
|
|
|
41
37
|
## Build
|
|
42
38
|
|
|
43
|
-
Built from [MotelyJAML](https://github.com/OptimusPi/MotelyJAML) via BootSharp + NativeAOT-LLVM.
|
|
44
|
-
|
|
45
39
|
```powershell
|
|
46
|
-
./
|
|
40
|
+
./publish.ps1 -WasmOnly # build only
|
|
41
|
+
./publish.ps1 -WasmOnly -Pack # build + npm pack
|
|
47
42
|
```
|
|
48
43
|
|
|
49
44
|
## License
|
|
Binary file
|