Skip to content
Merged
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
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(void) {

## API

The WASI API is versioned. This documentation is based on [snapshot_0][].
The WASI API is versioned. This documentation is based on [snapshot_1][].
`uvwasi` implements the WASI system call API with the following
additions/modifications:

Expand Down Expand Up @@ -1918,7 +1918,7 @@ Members:

The address and length of the buffer to be filled.

### <a href="#linkcount" name="linkcount"></a>`uvwasi_linkcount_t` (`uint32_t`)
### <a href="#linkcount" name="linkcount"></a>`uvwasi_linkcount_t` (`uint64_t`)

Number of hard links to an inode.

Expand Down Expand Up @@ -2373,10 +2373,6 @@ Members:

- <a href="#subscription.u.clock" name="subscription.u.clock"></a>**`u.clock`**

- <a href="#subscription.u.clock.identifier" name="subscription.u.clock.identifier"></a><code>[\_\_wasi\_userdata\_t](#userdata) <strong>identifier</strong></code>

The user-defined unique identifier of the clock.

- <a href="#subscription.u.clock.clock_id" name="subscription.u.clock.clock_id"></a><code>[\_\_wasi\_clockid\_t](#clockid) <strong>clock\_id</strong></code>

The clock against which to compare the timestamp.
Expand Down Expand Up @@ -2438,4 +2434,4 @@ Possible values:

[WASI]: https://github.com/WebAssembly/WASI
[libuv]: https://github.com/libuv/libuv
[snapshot_0]: https://github.com/WebAssembly/WASI/blob/master/phases/old/snapshot_0/docs/wasi_unstable.md
[snapshot_1]: https://github.com/WebAssembly/WASI/blob/master/phases/snapshot/docs/wasi_unstable_preview1.md
2 changes: 1 addition & 1 deletion app.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(void) {

assert(UVWASI_VERSION_HEX == 1);
assert(strcmp(UVWASI_VERSION_STRING, "0.0.2") == 0);
assert(strcmp(UVWASI_VERSION_WASI, "snapshot_0") == 0);
assert(strcmp(UVWASI_VERSION_WASI, "snapshot_1") == 0);

uvw = &uvwasi;
init_options.fd_table_size = 3;
Expand Down
2 changes: 1 addition & 1 deletion include/uvwasi.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern "C" {
#define UVWASI_VERSION_STRING UVWASI_STRINGIFY(UVWASI_VERSION_MAJOR) "." \
UVWASI_STRINGIFY(UVWASI_VERSION_MINOR) "." \
UVWASI_STRINGIFY(UVWASI_VERSION_PATCH)
#define UVWASI_VERSION_WASI "snapshot_0"
#define UVWASI_VERSION_WASI "snapshot_1"

typedef void* (*uvwasi_malloc)(size_t size, void* mem_user_data);
typedef void (*uvwasi_free)(void* ptr, void* mem_user_data);
Expand Down
9 changes: 4 additions & 5 deletions include/wasi_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ typedef struct uvwasi_iovec_s {
size_t buf_len;
} uvwasi_iovec_t;

typedef uint32_t uvwasi_linkcount_t;
typedef uint64_t uvwasi_linkcount_t;

typedef uint32_t uvwasi_lookupflags_t; /* Bitfield */
#define UVWASI_LOOKUP_SYMLINK_FOLLOW (1 << 0)
Expand Down Expand Up @@ -266,7 +266,6 @@ typedef struct uvwasi_subscription_s {
uvwasi_eventtype_t type;
union {
struct {
uvwasi_userdata_t identifier;
uvwasi_clockid_t clock_id;
uvwasi_timestamp_t timeout;
uvwasi_timestamp_t precision;
Expand Down Expand Up @@ -316,8 +315,8 @@ typedef struct uvwasi_event_s {
} uvwasi_event_t;

typedef uint8_t uvwasi_whence_t;
#define UVWASI_WHENCE_CUR 0
#define UVWASI_WHENCE_END 1
#define UVWASI_WHENCE_SET 2
#define UVWASI_WHENCE_SET 0
#define UVWASI_WHENCE_CUR 1
#define UVWASI_WHENCE_END 2

#endif /* __UVWASI_WASI_TYPES_H__ */