The short answer is that you can't statically allocate such a struct. Future Rust will probably gain this ability.

What you can do, is statically allocate a struct that contains null pointers, and set those null pointers to something useful when you call the function. Rust has static mut. It requires unsafe code, is not threadsafe at all and is (to the best of my knowledge) considered a code smell.

Right here I consider it a workaround to the fact that there is no way to turn a &amp;[T] into a *const T in a static.

static S: &amp;'static [u8] = b"http://example.org/eg-amp_rust\n\0";
static mut desc: LV2Descriptor = LV2Descriptor {
    amp_uri: 0 as *const libc::c_char, // ptr::null() isn't const fn (yet)
};

#[no_mangle]
pub extern fn lv2_descriptor(index: i32) -&gt; *const LV2Descriptor {
     let ptr = S.as_ptr() as *const libc::c_char;
     unsafe {
        desc.amp_uri = ptr;
        &amp;desc as *const LV2Descriptor
     }
}


answer copied from duplicate question

Creating a static C struct containing strings
I am working on redesigning my website and iterating through fivesecondtests. 

The overall feedback is improving but no matter what I change, several people have mentionned that my designs look "dated". "Not modern". "Use modern fonts". 


  What are "modern fonts"? 
  Technically, Calibri, Cambria, etc. are "modern fonts", but I hardly ever see those online. What fonts are considered "modern" in the context of web design?
  
  What are the characteristics of a "modern design"? Conversely what
  are the tell tale signs of a "dated" design?


For reference, here is the latest iteration of my design. Does it still look "dated"? If so, what elements give that impression?





I think I am starting to get a better idea of what "modern web design" is:


No or light gradients
Sans serif typefaces
Light drop shadows
Good page hierarchy / directing visitor's attention


Is there anything else that makes a design look "modern"? 

I have implemented the most of the recommendations in the answers, and I feel it has improved the design a lot. (Never mind the logo - will figure that one out later) 



Am I still stuck in the past? Or am I finally getting somewhere?



Implementing all recommendations, this is what I get:


It's obviously much better, but is it up to modern standards yet? If not, can it get there without changing massively the layout? 



The learning process never ends, does it? Assume that the central menu has a lava effect and that hopefully I can get a decent photo of myself shot to replace that one.



Looking at the various versions, I can see the design improving by leaps and bounds. Not sure how much further it needs to improve to reach professional standards, but it's certainly moving in the right direction.

Thanks a lot to all of you. I am impressed by the quality of the advice and how specific and actionable most recommendations have been so far.
