Skip to content

Commit

Permalink
ci: wip gettting wasm build going
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanleiby committed Sep 1, 2024
1 parent f098db0 commit 0eea5f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
release*.zip

.DS_Store

macroix.wasm
13 changes: 7 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TITLE</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>My Game</title>
<style>
html,
body,
canvas {
margin: 0px;
padding: 0px;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
Expand All @@ -17,14 +19,13 @@
}
</style>
</head>

<body>
<canvas id="glcanvas" tabindex="1"></canvas>
<!-- Minified and statically hosted version of https://github.com/not-fl3/macroquad/blob/master/js/mq_js_bundle.js -->
<script src="https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js"></script>
<script>
load("target/wasm32-unknown-unknown/debug/macroix.wasm");
load("macroix.wasm");
</script>
<!-- Your compiled wasm file -->
<!-- Your compiled WASM binary -->
</body>
</html>
8 changes: 8 additions & 0 deletions release-wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# !/bin/bash

# exit on error
set -e

rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown
cp target/wasm32-unknown-unknown/debug/macroix.wasm

0 comments on commit 0eea5f8

Please sign in to comment.