Commit 400efaf4 authored by nagayama15's avatar nagayama15

Fix the build script

parent e427499e
...@@ -66,6 +66,8 @@ async function opt(input, output, optflags, cwd) { ...@@ -66,6 +66,8 @@ async function opt(input, output, optflags, cwd) {
} }
const srcs = [ const srcs = [
'zlib-exports',
'zlib/adler32', 'zlib/adler32',
'zlib/compress', 'zlib/compress',
'zlib/crc32', 'zlib/crc32',
...@@ -81,7 +83,6 @@ const srcs = [ ...@@ -81,7 +83,6 @@ const srcs = [
'zlib/trees', 'zlib/trees',
'zlib/uncompr', 'zlib/uncompr',
'zlib/zutil', 'zlib/zutil',
'zlib-exports',
]; ];
(async () => { (async () => {
......
...@@ -3,5 +3,4 @@ ...@@ -3,5 +3,4 @@
#include <stddef.h> #include <stddef.h>
int snprintf(char *, size_t, const char *, ...); int snprintf(char *, size_t, const char *, ...);
int vsnprintf(char *, size_t, const char *, ...); int vsnprintf(char *, size_t, const char *, __builtin_va_list);
int vsnprintf(char *, size_t, const char *, ...);
#include <webassembly.h>
#include <stdlib.h> #include <stdlib.h>
#include "import.h" #include "import.h"
export int add2(int a, int b) {
return a + b;
}
const assert = require('assert');
const wasm = require('webassembly');
(async () => {
const zlib = await wasm.load(`${__dirname}/build/zlib.wasm`);
assert.strictEqual(zlib.exports.add2(8, 5), 13);
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment