-
Notifications
You must be signed in to change notification settings - Fork 1
Add Example Grate: In Memory File System #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Example Grate: In Memory File System #4
Conversation
examples/imfs-grate/compile_grate.sh
Outdated
| @@ -0,0 +1,4 @@ | |||
| #!/bin/bash | |||
|
|
|||
| /home/lind/lind-wasm/clang+llvm-16.0.4-x86_64-linux-gnu-ubuntu-22.04/bin/clang -pthread --target=wasm32-unknown-wasi --sysroot /home/lind/lind-wasm/src/glibc/sysroot -Wl,--import-memory,--export-memory,--max-memory=1570242560,--export=signal_callback,--export=__stack_pointer,--export=__stack_low,--export=open_grate,--export=close_grate,--export=lseek_grate,--export=read_grate,--export=write_grate,--export=fcntl_grate,--export-table imfs_grate.c imfs.c -g -DLIB -DDIAG -D_GNU_SOURCE -O0 -o imfs_grate.wasm && /home/lind/lind-wasm/tools/binaryen/bin/wasm-opt --epoch-injection --asyncify -O2 --debuginfo imfs_grate.wasm -o imfs_grate.wasm && /home/lind/lind-wasm/src/wasmtime/target/release/wasmtime compile imfs_grate.wasm -o imfs_grate.cwasm | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this custom per grate or extensible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it is per grate since we need to specify which grate functions are exported. I believe Alice is working on a way around this, so that we don't need to do function dispatches based on exports.
marcelamelara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've reviewed the README, and have a few places where I think clarification would help. I also think we should revisit some default settings, if possible.
- Fix comments on the README - Working version compatible with lind-wasm changes - New folder structure + compile script for grates - Add tests, remove random logs - clang-format
|
Re-requesting review from @rennergade and @Yaxuan-w. Need inputs on this:
My basic logic is that we should ideally have a uniform way for building and running these example grates. |
|
compile_grate.sh hard-codes toolchain paths under /home/lind/..., could we make these env-overridable (or derived from LIND_WASM_ROOT) so it's easier? build.conf sets C_FLAGS=... but the script only reads EXTRA_CFLAGS, so those flags never get applied unless users manually set EXTRA_CFLAGS |
rennergade
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. @Yaxuan-w can you review when you have a chance? Feel free to merge if you approve
Yaxuan-w
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Would be helpful to have comments about general description and functionality at top of each file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on usage
|
Also, would be helpful to open up an issue about adding more tests about imfs |
Closes: #2