mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
build mgba wasm
This commit is contained in:
parent
a7de8c07d2
commit
e1453cb4c8
5
justfile
5
justfile
|
@ -92,6 +92,11 @@ release +args: (_run-tool "release" args)
|
||||||
miri:
|
miri:
|
||||||
(cd agb-hashmap && cargo miri test)
|
(cd agb-hashmap && cargo miri test)
|
||||||
|
|
||||||
|
build-mgba-wasm:
|
||||||
|
rm -r website/app/src/vendor
|
||||||
|
mkdir website/app/src/vendor
|
||||||
|
podman build --file website/mgba-wasm/BuildMgbaWasm --output=website/app/src/vendor .
|
||||||
|
|
||||||
_run-tool +tool:
|
_run-tool +tool:
|
||||||
(cd tools && cargo build)
|
(cd tools && cargo build)
|
||||||
"$CARGO_TARGET_DIR/debug/tools" {{tool}}
|
"$CARGO_TARGET_DIR/debug/tools" {{tool}}
|
||||||
|
|
3
website/app/.gitignore
vendored
3
website/app/.gitignore
vendored
|
@ -21,3 +21,6 @@
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
|
|
||||||
|
src/vendor
|
25
website/mgba-wasm/BuildMgbaWasm
Normal file
25
website/mgba-wasm/BuildMgbaWasm
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
FROM docker.io/emscripten/emsdk:3.1.46 as builder
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends make cmake git && \
|
||||||
|
apt-get autoremove -y && apt-get clean
|
||||||
|
|
||||||
|
RUN userdel emscripten -r
|
||||||
|
USER root
|
||||||
|
ENV BUILD_DIR=build-wasm
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
RUN git clone https://github.com/thenick775/mgba.git --filter=tree:0 -b feature/wasm
|
||||||
|
RUN mkdir /mgba/build-wasm
|
||||||
|
WORKDIR /mgba/build-wasm
|
||||||
|
RUN git checkout 27dede256b6de36303a87d0886f81505a0f30c28
|
||||||
|
|
||||||
|
|
||||||
|
RUN emcmake cmake .. && make install DESTDIR=install
|
||||||
|
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /mgba/build-wasm/wasm/mgba.js .
|
||||||
|
COPY --from=builder /mgba/build-wasm/wasm/mgba.wasm .
|
||||||
|
COPY --from=builder /mgba/build-wasm/wasm/mgba.d.ts .
|
Loading…
Reference in a new issue