-
Notifications
You must be signed in to change notification settings - Fork 1.6k
rewrite wasi-common in terms of cap-std #2487
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
267 commits
Select commit
Hold shift + click to select a range
61f97a3
trap on wasi_proc_exit
pchickey dfcdbfd
test-programs: no longer test virtfs separately
pchickey 30d49d1
add preopened_dir to builder
pchickey 7594551
test-programs: learn how to preopen a dir again
pchickey 0572b40
port read and write pipes in
pchickey 1b8f9fd
use virtual stdio
pchickey 7ec9aac
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
pchickey c16e731
get rid of linker Rc cycle, and add debug info to test programs
pchickey 04805fc
pass a test, dubiously
pchickey b5852bf
open_dir can never create a dir
pchickey c0461ca
redesign how caps fit into entries!
pchickey 27ddbda
preopens with Caps::all, implement create, remove dir, remove file
pchickey 789eec3
dangling_fd test: open with either READ or CREAT|WRITE
pchickey dbe0f4f
Revert "dangling_fd test: open with either READ or CREAT|WRITE"
pchickey af8bdf8
table: borrow entry immutably or mutably
pchickey 8777194
always open files read if not write
pchickey 23b5689
fix file rights
pchickey df0218c
make get_filestat work
pchickey 8ac6882
fixup dir/file caps into rights
pchickey 4c3c9a9
Filestat: make times optional, default to 0 at wasi interface
pchickey f9ff97a
virt pipes: return concrete errors, best effort at flags and filestat
pchickey d8720cf
unexpected io error: do our best based on e.kind()
pchickey f6afd4c
test-programs: sandbox escape is an EPERM now, not an ENOTCAPABLE
pchickey 82edae3
readlink
pchickey 8cc1ab7
fixup filetype nonsense
pchickey af0aa14
get a FileStat of a Dir
pchickey c191925
implement fd_readdir
pchickey a33418c
path_filestat: remove expectation that rights_inheriting describes su…
pchickey 8672dce
open_file requires the FdFlags
pchickey f663045
better arg names
pchickey 8deb3ed
path_open: ENOTDIR when fd is a file
pchickey b50b9b4
add notes describing why remaining wasi tests are failing
pchickey 01d74ce
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
pchickey 48554a1
implement randomness
pchickey 50554d3
add, fix tests
pchickey c7fcc34
add clocks!
pchickey 10a8472
Ilseq is the correct error when osstring cant be turned into string
pchickey add601f
use cap_rand instead of getrandom
pchickey 41c06db
finish implementing clocks correctly
pchickey 8431802
no more clock test fail
pchickey 222a578
readlink: get rid of weird partial-buffer semantics carried over from…
pchickey d51ffe8
add . and .. to the readdir iterator
pchickey 94d2280
better docs
pchickey 21cd55b
add directory rename
pchickey 07a9584
add hard_link to dir
pchickey fb32f65
get path filestat on a dir
pchickey 8ace7f0
delete file::get/set_oflags
pchickey 16eff68
summarize failures with a TODO list!
pchickey ce13cd9
dir: add set times
pchickey 56788be
sorta fix set_times on paths and dirfds
pchickey 31c5328
incorporate dan's suggestions on readdir
pchickey fb37751
fix warning
pchickey c200400
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
pchickey 13cd7a4
Merge branch 'pch/wiggle_trapping' into pch/wasi_common_cap_std
pchickey c2a715c
wiggle traps
pchickey 82128cb
trap proc_exit and unsupported funcs
pchickey a900d04
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
pchickey 4a6e92f
upgrade to cap-std 0.9
pchickey 2d2e6d1
Dir::open_file, open_dir: correct symlink following
pchickey 09861c2
symlink-related tests: accept either ELOOP or ENOTDIR
pchickey 932ba6b
need DirExt::hard_link_nofollow to implement path_link properly
pchickey f084cf1
failure to create trailing slash symlink to file can be EEXIST or ENO…
pchickey 4044977
just ignore nofollow on links for now
pchickey 3863b8b
re-organize failures todo list
pchickey b1d32f4
use bitflags crate to define bitflags, rather than by hand
pchickey d56d2f0
directory seek test: code does not agree with comment. Fix code.
pchickey 4a54db0
derive debug and clone on DirFdStat / FdStat
pchickey b53aecb
Merge branch 'pch/wiggle_flags_bitflags' into pch/wasi_common_cap_std
pchickey e7018bf
wiggle flags are now bitflags!
pchickey 0e42c2e
scaffold a scheduler
pchickey b79bdce
port subscriptions in from old branch
pchickey 81065eb
more scheduler
pchickey 7303793
also expose WasiCtxBuilder
Ekleog f315611
reserve keys 0, 1 and 2 for stdio
Ekleog 2e035be
make WasiCtxBuilder be an actual builder, allowing to call .build() a…
Ekleog 5d85216
also reexport WasiDir from wasmtime_wasi
Ekleog 20bb4b2
Also reexport Error from wasmtime_wasi
Ekleog 932378e
reexport all the things required to implement WasiDir
Ekleog 28c57c0
Merge pull request #2577 from Ekleog/pr-2487
e0e205f
ctx builder: fix warnings, test harness
pchickey 8298ce9
clock sub, start with the read sub
pchickey 7beb52a
i guess this is a way to do refs
pchickey ea94d6f
this is indeed a nice way to do refs!
pchickey 5c8efe8
need Any on WasiFile to upcast for AsRawFd
pchickey 4b39a14
fix tests in pipe
pchickey 9a1ce1a
TEMPORARY: inherit stdio for the wasi ctx
pchickey 7d7acc4
poll_oneoff test: outline assertions
pchickey f667263
TEMPORARY: poll_oneoff test uses CLOCKID_REALTIME instead of MONOTONIC
pchickey b84c4d7
poll_oneoff test: if you subscribe to a badf, the whole call fails wi…
pchickey 7f7a0be
wasi-c2: implement a synchronous poll_oneoff in terms of yanix
pchickey 657024b
latest system-interface provides ReadReady::num_ready_bytes
pchickey 21713d3
Revert "TEMPORARY: poll_oneoff test uses CLOCKID_REALTIME instead of …
pchickey 016ed89
poll now handles monotonic clocks, not system clocks
pchickey f3e40e2
restructure cap-std impls into their own crate
pchickey 7ec0363
inline only what we need of cap-std/system-interface traits
pchickey 61885b7
stub in windows scheduler, get to some interesting errors
pchickey fcd00f5
move more deps to cap-std-sync, define own SystemTimeSpec
pchickey 85c3b73
stdio compiles on windows!
pchickey 16b42a5
fix
pchickey 1205688
fix preopen dir to work on windows
pchickey a46c2ad
split poll tests up, only one requires "real" stdio
pchickey f1a5dce
change set_fdflags to reopen_with_fdflags
pchickey 69b7352
various stdio fixes
pchickey 9e0d295
use `unsafe` to mark reopen_with_fdflags as having special safety fea…
pchickey 86d369c
inline poll from yanix
pchickey a06c4fb
make a pipe filetype, reorder filetype enum
pchickey 1d8070b
wasi-c2: completely redo how errors work
pchickey 423973a
push the error types conversion all the way through
pchickey 19254bf
error mapping for windows!
pchickey 2b70ea8
windows scheduler passes tests
pchickey 634e911
tests: directory seeking is actually prohibited! but the test was wrong
pchickey 957c434
ErrorExt: trap convenience method
pchickey 17a82c5
table: fix up errnos. trap on internal failures.
pchickey 7fd3d58
enumerate windows test failures, move the file
pchickey 2c6bde5
elaborate!
pchickey 72b207d
path_link: some improvements required by windows
pchickey a842612
kick the can
pchickey 144ca2f
add a test of symlink happy path to isolate the windows failure
pchickey 996d49c
nofollow test: permit ACCES as well as LOOP when opening with nofollow
pchickey b0b263f
find a symlink error
pchickey 8f4feca
interesting paths: loosen up errno requirements
pchickey 42ccb11
cap-std is going to use winerror::ERROR_STOPPED_ON_SYMLINK
pchickey a993090
fix warning
pchickey fded424
Dir::hard_link: dont support symlink following
pchickey 17f43d4
path_link test: we no longer support symlink following
pchickey f4a6b95
notes
pchickey c98d6f6
fix warning
pchickey 1eb8a8a
integrate GetSetFdFlags!
pchickey 8cd21ee
elaborate
pchickey 220509f
latest system-interface
pchickey 6fcbd3f
split path_filestat test into two, improve variable names
pchickey b2e0597
narrow the bug
pchickey 6c0f312
fix bug: i was ignoring the symlink follow flag in path_filestat_{get,
pchickey d1160cb
split path rename trailing slash test into files and dirs
pchickey cb17171
various windows test notes
pchickey 4f2696f
more docs
pchickey 4f65500
make a macro that automates errno assertions
pchickey 2ae1dee
convert all errno assertions to assert_errno!
pchickey be108c7
will this work for platform-specific errnos? WIP
pchickey 03466d0
temporarily use my branch of the wasi crate
pchickey 6f85abd
itsp ublished
pchickey 7ffe3c7
config is lazy_static to amoritze it
pchickey bbbe168
ctx: i guess we need environment variables!
pchickey e758318
wire env variables through test runner to TESTCONFIG
pchickey f7403ac
fd_advise test: set size via fd_filestat_set_size and fd_allocate
pchickey 20e9169
fd_allocate: put meat of test behind a guard
pchickey 1196e21
fix macro by denying trailing slashes. also other stuff
pchickey dae022b
woo
pchickey 79e8f17
bum bum bum
pchickey 0cedc17
another one bites the dust
pchickey 4801ea0
cool
pchickey 34ad8df
dangling directories are a windows thing
pchickey 11b8222
missed a dangling symlink
pchickey 201a888
dirty fuckin' dangles boys
pchickey 1d057af
notes
pchickey d628677
move test failures into ignores in build.rs
pchickey dd00520
delete wasi-common, yanix, winx
pchickey 47fec44
move wasi-c2 into wasi-common
pchickey 9bd89ab
rename everything c2 related to the "real" names
pchickey ef2cb7b
nearly have snapshot 0 implemented...
pchickey d738a4a
preview 0: copy bodies of read, write, and poll_oneoff from snapshot 1
pchickey c8e76b1
wasmtime-wasi: support both snapshots
pchickey 70f8288
wasmtime-wiggle: take an Rc<RefCell<ctx>> instead of construct one
pchickey e498888
hook run command up to both wasi snapshots
pchickey 11821e5
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
pchickey 8b285ec
make wasmtime_wasi::Wasi a struct which does both snapshots!
pchickey d5fdd83
port bench-api
pchickey d3ba69d
wasi-common no longer contains code derived from cloudabi-utils
pchickey 6a5d4b9
docs
pchickey b48e7fc
integrate with c-api
pchickey 8ea42ab
fix wasi-nn and wasi-crypto integrations for wasmtime-wiggle changes
pchickey 2ad7565
update linking example
pchickey 5ee6059
fix wasi example
pchickey 897b4fb
wasictxbuilder: assert that stdio is provided
pchickey 2e10e62
stub virtfs
pchickey 95ad13c
wasi-common: break dep on system-interface by defining our own Advice…
pchickey d8f3a62
dont try to make a virtfs today. instead, delete virtfs example.
pchickey 1af7659
wasi-nn CI: use the same nightly as rest of file
pchickey f40b9d8
Merge branch 'pch/wasinn-fix-nightly' into pch/wasi_common_cap_std
pchickey 6ed8638
fix test runtime
pchickey b5f3a4a
wasi-crypto: forgot to erase ctx indirection
pchickey 8313a62
fix test
pchickey e1ca5d1
fix the second place i made the same dumb typo
pchickey 3d406ff
Dir::open_file can just pass read/write as bools, centralizing FileCa…
pchickey e9a7a40
cap-std-sync Dir::open_file: set the fdflags that OpenOptions cant
pchickey c12cd82
careful now
pchickey e940d31
add a noent / not_found errorkind
pchickey b6cd7d8
cap-std-sync: export ctx components
pchickey 533db3e
virtfs: implement a bunch more
pchickey fcecb3f
test-programs: test both cap-std-sync and virtfs backend
pchickey 91a311e
delete
pchickey 321bf27
check in virtfs backend test harness
pchickey 133344e
woo it passes six tests even though its awful
pchickey ac60b03
well this much passes
pchickey 92e1949
doh
pchickey bad169d
port https://github.com/bytecodealliance/wasmtime/pull/2620 into rewrite
pchickey 8b9d2c5
cap-std-sync: my set_fd_flags idea didnt seem to work?
pchickey a4372c8
cap-std-sync: test opening a tempdir as ambient and then WasiDir
pchickey 5ee093e
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
pchickey 993697e
set_fd_flags is only good for append and nonblock
pchickey cde252c
wasi-cap-std-sync: sync family of flags is not supported on file_open
pchickey 40e541b
test suite: cap-std-sync test environment does not support fdflags sync
pchickey b9a3f86
cap-std-sync test runner: read stdin to end before inheriting stdio
pchickey 0c4aec3
actually empty ready bytes of stdin
pchickey bb3e391
accept fdread event as valid behavior of stdin poll
pchickey 8e015ca
traps needed stdio
pchickey 848be8c
path_rename should work on windows with TESTCONFIG
pchickey e9ad361
get rid of outdated cfg_attr
pchickey f17bff5
fill in Deterministic impl of RngCore
pchickey 30c5e8c
DEBUG: turn off fail-fast for wasmtime build matrix, and test wasi-ca…
pchickey 7919b19
fix tests and exports
pchickey 037c5e3
remove re-exports
pchickey e511dac
rustdoc the table
pchickey 0ef691b
rustdocs!!
pchickey 7daa776
rustdoc the errors
pchickey 58aa98a
cap-std-sync docs
pchickey b59160c
docs!
pchickey d83dba4
fix publish script
pchickey c77a11b
tests: macos-specific behavior
pchickey a29b5bd
dep to latest, lockfile already has it
pchickey f48b457
remove dead comment
pchickey e385075
this windows test should be fixed...
pchickey 544a491
fail-fast false on the other matrix too
pchickey ca65718
fix wasmtime doctest
pchickey 80fce7c
unlink behavior on macos...
pchickey dec0038
add a readdir unit test to wasi-cap-std-sync
pchickey 47a89d3
cargo update. wanted the latest `cap-primitives`
pchickey 330902f
add test for incredibly cursed windows rename behavior
pchickey a06b23a
even simpler test case
pchickey 186360f
delete temporary tests
pchickey cd02e5a
path_rename: make more concessions for windows. this shit sucks but o…
pchickey 857ef41
upstream fixes are pending for symlink_create & nofollow_errors on wi…
pchickey b29a3bf
fix warnings
pchickey d62b0a1
table keys can wrap around
pchickey b382a1e
back out wasi-cap-std-sync special test step
pchickey a9639e5
publish script: tell me more about the failure please
pchickey 7a35763
collapse two test flags into dangling_filesystem
pchickey 3114506
remove virtfs - it is not suitable for use
pchickey bc1992b
cap-std 0.13
pchickey 1a45096
wasi-common, wasi-cap-std-sync, wasmtime-wasi should all be published…
pchickey e670c46
system-interface 0.6
pchickey c8ca639
new cap-std apis fix some windows tests!
pchickey 72a8f92
cap-primitives bump fixes windows bugs
pchickey e2b67aa
simplify life for readdir implementors
pchickey 3526145
wasi-common 0.13.2
pchickey 5ff9578
wasi-common: WASI/phases is included in the package
pchickey 4681e18
will this fix it?
pchickey c535b94
theres the bug
pchickey 21a1307
latest cap-std 0.13.3 fixes windows bug
pchickey 6fb2c29
remove development scaffolding
pchickey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.