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.
Files changed (77) hide show
  1. package/README.md +18 -23
  2. package/dist/bootsharp/dotnet.native.wasm +0 -0
  3. package/dist/index.mjs +54 -38
  4. package/dist/jaml.schema.json +1 -1
  5. package/dist/types/bindings.g.d.ts +9 -36
  6. package/package.json +15 -14
  7. package/dist/Motely.BrowserWasm.deps.json +0 -202
  8. package/dist/Motely.BrowserWasm.runtimeconfig.json +0 -48
  9. package/dist/Motely.Orchestration.pdb +0 -0
  10. package/dist/Motely.pdb +0 -0
  11. package/dist/bindings.g.d.ts +0 -41
  12. package/dist/bindings.g.js +0 -32
  13. package/dist/boot.d.ts +0 -38
  14. package/dist/boot.js +0 -66
  15. package/dist/bootsharp/Motely.BrowserWasm.deps.json +0 -202
  16. package/dist/bootsharp/Motely.BrowserWasm.runtimeconfig.json +0 -48
  17. package/dist/bootsharp/Motely.Orchestration.pdb +0 -0
  18. package/dist/bootsharp/Motely.pdb +0 -0
  19. package/dist/bootsharp/bindings.g.d.ts +0 -41
  20. package/dist/bootsharp/bindings.g.js +0 -32
  21. package/dist/bootsharp/boot.d.ts +0 -38
  22. package/dist/bootsharp/boot.js +0 -66
  23. package/dist/bootsharp/config.d.ts +0 -6
  24. package/dist/bootsharp/config.js +0 -60
  25. package/dist/bootsharp/decoder.d.ts +0 -1
  26. package/dist/bootsharp/decoder.js +0 -51
  27. package/dist/bootsharp/dotnet.diagnostics.js +0 -4
  28. package/dist/bootsharp/dotnet.g.d.ts +0 -697
  29. package/dist/bootsharp/dotnet.g.js +0 -2
  30. package/dist/bootsharp/dotnet.native.g.js +0 -2
  31. package/dist/bootsharp/dotnet.runtime.g.js +0 -2
  32. package/dist/bootsharp/event.d.ts +0 -49
  33. package/dist/bootsharp/event.js +0 -65
  34. package/dist/bootsharp/exports.d.ts +0 -3
  35. package/dist/bootsharp/exports.js +0 -5
  36. package/dist/bootsharp/imports.d.ts +0 -2
  37. package/dist/bootsharp/imports.js +0 -9
  38. package/dist/bootsharp/index.d.ts +0 -22
  39. package/dist/bootsharp/index.js +0 -15
  40. package/dist/bootsharp/index.mjs +0 -377
  41. package/dist/bootsharp/instances.d.ts +0 -16
  42. package/dist/bootsharp/instances.js +0 -36
  43. package/dist/bootsharp/modules.d.ts +0 -17
  44. package/dist/bootsharp/modules.js +0 -18
  45. package/dist/bootsharp/resources.d.ts +0 -18
  46. package/dist/bootsharp/resources.g.d.ts +0 -3
  47. package/dist/bootsharp/resources.g.js +0 -7
  48. package/dist/bootsharp/resources.js +0 -3
  49. package/dist/config.d.ts +0 -6
  50. package/dist/config.js +0 -60
  51. package/dist/decoder.d.ts +0 -1
  52. package/dist/decoder.js +0 -51
  53. package/dist/dotnet.diagnostics.js +0 -4
  54. package/dist/dotnet.g.d.ts +0 -697
  55. package/dist/dotnet.g.js +0 -2
  56. package/dist/dotnet.js +0 -4
  57. package/dist/dotnet.native.g.js +0 -2
  58. package/dist/dotnet.native.js +0 -16
  59. package/dist/dotnet.native.wasm +0 -0
  60. package/dist/dotnet.runtime.g.js +0 -2
  61. package/dist/dotnet.runtime.js +0 -3
  62. package/dist/event.d.ts +0 -49
  63. package/dist/event.js +0 -65
  64. package/dist/exports.d.ts +0 -3
  65. package/dist/exports.js +0 -5
  66. package/dist/imports.d.ts +0 -2
  67. package/dist/imports.js +0 -9
  68. package/dist/index.d.ts +0 -22
  69. package/dist/index.js +0 -15
  70. package/dist/instances.d.ts +0 -16
  71. package/dist/instances.js +0 -36
  72. package/dist/modules.d.ts +0 -17
  73. package/dist/modules.js +0 -18
  74. package/dist/resources.d.ts +0 -18
  75. package/dist/resources.g.d.ts +0 -3
  76. package/dist/resources.g.js +0 -7
  77. 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 — .NET compiled to WebAssembly via BootSharp + NativeAOT-LLVM for browser use.
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, { Program } from 'motely-wasm';
14
+ import bootsharp, { Motely } from "motely-wasm";
15
15
 
16
- // Boot the WASM runtime
17
16
  await bootsharp.boot();
18
17
 
19
- // Validate JAML
20
- const error = Program.validateJaml(jamlString);
18
+ const MW = Motely.Executors.MotelyWasm;
21
19
 
22
- // Subscribe to search events
23
- Program.onSearchResult.subscribe((seed, score) => {
24
- console.log(`Found: ${seed} (score: ${score})`);
25
- });
20
+ // Validate a JAML filter
21
+ const error = MW.validateJaml(jamlString);
22
+ if (error) console.error(error);
26
23
 
27
- Program.onSearchProgress.subscribe((searched, found, elapsedMs) => {
28
- console.log(`Progress: ${searched} searched, ${found} found`);
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
- // Run a search
32
- Program.runSearch(jamlString, threadCount, batchCharCount);
33
- ```
34
-
35
- ## JAML Schema
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
- ./build-and-pack.ps1 -Wasm
40
+ ./publish.ps1 -WasmOnly # build only
41
+ ./publish.ps1 -WasmOnly -Pack # build + npm pack
47
42
  ```
48
43
 
49
44
  ## License
Binary file