snuk182 / nuklear-rust

The bindings to the Nuklear 2D immediate GUI library.
Apache License 2.0
359 stars 16 forks source link

Build failed using latest nightly toolchain #3

Closed lynnux closed 7 years ago

lynnux commented 7 years ago
E:\prj\rust\nuklear-test-gdi>cargo build
   Compiling nuklear-rust v0.3.0
error[E0425]: cannot find function `allocate` in module `heap`
  --> C:\Users\lynnux\.cargo\registry\src\mirrors.ustc.edu.cn-15f9db60536bad60\n
uklear-rust-0.3.0\src\alloc_heap.rs:19:24
   |
19 |     let memory = heap::allocate(size, ALIGNMENT);
   |                        ^^^^^^^^ not found in `heap`

error[E0425]: cannot find function `deallocate` in module `heap`
  --> C:\Users\lynnux\.cargo\registry\src\mirrors.ustc.edu.cn-15f9db60536bad60\n
uklear-rust-0.3.0\src\alloc_heap.rs:40:11
   |
40 |     heap::deallocate(old as *mut u8, old_size, ALIGNMENT);
   |           ^^^^^^^^^^ not found in `heap`

error: use of unstable library feature 'allocator_api': the precise API and guar
antees it provides may be tweaked slightly, especially to possibly take into acc
ount the types being stored to make room for a future tracing garbage collector
(see issue #32838)
 --> C:\Users\lynnux\.cargo\registry\src\mirrors.ustc.edu.cn-15f9db60536bad60\nu
klear-rust-0.3.0\src\alloc_heap.rs:9:5
  |
9 | use self::alloc::heap;
  |     ^^^^^^^^^^^^^^^^^
  |
  = help: add #![feature(allocator_api)] to the crate attributes to enable

error: aborting due to 3 previous errors

there is no heap::allocate and heap::deallocate in the latest nightly rust source: https://github.com/rust-lang/rust/blob/master/src/liballoc/heap.rs

snuk182 commented 7 years ago

https://github.com/snuk182/nuklear-rust/commit/ca24f6ab463650f092ad98e5c8d7ae142d5dd8fd https://crates.io/crates/nuklear-rust/0.3.1