bunmicro 1.0.3 → 1.0.4
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/CHANGELOG.md +3 -0
- package/README.md +5 -0
- package/package.json +1 -1
- package/runtime/wasmoon_glue.wasm +0 -0
- package/single-exe/assets.tar +0 -0
- package/single-exe/packAssets.sh +1 -1
- package/src/index.js +6 -3
- package/src/lua/engine.js +4 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -129,6 +129,11 @@ bun x bunmicro
|
|
|
129
129
|
# bun ~/.bun/bin/bunmicro
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
+
## Option 3: Git + Bun
|
|
133
|
+
- git clone https://github.com/jjtseng93/bunmicro.git
|
|
134
|
+
- cd bunmicro
|
|
135
|
+
- bun src/index.js
|
|
136
|
+
|
|
132
137
|
# Basic features
|
|
133
138
|
- Inherited from the original Golang micro
|
|
134
139
|
- Only features listed here are implemented
|
package/package.json
CHANGED
|
Binary file
|
package/single-exe/assets.tar
CHANGED
|
Binary file
|
package/single-exe/packAssets.sh
CHANGED
package/src/index.js
CHANGED
|
@@ -791,9 +791,12 @@ async function buildExecutable(target = "") {
|
|
|
791
791
|
stdio: "inherit",
|
|
792
792
|
env: process.env,
|
|
793
793
|
});
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
794
|
+
|
|
795
|
+
console.log("");
|
|
796
|
+
console.log(Bun.markdown.ansi(
|
|
797
|
+
'- Status: '+result.status+' for '+step.label
|
|
798
|
+
));
|
|
799
|
+
|
|
797
800
|
}
|
|
798
801
|
|
|
799
802
|
console.log(`Built executable: ${outfile}`);
|
package/src/lua/engine.js
CHANGED
|
@@ -30,7 +30,8 @@ export async function createLuaEngine() {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async function resolveLuaWasmLocation() {
|
|
33
|
-
const
|
|
33
|
+
const wasmAssetPath = "runtime/wasmoon_glue.wasm";
|
|
34
|
+
const wasmBytes = readInternalAssetBytes(wasmAssetPath);
|
|
34
35
|
if (wasmBytes) {
|
|
35
36
|
const wasmPath = join(tmpdir(), "bunmicro-wasmoon-glue.wasm");
|
|
36
37
|
try {
|
|
@@ -46,8 +47,8 @@ async function resolveLuaWasmLocation() {
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
const fallbackPath = isCompiledBinary(process.argv)
|
|
49
|
-
? join(resolveCompiledBaseDir({ argv: process.argv }),
|
|
50
|
-
: join(SOURCE_ROOT,
|
|
50
|
+
? join(resolveCompiledBaseDir({ argv: process.argv }), wasmAssetPath)
|
|
51
|
+
: join(SOURCE_ROOT, wasmAssetPath);
|
|
51
52
|
|
|
52
53
|
return existsSync(fallbackPath) ? fallbackPath : undefined;
|
|
53
54
|
}
|