1
0
mirror of https://github.com/fluencelabs/wasmer synced 2024-12-15 15:15:40 +00:00
304: remove __wasi_ prefix r=lachlansneff a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
This commit is contained in:
bors[bot] 2019-03-28 22:32:23 +00:00
commit 2982e6e383
2 changed files with 96 additions and 96 deletions
lib/wasi/src
lib.rs
syscalls

View File

@ -33,51 +33,51 @@ pub fn generate_import_object(args: Vec<Vec<u8>>, envs: Vec<Vec<u8>>) -> ImportO
// This generates the wasi state.
state_gen,
"wasi_unstable" => {
"__wasi_args_get" => func!(__wasi_args_get),
"__wasi_args_sizes_get" => func!(__wasi_args_sizes_get),
"__wasi_clock_res_get" => func!(__wasi_clock_res_get),
"__wasi_clock_time_get" => func!(__wasi_clock_time_get),
"__wasi_environ_get" => func!(__wasi_environ_get),
"__wasi_environ_sizes_get" => func!(__wasi_environ_sizes_get),
"__wasi_fd_advise" => func!(__wasi_fd_advise),
"__wasi_fd_allocate" => func!(__wasi_fd_allocate),
"__wasi_fd_close" => func!(__wasi_fd_close),
"__wasi_fd_datasync" => func!(__wasi_fd_datasync),
"__wasi_fd_fdstat_get" => func!(__wasi_fd_fdstat_get),
"__wasi_fd_fdstat_set_flags" => func!(__wasi_fd_fdstat_set_flags),
"__wasi_fd_fdstat_set_rights" => func!(__wasi_fd_fdstat_set_rights),
"__wasi_fd_filestat_get" => func!(__wasi_fd_filestat_get),
"__wasi_fd_filestat_set_size" => func!(__wasi_fd_filestat_set_size),
"__wasi_fd_filestat_set_times" => func!(__wasi_fd_filestat_set_times),
"__wasi_fd_pread" => func!(__wasi_fd_pread),
"__wasi_fd_prestat_get" => func!(__wasi_fd_prestat_get),
"__wasi_fd_prestat_dir_name" => func!(__wasi_fd_prestat_dir_name),
"__wasi_fd_pwrite" => func!(__wasi_fd_pwrite),
"__wasi_fd_read" => func!(__wasi_fd_read),
"__wasi_fd_readdir" => func!(__wasi_fd_readdir),
"__wasi_fd_renumber" => func!(__wasi_fd_renumber),
"__wasi_fd_seek" => func!(__wasi_fd_seek),
"__wasi_fd_sync" => func!(__wasi_fd_sync),
"__wasi_fd_tell" => func!(__wasi_fd_tell),
"__wasi_fd_write" => func!(__wasi_fd_write),
"__wasi_path_create_directory" => func!(__wasi_path_create_directory),
"__wasi_path_filestat_get" => func!(__wasi_path_filestat_get),
"__wasi_path_filestat_set_times" => func!(__wasi_path_filestat_set_times),
"__wasi_path_link" => func!(__wasi_path_link),
"__wasi_path_open" => func!(__wasi_path_open),
"__wasi_path_readlink" => func!(__wasi_path_readlink),
"__wasi_path_remove_directory" => func!(__wasi_path_remove_directory),
"__wasi_path_rename" => func!(__wasi_path_rename),
"__wasi_path_symlink" => func!(__wasi_path_symlink),
"__wasi_path_unlink_file" => func!(__wasi_path_unlink_file),
"__wasi_poll_oneoff" => func!(__wasi_poll_oneoff),
"__wasi_proc_exit" => func!(__wasi_proc_exit),
"__wasi_proc_raise" => func!(__wasi_proc_raise),
"__wasi_random_get" => func!(__wasi_random_get),
"__wasi_sched_yield" => func!(__wasi_sched_yield),
"__wasi_sock_recv" => func!(__wasi_sock_recv),
"__wasi_sock_send" => func!(__wasi_sock_send),
"__wasi_sock_shutdown" => func!(__wasi_sock_shutdown),
"args_get" => func!(args_get),
"args_sizes_get" => func!(args_sizes_get),
"clock_res_get" => func!(clock_res_get),
"clock_time_get" => func!(clock_time_get),
"environ_get" => func!(environ_get),
"environ_sizes_get" => func!(environ_sizes_get),
"fd_advise" => func!(fd_advise),
"fd_allocate" => func!(fd_allocate),
"fd_close" => func!(fd_close),
"fd_datasync" => func!(fd_datasync),
"fd_fdstat_get" => func!(fd_fdstat_get),
"fd_fdstat_set_flags" => func!(fd_fdstat_set_flags),
"fd_fdstat_set_rights" => func!(fd_fdstat_set_rights),
"fd_filestat_get" => func!(fd_filestat_get),
"fd_filestat_set_size" => func!(fd_filestat_set_size),
"fd_filestat_set_times" => func!(fd_filestat_set_times),
"fd_pread" => func!(fd_pread),
"fd_prestat_get" => func!(fd_prestat_get),
"fd_prestat_dir_name" => func!(fd_prestat_dir_name),
"fd_pwrite" => func!(fd_pwrite),
"fd_read" => func!(fd_read),
"fd_readdir" => func!(fd_readdir),
"fd_renumber" => func!(fd_renumber),
"fd_seek" => func!(fd_seek),
"fd_sync" => func!(fd_sync),
"fd_tell" => func!(fd_tell),
"fd_write" => func!(fd_write),
"path_create_directory" => func!(path_create_directory),
"path_filestat_get" => func!(path_filestat_get),
"path_filestat_set_times" => func!(path_filestat_set_times),
"path_link" => func!(path_link),
"path_open" => func!(path_open),
"path_readlink" => func!(path_readlink),
"path_remove_directory" => func!(path_remove_directory),
"path_rename" => func!(path_rename),
"path_symlink" => func!(path_symlink),
"path_unlink_file" => func!(path_unlink_file),
"poll_oneoff" => func!(poll_oneoff),
"proc_exit" => func!(proc_exit),
"proc_raise" => func!(proc_raise),
"random_get" => func!(random_get),
"sched_yield" => func!(sched_yield),
"sock_recv" => func!(sock_recv),
"sock_send" => func!(sock_send),
"sock_shutdown" => func!(sock_shutdown),
},
}
}

