Skip to content

feat(c-api) Rename the wasmer module to unstable #2071

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 1 commit into from
Jan 28, 2021
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
8 changes: 6 additions & 2 deletions lib/c-api/src/wasm_c_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ pub mod trap;
/// cbindgen:ignore
pub mod types;

/// This module contains _unstable non-standard_ C API.
///
/// Use them at your own risks. The API is subject to change or to
/// break without any plan to keep any compatibility :-).
pub mod unstable;

/// Possible runtime values that a WebAssembly module can either
/// consume or produce.
///
Expand Down Expand Up @@ -277,8 +283,6 @@ pub mod version;
#[cfg(feature = "wasi")]
pub mod wasi;

pub mod wasmer;

/// Wasmer-specific API to transform the WAT format into Wasm bytes.
///
/// It is used mostly for testing or for small program purposes.
Expand Down
1 change: 1 addition & 0 deletions lib/c-api/src/wasm_c_api/unstable/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod module;
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
//! Non-standard Wasmer-specific extensions to the Wasm C API.
//! Unstable non-standard Wasmer-specific extensions to the Wasm C API.

use super::module::wasm_module_t;
use super::types::wasm_name_t;
use super::super::module::wasm_module_t;
use super::super::types::wasm_name_t;
use std::ptr;
use std::str;
use std::sync::Arc;

/// Non-standard Wasmer-specific API to get the module's name,
/// otherwise `out->size` is set to `0` and `out->data` to `NULL`.
/// Unstable non-standard Wasmer-specific API to get the module's
/// name, otherwise `out->size` is set to `0` and `out->data` to
/// `NULL`.
///
/// # Example
///
Expand Down Expand Up @@ -72,9 +73,9 @@ pub unsafe extern "C" fn wasm_module_name(
*out = name.as_bytes().to_vec().into();
}

/// Non-standard Wasmer-specific API to set the module's name. The
/// function returns `true` if the name has been updated, `false`
/// otherwise.
/// Unstable non-standard Wasmer-specific API to set the module's
/// name. The function returns `true` if the name has been updated,
/// `false` otherwise.
///
/// # Example
///
Expand Down
11 changes: 6 additions & 5 deletions lib/c-api/wasmer_wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ void wasm_config_set_compiler(wasm_config_t *config, wasmer_compiler_t compiler)
void wasm_config_set_engine(wasm_config_t *config, wasmer_engine_t engine);

/**
* Non-standard Wasmer-specific API to get the module's name,
* otherwise `out->size` is set to `0` and `out->data` to `NULL`.
* Unstable non-standard Wasmer-specific API to get the module's
* name, otherwise `out->size` is set to `0` and `out->data` to
* `NULL`.
*
* # Example
*
Expand Down Expand Up @@ -389,9 +390,9 @@ void wasm_config_set_engine(wasm_config_t *config, wasmer_engine_t engine);
void wasm_module_name(const wasm_module_t *module, wasm_name_t *out);

/**
* Non-standard Wasmer-specific API to set the module's name. The
* function returns `true` if the name has been updated, `false`
* otherwise.
* Unstable non-standard Wasmer-specific API to set the module's
* name. The function returns `true` if the name has been updated,
* `false` otherwise.
*
* # Example
*
Expand Down