-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: node fs module #84
Conversation
@Puellaquae Does nodejs have a CI test suite we can run to validate those API implementations? Thanks! |
There seems no test suite for node lib api in nodejs, while deno has some test suite for its node api implementations. |
Is it possible for us to run the deno tests then? Thanks. |
It need some works before running. |
poll fd read also has same problem. |
…ype-check, readSync-[optional-params, position-validation], ready-event-stream
fn main() -> Result<(), wasi::Errno> {
unsafe {
wasi::path_symlink("./test.txt", 3, "./test-link.txt")?;
let stat = wasi::path_filestat_get(3, 0, "./test-link.txt")?;
println!("{:?}", stat);
let mut buf = [0;1024];
let len = wasi::path_readlink(3, "./test-link.txt", buf.as_mut_ptr(), buf.len())?;
println!("{:?}", String::from_utf8_lossy(&buf[0..len]));
};
Ok(())
} It will return error: fn main() -> Result<(), wasi::Errno> {
unsafe {
wasi::path_symlink("./test.txt", 3, "./test/test-link.txt")?;
let stat = wasi::path_filestat_get(3, 0, "./test/test-link.txt")?;
println!("{:?}", stat);
let mut buf = [0;1024];
let len = wasi::path_readlink(3, "./test/test-link.txt", buf.as_mut_ptr(), buf.len())?;
println!("{:?}", String::from_utf8_lossy(&buf[0..len]));
};
Ok(())
} It will return error: |
We are focusing on some high-priority issues. If you encounter any bugs, please raise issues on the WasmEdge project with the detailed reproduction steps and the environment information. Thanks. |
I think |
in linux, epoll a normal file will get a |
…-numeric-flags, options-immutable
…ame-type-check, rmdir-[recursive-[sync-warns, throws, warns]-[not-found, on-file], type-check], truncate-[clear-file-zero, fd, sync], unlink-type-check, write-[file, no-fd, stream, stream-throw-type-error, sync], writefile-with-fd
…le, sync], fs-read
…rite-[negativeoffset, stream-encoding, sync-optional-params]
@Puellaquae if you think this pr is time to merge, please @ me. Thinks. |
…times, fs-writev, fs-writev-[promises, sync]
…params], fs-promises, fs-promisified, fs-read-[offset-null, optional-params, position-validation, promises-optional-params, type], fs-write-[buffer, optional-params]
@L-jasmine Most of fs api is implemented and passed nodejs's tests. |
fsPromises.chmodUnsupportedfsPromises.chownUnsupportedfsPromises.lchmodUnsupportedfsPromises.lchownUnsupportedfs.chmodUnsupportedfs.chmodSyncUnsupportedfs.chownUnsupportedfs.chownSyncUnsupportedfs.fchmodUnsupportedfs.fchmodSyncUnsupportedfs.fchownUnsupportedfs.fchownSyncUnsupportedfs.lchmodUnsupportedfs.lchmodSyncUnsupportedfs.lchownUnsupportedfs.lchownSyncUnsupportedfs.unwatchFileUnsupportedfs.watchUnsupportedfs.watchFileUnsupportedfs.FSWatcherUnsupportedfs.StatWatcherUnsupported