Skip to content

Commit 68ecd7d

Browse files
committed
wasm: fix build
1 parent 1a74233 commit 68ecd7d

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

lib/Ffi.hs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
module Ffi where
44

5+
#ifdef FFI
56
import Foreign.Ptr (FunPtr)
67

78
#if defined(mingw32_HOST_OS)
@@ -68,3 +69,4 @@ dynLibOpen = loadLibrary
6869
#else
6970
dynLibOpen x = dlopen x [RTLD_NOW]
7071
#endif
72+
#endif

lib/VM.hs

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ import Debug.Trace
2323
import GHC.Generics (Generic)
2424
import System.Random (randomIO)
2525
#ifdef FFI
26-
import Foreign.LibFFI
27-
import Foreign.Marshal.Array
28-
import Foreign.C.Types (CInt, CFloat, CChar)
29-
import Foreign.C.String (castCharToCChar)
3026
import Ffi
3127
import Foreign.LibFFI.Base (newStorableStructArgRet, newStructCType)
3228
import Foreign.LibFFI.FFITypes
33-
import Foreign.Storable
34-
import Foreign.Ptr
29+
import Foreign.LibFFI
3530
#endif
3631

3732
import Data.Binary qualified (get, put)
3833
import Foreign.C (CDouble, newCString)
34+
import Foreign.C.String (castCharToCChar)
35+
import Foreign.C.Types (CChar, CFloat, CInt)
36+
import Foreign.Marshal.Array
37+
import Foreign.Ptr
38+
import Foreign.Storable
3939
import GHC.IO (unsafePerformIO)
4040
import GHC.Int qualified as Ghc.Int
4141

wasm_reactor/deploy_new_fiddle.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
./build-wasm.sh
3+
GITREV=$(git rev-parse --short HEAD)
34
cd ../../indigo-fiddle || exit
4-
git commit -m "Deploying new fiddle" indigo-init.wasm indigo-lib
5+
git commit -m "Update fiddle to indigo@$GITREV" indigo-init.wasm indigo-lib
56
git push

0 commit comments

Comments
 (0)