Open
Description
Feature gate: #![feature(wasm_numeric_instr)]
This is a tracking issue for floating point instructions that aren't available in core
but are available as simple instructions on Wasm directly.
Public API
mod arch {
mod wasm32 {
pub fn f32_ceil(a: f32) -> f32;
pub fn f32_floor(a: f32) -> f32;
pub fn f32_trunc(a: f32) -> f32;
pub fn f32_nearest(a: f32) -> f32;
pub fn f32_sqrt(a: f32) -> f32;
pub fn f64_ceil(a: f64) -> f64;
pub fn f64_floor(a: f64) -> f64;
pub fn f64_trunc(a: f64) -> f64;
pub fn f64_nearest(a: f64) -> f64;
pub fn f64_sqrt(a: f64) -> f64;
}
}
Steps / History
- Implementation: Add numeric instructions for Wasm not available in
core
stdarch#1677 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
My impression from #50145 was that these methods (except sqrt()
) are not intended to ever be added to core
. But looking at a recent discussion in Zulip it paints a different picture.
If indeed these methods are intended to come to core
, then these additions will probably never be stabilized.