Skip to content
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

What is the goal of this project? #11

Closed
pepyakin opened this issue Aug 6, 2018 · 2 comments
Closed

What is the goal of this project? #11

pepyakin opened this issue Aug 6, 2018 · 2 comments

Comments

@pepyakin
Copy link
Collaborator

pepyakin commented Aug 6, 2018

What does the description means?

"Standalone JIT-style runtime support for WebAsssembly code in Cranelift"

Can I use this project as substitute for wasmi? Like instantiate a module providing imports (satisfied by other modules and/or host functions), and execute exports.

Or is it for running wasm executables (something like cervus)?

@sunfishcode
Copy link
Member

It's still evolving :-). I think it's useful to have a simple runner program for executables, but ideally the libraries should be usable in other applications as well.

@pepyakin
Copy link
Collaborator Author

pepyakin commented Aug 10, 2018

Thanks!

kubkon pushed a commit that referenced this issue Nov 7, 2019
Clean up docs; specify minimum Rust version
kubkon added a commit that referenced this issue Nov 7, 2019
* Initial checkin.

* Update to rust-lang libc.

* Add a .gitignore file.

* Factor out functions for cleaning up files and directories.

* Fix a typo in a comment.

* Print a "Success!" message if all tests passed.

* Factor out code for creating directories.

* Add wrappers around WASI functions.

These wrappers handle converting from &str to pointer+length and handle
unsafe.

* More refactoring.

* Refactor a fd_close helper.

* Move utility functions into a separate file.

* cargo update

* Add a basic test for random_get.

* Test that directories aren't resizable.

* Test clearing __WASI_RIGHT_PATH_FILESTAT_SET_SIZE.

Ensure that clearing __WASI_RIGHT_PATH_FILESTAT_SET_SIZE succeeds before
testing file truncation.

* cargo update

* Modularise tests for easier use with wasi-common crate

* Add a Code of Conduct and CONTRIBUTING.md.

* Fix typo

* Add testcase for fd_allocate

* Add positive test for fd_renumber

* Assert bufused in readlink_no_buffer testcase

* Add positive readlink testcase

* Add testcase for fd_seek and fd_tell

* Add fd_p{read, write} test

* Add README

* Add cases with trailing slashes to interesting_paths

* Split nofollow_errors testcase into two

* nofollow_errors now operators on symlinks to existing resources
* dangling_symlink covers danling symlinks tests

* Factor out a `create_file` helper function.

* Switch from the error crate to `std::io::Error::last_os_error()`.

* Use `create_file` in the readlink test too.

* Add a test for fd_filestat_set_*

* Minor refactoring

Add missing cleanup_file calls to file_pread_pwrite and
file_seek_tell.

* Add testcase for unbuffered fd_write; fixes #11

* Add testcase for path_rename

* Use the wasi crate.

Switch from depending on libc to depending on the new wasi crate to provide
the low-level WASI interfaces.

See also rust-lang/libc#1461.

* Add a test for path_filestat_*

* Add a test for fd_readdir

* Use expect instead of unwrap

* Add a check for ino.

* Fix the build

* Don't assume a specific order of dirents

* Better test

* Test cookie value

* Fix file types

* Fix the test

* Fix the test

* Fix the test

* Cleanup

* Minor formatting tidying in README.md.

* Fix miscellaneous clippy warnings.

* Rename the crate to wasi-misc-tests.

* Update to wasi 0.7.0.

This switches from using the libc wasi bindings to using the wasi
crate's bindings. This eliminates a git dependency on libc, updates
to the new-style bindings which use Result where possible, and treats
functions that operate on raw file descriptors as unsafe.

* Add various tests for trailing-slash behavior.

* Sync new testcases with latest upstream

* Fix path_filestat testcase

* Add smoke test for fd_advise

This test is a true smoke test as it only tests whether issuing
an advise call to the host's kernel doesn't yield an error. The
consequence of issuing such a syscall is not tested.

* Check if CLOCK_MONOTONIC is actually monotonic

* Refactor the inequality assertions for more debuggable errors.

* Bump libc from 0.2.62 to 0.2.65

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.62 to 0.2.65.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.62...0.2.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix compilation error

