Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# shellcheck shell=bash
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi

dotenv_if_exists

# watch_file "$(find ./nix -name "*.nix" -type f)"

OS_AND_SYSTEM=$(uname -a)

if [[ "${NO_NIX:-}" == "1" || $OS_AND_SYSTEM == "Darwin"* ]]; then
source non-nix-build/env.sh
else
use flake
fi
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ spec/target
**/fuzz/artifacts/
**/fuzz/crash-inputs/
**/fuzz/Cargo.lock

*.wasm
.direnv/
4 changes: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ members = [
"crates/ir",
"crates/fuzz",
"crates/wast",
"fuzz", "wasm-test", "crates/tracer",
"fuzz", "crates/tracer",
# "wasm-test",
]
exclude = []
resolver = "2"
Expand Down
10 changes: 10 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
build-wasm-test-c:
emcc -O0 -g3 -o wasm_test.wasm wasm_test.c

dwarfdump wasm-path:
# from llvm
llvm-dwarfdump {{wasm-path}}

dis wasm-path:
# from binaryen
wasm-dis {{wasm-path}}
8 changes: 8 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ mkShell {
emscripten
binaryen
llvm
just
rust-analyzer

figlet
];

shellHook = ''
export EM_CACHE=/tmp/emcc/

figlet "welcome to wasmi recorder"
'';
}
4 changes: 4 additions & 0 deletions wasm_test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int main() {
int x = 1;
int y = 2;
}