View File

@ -25,30 +25,30 @@ fn write_buffer_array(
}
}
/// ### `__wasi_args_get()`
/// ### `args_get()`
/// Read command-line argument data.
/// The sizes of the buffers should match that returned by [`__wasi_args_sizes_get()`](#args_sizes_get).
/// The sizes of the buffers should match that returned by [`args_sizes_get()`](#args_sizes_get).
/// Inputs:
/// - `char **argv`
/// A pointer to a buffer to write the argument pointers.
/// - `char *argv_buf`
/// A pointer to a buffer to write the argument string data.
///
pub fn __wasi_args_get(ctx: &mut Ctx, ptr_buffer_offset: u32, buffer_offset: u32) {
pub fn args_get(ctx: &mut Ctx, ptr_buffer_offset: u32, buffer_offset: u32) {
let state = get_wasi_state(ctx);
let memory = ctx.memory(0);
write_buffer_array(memory, &*state.args, ptr_buffer_offset, buffer_offset);
}
/// ### `__wasi_args_sizes_get()`
/// ### `args_sizes_get()`
/// Return command-line argument data sizes.
/// Outputs:
/// - `size_t *argc`
/// The number of arguments.
/// - `size_t *argv_buf_size`
/// The size of the argument string data.
pub fn __wasi_args_sizes_get(ctx: &mut Ctx, argc_out: u32, argv_buf_size_out: u32) {
pub fn args_sizes_get(ctx: &mut Ctx, argc_out: u32, argv_buf_size_out: u32) {
let state = get_wasi_state(ctx);
let memory = ctx.memory(0);
@ -59,36 +59,36 @@ pub fn __wasi_args_sizes_get(ctx: &mut Ctx, argc_out: u32, argv_buf_size_out: u3
memory.view::<u32>()[(argv_buf_size_out / 4) as usize].set(total_arg_size as u32);
}
pub fn __wasi_clock_res_get(ctx: &mut Ctx) {
pub fn clock_res_get(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_clock_time_get(ctx: &mut Ctx) {
pub fn clock_time_get(ctx: &mut Ctx) {
unimplemented!()
}
/// ### `__wasi_environ_get()`
/// ### `environ_get()`
/// Read environment variable data.
/// The sizes of the buffers should match that returned by [`__wasi_environ_sizes_get()`](#environ_sizes_get).
/// The sizes of the buffers should match that returned by [`environ_sizes_get()`](#environ_sizes_get).
/// Inputs:
/// - `char **environ`
/// A pointer to a buffer to write the environment variable pointers.
/// - `char *environ_buf`
/// A pointer to a buffer to write the environment variable string data.
pub fn __wasi_environ_get(ctx: &mut Ctx, environ: u32, environ_buf: u32) {
pub fn environ_get(ctx: &mut Ctx, environ: u32, environ_buf: u32) {
let state = get_wasi_state(ctx);
let memory = ctx.memory(0);
write_buffer_array(memory, &*state.args, environ, environ_buf);
}
/// ### `__wasi_environ_sizes_get()`
/// ### `environ_sizes_get()`
/// Return command-line argument data sizes.
/// Outputs:
/// - `size_t *environ_count`
/// The number of environment variables.
/// - `size_t *environ_buf_size`
/// The size of the environment variable string data.
pub fn __wasi_environ_sizes_get(ctx: &mut Ctx, environ_count_out: u32, environ_buf_size_out: u32) {
pub fn environ_sizes_get(ctx: &mut Ctx, environ_count_out: u32, environ_buf_size_out: u32) {
let state = get_wasi_state(ctx);
let memory = ctx.memory(0);
@ -99,120 +99,120 @@ pub fn __wasi_environ_sizes_get(ctx: &mut Ctx, environ_count_out: u32, environ_b
memory.view::<u32>()[(environ_buf_size_out / 4) as usize].set(total_env_size as u32);
}
pub fn __wasi_fd_advise(ctx: &mut Ctx) {
pub fn fd_advise(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_allocate(ctx: &mut Ctx) {
pub fn fd_allocate(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_close(ctx: &mut Ctx) {
pub fn fd_close(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_datasync(ctx: &mut Ctx) {
pub fn fd_datasync(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_fdstat_get(ctx: &mut Ctx) {
pub fn fd_fdstat_get(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_fdstat_set_flags(ctx: &mut Ctx) {
pub fn fd_fdstat_set_flags(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_fdstat_set_rights(ctx: &mut Ctx) {
pub fn fd_fdstat_set_rights(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_filestat_get(ctx: &mut Ctx) {
pub fn fd_filestat_get(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_filestat_set_size(ctx: &mut Ctx) {
pub fn fd_filestat_set_size(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_filestat_set_times(ctx: &mut Ctx) {
pub fn fd_filestat_set_times(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_pread(ctx: &mut Ctx) {
pub fn fd_pread(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_prestat_get(ctx: &mut Ctx) {
pub fn fd_prestat_get(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_prestat_dir_name(ctx: &mut Ctx) {
pub fn fd_prestat_dir_name(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_pwrite(ctx: &mut Ctx) {
pub fn fd_pwrite(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_read(ctx: &mut Ctx) {
pub fn fd_read(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_readdir(ctx: &mut Ctx) {
pub fn fd_readdir(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_renumber(ctx: &mut Ctx) {
pub fn fd_renumber(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_seek(ctx: &mut Ctx) {
pub fn fd_seek(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_sync(ctx: &mut Ctx) {
pub fn fd_sync(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_tell(ctx: &mut Ctx) {
pub fn fd_tell(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_fd_write(ctx: &mut Ctx) {
pub fn fd_write(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_create_directory(ctx: &mut Ctx) {
pub fn path_create_directory(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_filestat_get(ctx: &mut Ctx) {
pub fn path_filestat_get(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_filestat_set_times(ctx: &mut Ctx) {
pub fn path_filestat_set_times(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_link(ctx: &mut Ctx) {
pub fn path_link(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_open(ctx: &mut Ctx) {
pub fn path_open(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_readlink(ctx: &mut Ctx) {
pub fn path_readlink(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_remove_directory(ctx: &mut Ctx) {
pub fn path_remove_directory(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_rename(ctx: &mut Ctx) {
pub fn path_rename(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_symlink(ctx: &mut Ctx) {
pub fn path_symlink(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_path_unlink_file(ctx: &mut Ctx) {
pub fn path_unlink_file(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_poll_oneoff(ctx: &mut Ctx) {
pub fn poll_oneoff(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_proc_exit(ctx: &mut Ctx) {
pub fn proc_exit(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_proc_raise(ctx: &mut Ctx) {
pub fn proc_raise(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_random_get(ctx: &mut Ctx) {
pub fn random_get(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_sched_yield(ctx: &mut Ctx) {
pub fn sched_yield(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_sock_recv(ctx: &mut Ctx) {
pub fn sock_recv(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_sock_send(ctx: &mut Ctx) {
pub fn sock_send(ctx: &mut Ctx) {
unimplemented!()
}
pub fn __wasi_sock_shutdown(ctx: &mut Ctx) {
pub fn sock_shutdown(ctx: &mut Ctx) {
unimplemented!()
}