Skip to content

Commit

Permalink
Merge pull request amethyst#2624 from amethyst/rename-atelier
Browse files Browse the repository at this point in the history
update atelier to distill
  • Loading branch information
ezpuzz authored Jan 31, 2021
2 parents 53e66c8 + 126ef35 commit 44e68dc
Show file tree
Hide file tree
Showing 23 changed files with 55 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ thumbs.db
# Thread profiler output
thread_profile.json

# Atelier Assets
# Distill Assets
.assets_db
prefab.ron
*.meta
2 changes: 1 addition & 1 deletion amethyst_animation/src/sprite.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use amethyst_assets::{
atelier_importer::{typetag, SerdeImportable},
distill_importer::{typetag, SerdeImportable},
register_asset_type, AssetProcessorSystem, Handle,
};
use amethyst_core::ecs::CommandBuffer;
Expand Down
2 changes: 1 addition & 1 deletion amethyst_animation/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use amethyst_assets::{
atelier_importer::{typetag, SerdeImportable},
distill_importer::{typetag, SerdeImportable},
register_asset_type, AssetProcessorSystem,
};
use amethyst_core::{
Expand Down
2 changes: 1 addition & 1 deletion amethyst_assets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dyn-clone = "1.0"
erased-serde = "0.3.9"
inventory = "0.1.5"
lazy_static = "1.4"
atelier-assets = { version = "0.1", git = "https://github.com/radium-io/atelier-assets.git", rev = "702e9d95495d30816f04978e3cd0297278d2f945", features = [
distill = { version = "0.0.2", features = [
"serde-1",
"type_uuid",
"serde_importers",
Expand Down
2 changes: 1 addition & 1 deletion amethyst_assets/src/asset.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ops::Deref;

use atelier_assets::loader::LoadHandle;
use distill::loader::LoadHandle;
use dyn_clone::DynClone;

use crate::{processor::ProcessingState, AssetStorage};
Expand Down
6 changes: 2 additions & 4 deletions amethyst_assets/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ use std::{default::Default, path::PathBuf};

use amethyst_core::ecs::{DispatcherBuilder, Resources, SystemBundle, World};
use amethyst_error::Error;
use atelier_assets::daemon::{
default_importer_contexts, default_importers, AssetDaemon, ImporterMap,
};
use distill::daemon::{default_importer_contexts, default_importers, AssetDaemon, ImporterMap};
use log::info;

use crate::{
Expand All @@ -22,7 +20,7 @@ fn asset_loading_tick(_: &mut World, resources: &mut Resources) {
.expect("Error in Loader processing");
}

/// starts the asset thread with atelier_daemon
/// starts the asset thread with distill_daemon
pub fn start_asset_daemon(asset_dirs: Vec<PathBuf>) {
let db_path = ".assets_db";
let address = "127.0.0.1:9999";
Expand Down
2 changes: 1 addition & 1 deletion amethyst_assets/src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{borrow::Borrow, hash::Hash, marker::PhantomData};

use atelier_assets::loader::{
use distill::loader::{
crossbeam_channel::Sender,
handle::{AssetHandle, Handle, RefOp, WeakHandle},
};
Expand Down
4 changes: 2 additions & 2 deletions amethyst_assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ mod simple_importer;
mod source;
mod storage;

pub use atelier_assets::{
importer as atelier_importer,
pub use distill::{
importer as distill_importer,
loader::{
handle::{AssetHandle, GenericHandle, Handle, WeakHandle},
storage::LoadHandle,
Expand Down
26 changes: 13 additions & 13 deletions amethyst_assets/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ use amethyst_core::{
ecs::{DispatcherBuilder, Resources},
};
use amethyst_error::Error as AmethystError;
use atelier_assets::loader as atelier_loader;
pub(crate) use atelier_loader::LoadHandle;
use atelier_loader::{
use distill::loader as distill_loader;
pub(crate) use distill_loader::LoadHandle;
use distill_loader::{
crossbeam_channel::{unbounded, Receiver, Sender, TryRecvError},
handle::{AssetHandle, GenericHandle, Handle, RefOp, SerdeContext, WeakHandle},
storage::{
AssetLoadOp, AtomicHandleAllocator, DefaultIndirectionResolver, HandleAllocator,
IndirectIdentifier, IndirectionTable, LoaderInfoProvider,
},
AssetTypeId, Loader as AtelierLoader, RpcIO,
AssetTypeId, Loader as DistillLoader, RpcIO,
};
pub use atelier_loader::{storage::LoadStatus, AssetUuid};
pub use distill_loader::{storage::LoadStatus, AssetUuid};
use log::debug;
use serde::de::Deserialize;

Expand Down Expand Up @@ -144,7 +144,7 @@ pub trait Loader: Send + Sync {

/// Asset loader and storage.
pub struct DefaultLoader {
loader: AtelierLoader,
loader: DistillLoader,
storage_map: AssetStorageMap,
ref_sender: Sender<RefOp>,
ref_receiver: Receiver<RefOp>,
Expand All @@ -156,7 +156,7 @@ impl Default for DefaultLoader {
fn default() -> Self {
let (tx, rx) = unbounded();
let handle_allocator = Arc::new(AtomicHandleAllocator::default());
let loader = AtelierLoader::new_with_handle_allocator(
let loader = DistillLoader::new_with_handle_allocator(
Box::new(RpcIO::default()),
handle_allocator.clone(),
);
Expand Down Expand Up @@ -246,8 +246,8 @@ impl Loader for DefaultLoader {

/// Storage for a particular asset type.
///
/// This trait abtracts over the bridge between `atelier_loader` and Amethyst's asset storage. These
/// methods are called through dynamic dispatch by `atelier_loader` when an asset is loaded /
/// This trait abtracts over the bridge between `distill_loader` and Amethyst's asset storage. These
/// methods are called through dynamic dispatch by `distill_loader` when an asset is loaded /
/// unloaded. All of these operations are performed on Amethyst's `AssetStorage`
pub trait AssetTypeStorage {
/// Updates an asset.
Expand All @@ -256,7 +256,7 @@ pub trait AssetTypeStorage {
///
/// * `handle`: Load handle of the asset.
/// * `data`: Asset data bytes (uncompressed).
/// * `load_op`: Load operation to notify `atelier_loader` when the asset has been loaded.
/// * `load_op`: Load operation to notify `distill_loader` when the asset has been loaded.
/// * `version`: Version of the asset -- this will be a new version for each hot reload.
fn update_asset(
&self,
Expand Down Expand Up @@ -351,9 +351,9 @@ impl Default for AssetStorageMap {
}
}

/// Asset storage bridge between Amethyst and `atelier-assets`.
/// Asset storage bridge between Amethyst and `distill`.
///
/// This type implements the `atelier_loader::AssetStorage` trait which `atelier_loader` uses as the
/// This type implements the `distill_loader::AssetStorage` trait which `distill_loader` uses as the
/// storage type for all assets of all asset types.
///
/// This contains immutable references to the `AssetStorageMap` and `World` resources.
Expand All @@ -377,7 +377,7 @@ impl<'a> WorldStorages<'a> {
}
}

impl<'a> atelier_loader::storage::AssetStorage for WorldStorages<'a> {
impl<'a> distill_loader::storage::AssetStorage for WorldStorages<'a> {
fn update_asset(
&self,
loader_info: &dyn LoaderInfoProvider,
Expand Down
4 changes: 2 additions & 2 deletions amethyst_assets/src/prefab/assets.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use amethyst_core::ecs::World;
use atelier_assets::importer as atelier_importer;
use atelier_importer::{typetag, SerdeImportable};
use distill::importer as distill_importer;
use distill_importer::{typetag, SerdeImportable};
use fnv::FnvHashSet;
use serde::{Deserialize, Serialize};
use type_uuid::TypeUuid;
Expand Down
8 changes: 4 additions & 4 deletions amethyst_assets/src/prefab/importers.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::{collections::HashMap, io::Read};

use atelier_assets::{
use distill::{
core::AssetUuid,
importer::{self as atelier_importer, ImportOp, ImportedAsset, Importer, ImporterValue},
importer::{self as distill_importer, ImportOp, ImportedAsset, Importer, ImporterValue},
};
use legion_prefab::ComponentRegistration;
use prefab_format::ComponentTypeUuid;
Expand Down Expand Up @@ -46,7 +46,7 @@ impl Importer for PrefabImporter {
source: &mut dyn Read,
_: &Self::Options,
state: &mut Self::State,
) -> atelier_importer::Result<ImporterValue> {
) -> distill_importer::Result<ImporterValue> {
log::info!("Importing prefab");
// STEP 1: Read in the data

Expand Down Expand Up @@ -77,7 +77,7 @@ impl Importer for PrefabImporter {

let prefab_deser = legion_prefab::PrefabFormatDeserializer::new(prefab_serde_context);
if let Err(err) = prefab_format::deserialize(&mut de, &prefab_deser) {
return Err(atelier_importer::Error::RonDe(err));
return Err(distill_importer::Error::RonDe(err));
}
let raw_prefab = prefab_deser.prefab();

Expand Down
4 changes: 2 additions & 2 deletions amethyst_assets/src/prefab/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use amethyst_core::{
dispatcher::System,
ecs::{systems::ParallelRunnable, SystemBuilder},
};
use atelier_assets::core::AssetUuid;
use distill::core::AssetUuid;
use fnv::{FnvHashMap, FnvHashSet};
use prefab_format::PrefabUuid;

Expand Down Expand Up @@ -173,7 +173,7 @@ mod tests {
use std::{collections::HashMap, sync::Once};

use amethyst_core::{Logger, LoggerConfig};
use atelier_assets::loader::handle::AssetHandle;
use distill::loader::handle::AssetHandle;
use legion_prefab::PrefabRef;
use serial_test::serial;

Expand Down
4 changes: 2 additions & 2 deletions amethyst_assets/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use amethyst_core::{
ecs::{systems::ParallelRunnable, SystemBuilder},
};
use amethyst_error::Error;
use atelier_assets::loader::storage::AssetLoadOp;
use crossbeam_queue::SegQueue;
use derivative::Derivative;
use distill::loader::storage::AssetLoadOp;
use log::debug;

use crate::{
Expand Down Expand Up @@ -94,7 +94,7 @@ impl LoadNotifier {
}
}

/// Represents asset data processed by `atelier-assets` that needs to be loaded by Amethyst.
/// Represents asset data processed by `distill` that needs to be loaded by Amethyst.
pub(crate) struct Processed<T> {
data: Result<T, Error>,
handle: LoadHandle,
Expand Down
2 changes: 1 addition & 1 deletion amethyst_assets/src/simple_importer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io::Read;

use atelier_assets::importer::{
use distill::importer::{
self as importer, BoxedImporter, ImportOp, ImportedAsset, Importer, ImporterValue, SerdeObj,
};
use serde::{Deserialize, Serialize};
Expand Down
4 changes: 2 additions & 2 deletions amethyst_assets/src/storage.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use atelier_assets::loader::{handle::AssetHandle, storage::IndirectionTable, LoadHandle};
use crossbeam_queue::SegQueue;
use distill::loader::{handle::AssetHandle, storage::IndirectionTable, LoadHandle};
use fnv::FnvHashMap;

struct AssetState<A> {
Expand Down Expand Up @@ -180,7 +180,7 @@ impl<A> AssetStorage<A> {
}
}

impl<A> atelier_assets::loader::handle::TypedAssetStorage<A> for AssetStorage<A> {
impl<A> distill::loader::handle::TypedAssetStorage<A> for AssetStorage<A> {
fn get<T: AssetHandle>(&self, handle: &T) -> Option<&A> {
self.get(handle)
}
Expand Down
4 changes: 2 additions & 2 deletions amethyst_rendy/src/sprite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ pub struct SpriteGrid {
}

use amethyst_assets::{
atelier_importer,
atelier_importer::{typetag, SerdeImportable},
distill_importer,
distill_importer::{typetag, SerdeImportable},
};

/// Allows loading of sprite sheets in RON format.
Expand Down
4 changes: 2 additions & 2 deletions amethyst_ui/src/button/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ mod retrigger;
mod system;

use amethyst_assets::{
atelier_importer,
atelier_importer::{typetag, SerdeImportable},
distill_importer,
distill_importer::{typetag, SerdeImportable},
};
use serde::{Deserialize, Serialize};
use type_uuid::TypeUuid;
Expand Down
4 changes: 2 additions & 2 deletions amethyst_ui/src/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const DEFAULT_HEIGHT: f32 = 64.0;
const DEFAULT_TXT_COLOR: [f32; 4] = [0.0, 0.0, 0.0, 1.0];

use amethyst_assets::{
atelier_importer,
atelier_importer::{typetag, SerdeImportable},
distill_importer,
distill_importer::{typetag, SerdeImportable},
};
use serde::{Deserialize, Serialize};
use type_uuid::TypeUuid;
Expand Down
8 changes: 3 additions & 5 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ yanked = "deny"
notice = "deny"
ignore = [
"RUSTSEC-2020-0053", # FIXME: font-kit depends on old dirs
"RUSTSEC-2020-0077", # FIXME: atelier-assets depends on memmap
"RUSTSEC-2020-0077", # FIXME: distill depends on memmap
"RUSTSEC-2020-0056", # FIXME: cpal dependency, check wasm branches for fix
"RUSTSEC-2019-0035", # FIXME: old rand_core
# FIXME(#2472)
# `stb_truetype` crate has been deprecated; use `ttf-parser` instead
# This crate was maintained for use in rusttype which has switched to use [ttf-parser](https://crates.io/crates/ttf-parser)
Expand All @@ -31,7 +30,6 @@ skip = [
{ name = "cfg-if", version = "0.1.10" },
{ name = "winapi", version = "0.2.8" }, # upgrade tokio and notify
{ name = "wasi", version = "0.9.0" }, # upgrade tempfile and uuid
{ name = "tinyvec", version = "0.3.4" }, # upgrade rodio
{ name = "rusttype", version = "0.8.3" }, # upgrade glyph_brush
{ name = "redox_users", version = "0.3.5" }, # upgrade font-kit
{ name = "nom", version = "5.1.2" }, # upgrade cpal
Expand All @@ -45,7 +43,7 @@ skip = [
{ name = "rand", version = "0.7.3" }, # upgrade nalgebra,glyph_brush
{ name = "itertools", version = "0.9.0" }, # duplicates in rendy tree
]
skip-tree = [{ name = "rendy" }, { name = "atelier-assets" }]
skip-tree = [{ name = "rendy" }, { name = "distill" }]
deny = []

[sources]
Expand Down Expand Up @@ -84,4 +82,4 @@ exceptions = [{ name = "lazy-bytes-cast", allow = ["BSL-1.0"] }]
confidence-threshold = 0.93

[sources.allow-org]
github = ["amethyst", "radium-io", "rust-windowing"]
github = ["amethyst", "rust-windowing"]
8 changes: 4 additions & 4 deletions examples/asset_custom/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use amethyst::{
assets::{
atelier_importer,
atelier_importer::{typetag, SerdeImportable},
distill_importer,
distill_importer::{typetag, SerdeImportable},
register_asset_type, Asset, AssetProcessorSystem, AssetStorage, DefaultLoader, Format,
Handle, Loader, LoaderBundle, TypeUuid,
},
Expand Down Expand Up @@ -91,11 +91,11 @@ fn main() -> amethyst::Result<()> {
amethyst::LogLevelFilter::Debug,
),
(
"atelier_daemon".to_string(),
"distill_daemon".to_string(),
amethyst::LogLevelFilter::Debug,
),
(
"atelier_loader".to_string(),
"distill_loader".to_string(),
amethyst::LogLevelFilter::Trace,
),
],
Expand Down
4 changes: 2 additions & 2 deletions examples/asset_loading/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ fn main() -> Result<(), Error> {
amethyst::LogLevelFilter::Debug,
),
(
"atelier_daemon".to_string(),
"distill_daemon".to_string(),
amethyst::LogLevelFilter::Debug,
),
(
"atelier_loader".to_string(),
"distill_loader".to_string(),
amethyst::LogLevelFilter::Trace,
),
],
Expand Down
4 changes: 2 additions & 2 deletions examples/auto_fov/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ fn main() -> Result<(), Error> {
"amethyst_assets".to_string(),
amethyst::LogLevelFilter::Trace,
),
("atelier_daemon".to_string(), amethyst::LogLevelFilter::Warn),
("atelier_loader".to_string(), amethyst::LogLevelFilter::Warn),
("distill_daemon".to_string(), amethyst::LogLevelFilter::Warn),
("distill_loader".to_string(), amethyst::LogLevelFilter::Warn),
],
..Default::default()
};
Expand Down
4 changes: 2 additions & 2 deletions examples/prefab/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ fn main() -> Result<(), Error> {
"amethyst_assets".to_string(),
amethyst::LogLevelFilter::Trace,
),
("atelier_daemon".to_string(), amethyst::LogLevelFilter::Warn),
("atelier_loader".to_string(), amethyst::LogLevelFilter::Warn),
("distill_daemon".to_string(), amethyst::LogLevelFilter::Warn),
("distill_loader".to_string(), amethyst::LogLevelFilter::Warn),
],
..Default::default()
};
Expand Down

0 comments on commit 44e68dc

Please sign in to comment.