Content :
The following code should work to test WebAssembly in various JS runtimes with minor modifications:
const bytes = /* read a .wasm file somehow */;
const mod = new WebAssembly.Module(bytes);
const instance = new WebAssembly.Instance(mod, { /* imports */ });
const { foo, bar } = instance.exports;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### just for arm64 | |
```` | |
BASE=`pwd` | |
## cross-compile toolchain | |
git clone https://github.com/0neday/buildroot | |
cd buildroot | |
make menuconfig | |
### select aarch64 and enable ssp , c++ support | |
make -j$(nproc) toolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWARD BIOS: | |
01322222 | |
589589 | |
589721 | |
595595 | |
598598 | |
aLLy | |
aLLY | |
ALLY | |
ALFAROME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export CFLAGS="-Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" | |
export LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" | |
./configure \ | |
--disable-cookies \ | |
--disable-crypto-auth \ | |
--disable-dict \ | |
--disable-file \ | |
--disable-ftp \ | |
--disable-gopher \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. | |
Copying and distribution of this file, with or without modification, | |
are permitted in any medium without royalty provided the copyright | |
notice and this notice are preserved. --> | |
<!DOCTYPE target SYSTEM "gdb-target.dtd"> | |
<target> | |
<architecture>i8086</architecture> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# References: | |
# https://cmake.org/cmake/help/latest/command/add_custom_target.html | |
# https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ | |
# https://gist.github.com/socantre/7ee63133a0a3a08f3990 | |
# https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install | |
# https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target | |
# https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command | |
# https://blog.csdn.net/gubenpeiyuan/article/details/51096777 | |
cmake_minimum_required(VERSION 3.10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************* | |
jpegtest.c | |
$ gcc jpegtest.c -std=c11 -ljpeg | |
*********************************/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <jpeglib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Eric Pruitt (http://www.codevat.com) | |
# License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) | |
# Description: This Makefile is designed to create a statically linked nginx | |
# binary without any dependencies on the host system's version of glibc. | |
NGINX_VERSION=1.15.0 | |
OPENSSL_VERSION=1.0.2o | |
PCRE_VERSION=8.42 | |
ZLIB_VERSION=1.2.11 |
NewerOlder