* Enable Actions and add rust.yml (#35)

* Enable Actions and add rust.yml

This commit enables Github Actions and adds corresponding configuration in rust.yml file.

* Update rust.yml

* Fix formatting

* Add empty .rustfmt.toml config file

* Add badge to README

* Update README

* Clean up Github Actions and README

* Add test case for `poll_oneoff` syscall (#38)

* Add test case for `poll_oneoff` syscall

This commit adds a test case for `poll_oneoff` syscall. In particular,
it builds on the excellent test use case provided by @dunnock in their
repo [poll_oneoff_tests] (thanks!), and tests:
* simple timeout
* stdin read with timeout
* fd read and fd write polls

[poll_oneoff_tests]: https://github.com/dunnock/poll_oneoff_tests

* Apply suggestions and negative test for bad fd

Co-authored-by: Maxim Vorobjov <maxim.vorobjov@gmail.com>

* Add smoke test for STDOUT/ERR readwrite poll

* Add comment on stdin/out/err

* Add a test for `*at`-style functions returning `ENOTDIR` when `dirfd` is not a dir.

* Remove misc_testsuite submodule

* Add "publish=false" to Cargo.toml; remove LICENSE
kubkon added a commit to kubkon/wasmtime that referenced this issue Mar 11, 2020
* Adds support for flags datatype

This commit adds support for `FlagsDatatype`. In WASI, flags are
represented as bitfields/bitflags, therefore, it is important
for the type to have bitwise operations implemented, and some
way of checking whether the current set of flags contains some
other set (i.e., they intersect). Thus, this commit automatically
derives `BitAnd`, etc. for the derived flags datatype. It also
automatically provides an `ALL_FLAGS` value which corresponds to
a bitwise-or of all flag values present and is provided for
convenience.

* Simplify read_from_guest
grishasobol pushed a commit to grishasobol/wasmtime that referenced this issue Nov 29, 2021
dhil pushed a commit to dhil/wasmtime that referenced this issue Oct 31, 2022
…alliance#11)

* Formatting

* Add flags to more tests

* [WIP] Add initial attempt at cont.new

Need to be able to differentiate functions and continuations at the embedder

* Differentiate func and cont types in WasmRefType

* Implement resume for no inputs/outputs
pchickey pushed a commit to pchickey/wasmtime that referenced this issue May 12, 2023
This adds a `poll_oneoff` implementation to src/lib.rs.  It's completely
untested.  I was planning on adding a host implementation and using that to test
end-to-end, but that raised some tough questions about how much of the existing
`wasi-common` scheduler(s) should be reused.  I've decided to focus on other,
more widely-used parts of WASI first, but I wanted to share the work I've
already done here.

Note that I've moved the clock- and socket-specific functions out of `wasi-poll`
and into `wasi-clocks` and `wasi-tcp`, respectively.  The latter is a new
interface which will eventually contain functions and types resembling
@npmccallum's https://github.com/npmccallum/wasi-snapshot-preview2#wasi-tcp
proposal.

Per discussion with @sunfishcode:

- `wasi-tcp` includes an `error` enum type, intended to represent only socket-related errors.
- It also includes a `socket` pseudo-handle type, distinct from `wasi-filesystem`'s `descriptor` type.

These fine-grained types help move us away from the "everything is a file
descriptor" and "all errors are errnos" approaches of Preview 1.

If we decide `poll-oneoff` should be usable with files as well as sockets, we
can add `subscribe-read` and `subscribe-write` functions to `wasi-filesystem`
which accept file `descriptor`s.  Likewise for any other pseudo-handle type from
which we'd like to create futures.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
pchickey pushed a commit to pchickey/wasmtime that referenced this issue May 16, 2023
This adds a `poll_oneoff` implementation to src/lib.rs.  It's completely
untested.  I was planning on adding a host implementation and using that to test
end-to-end, but that raised some tough questions about how much of the existing
`wasi-common` scheduler(s) should be reused.  I've decided to focus on other,
more widely-used parts of WASI first, but I wanted to share the work I've
already done here.

Note that I've moved the clock- and socket-specific functions out of `wasi-poll`
and into `wasi-clocks` and `wasi-tcp`, respectively.  The latter is a new
interface which will eventually contain functions and types resembling
@npmccallum's https://github.com/npmccallum/wasi-snapshot-preview2#wasi-tcp
proposal.

Per discussion with @sunfishcode:

- `wasi-tcp` includes an `error` enum type, intended to represent only socket-related errors.
- It also includes a `socket` pseudo-handle type, distinct from `wasi-filesystem`'s `descriptor` type.

These fine-grained types help move us away from the "everything is a file
descriptor" and "all errors are errnos" approaches of Preview 1.

If we decide `poll-oneoff` should be usable with files as well as sockets, we
can add `subscribe-read` and `subscribe-write` functions to `wasi-filesystem`
which accept file `descriptor`s.  Likewise for any other pseudo-handle type from
which we'd like to create futures.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dhil added a commit to dhil/wasmtime that referenced this issue Sep 26, 2023
This patch fixes an unused variable warning triggered in
`continuation.rs` when compiling in release mode.

```
warning: unused variable: `running_contobj`
   --> crates/runtime/src/continuation.rs:374:13
    |
374 |         let running_contobj = instance.typed_continuations_store();
    |             ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_running_contobj`
    |
    = note: `#[warn(unused_variables)]` on by default
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants