title: Rust-SIMD hello world
body: <p>I couldn't find a working example for Rust-SIMD. The closest I can find is <a href="https://www.cs.brandeis.edu/%7Ecs146a/rust/rustbyexample-02-21-2015/simd.html" rel="nofollow noreferrer">this one</a>. After adjusting, it becomes:</p>
  <pre><code>#![feature(core)]
  #![feature(portable_simd)]
  
  use std::simd::f32x4;
  
  fn main() {
      let x = f32x4(1.0, 1.0, 1.0, 1.0);
  }
  </code></pre>
  <p>But still cargo complains</p>
  <pre><code>error[E0423]: expected function, found type alias `f32x4`
   --&gt; src/main.rs:7:13
    |
  7 |     let x = f32x4(1.0, 1.0, 1.0, 1.0);
    |             ^^^^^
    |
    = note: can't use a type alias as a constructor
  </code></pre>
  <p>during building.</p>
  <p>How do I get this simple example working?</p>
  <p><code>Cargo.toml</code>:</p>
  <pre><code>[package]
  name = &quot;rust-simd&quot;
  version = &quot;0.1.0&quot;
  edition = &quot;2021&quot;
  
  [dependencies]
  </code></pre>
  <p>I have <code>nightly</code> switched on already: <code>rustup default nightly</code>.</p>