-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
if [ -f /proc/sys/fs/binfmt_misc/wasm32-wasi ] | ||
then | ||
WASM=$1 | ||
shift | ||
else | ||
echo ':wasm32-wasi:M::\x00asm:\xff\xff\xff\xff:/opt/python-wasm-sdk/wasisdk/bin/wasi-binfmt:' > /proc/sys/fs/binfmt_misc/register | ||
exit 0 | ||
fi | ||
wasmtime --env PYTHONDONTWRITEBYTECODE=1 --dir /::/ -- $WASM $@ | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef _WASIX_SETJMP_H | ||
#define _WASIX_SETJMP_H | ||
|
||
typedef void *jmp_buf; | ||
|
||
static int | ||
setjmp(jmp_buf env) { | ||
return 0; | ||
} | ||
static | ||
void longjmp(jmp_buf env, int value) { | ||
(void)env; | ||
(void)value; | ||
} | ||
|
||
#endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
#ifndef _WASIX_SYS_WAIT_H | ||
#define _WASIX_SYS_WAIT_H | ||
|
||
#include <bits/alltypes.h> | ||
|
||
#define WNOHANG 1 | ||
#define WUNTRACED 2 | ||
|
||
#define WEXITSTATUS(s) (((s) & 0xff00) >> 8) | ||
#define WTERMSIG(s) ((s) & 0x7f) | ||
#define WSTOPSIG(s) WEXITSTATUS(s) | ||
#define WIFEXITED(s) (!WTERMSIG(s)) | ||
#define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00) | ||
#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu) | ||
|
||
typedef int pid_t; | ||
|
||
pid_t wait(int *wstatus); | ||
pid_t waitpid(pid_t pid, int *status, int options); | ||
|
||
#endif |