Fix #6: Rendering Shared 3D Models #10
|
@ -19,7 +19,9 @@ impl Drop for ComponentColumn {
|
|||
|
||||
unsafe {
|
||||
// TODO: trigger drop on the components
|
||||
let layout = self.info.layout();
|
||||
// SAFETY: The size of the data buffer is the capcity times the size of a component
|
||||
let size = self.info.layout().size() * self.capacity;
|
||||
let layout = Layout::from_size_align_unchecked(size, self.info.layout().align());
|
||||
dealloc(data, layout);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[toolchain]
|
||||
channel = "nightly"
|
||||
date = "2023-11-21"
|
||||
channel = "nightly-2023-11-21"
|
||||
#date = "2023-11-21"
|
||||
targets = [ "x86_64-unknown-linux-gnu" ]
|
16
shell.nix
16
shell.nix
|
@ -1,6 +1,10 @@
|
|||
let
|
||||
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
||||
nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
|
||||
rust_overlay = import (builtins.fetchTarball https://github.com/oxalica/rust-overlay/archive/master.tar.gz);
|
||||
nixpkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
|
||||
|
||||
rust = (nixpkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override {
|
||||
extensions = [ "rust-analysis" "rust-src" "miri-preview" ];
|
||||
};
|
||||
in
|
||||
with nixpkgs;
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -15,13 +19,7 @@ in
|
|||
mold
|
||||
udev
|
||||
lua5_4_compat
|
||||
((nixpkgs.rustChannelOf { rustToolchain = ./rust-toolchain.toml; }).rust.override {
|
||||
extensions = [
|
||||
"rust-src"
|
||||
"rust-analysis"
|
||||
"miri-preview"
|
||||
];
|
||||
})
|
||||
rust
|
||||
];
|
||||
buildInputs = [
|
||||
udev alsa-lib libGL gcc
|
||||
|
|
Loading…
Reference in New Issue