1
0
Fork 0

Fix some typos in comments

This commit is contained in:
AkiyukiOkayasu 2023-01-25 17:51:10 +09:00 committed by Robbert van der Helm
parent 85e54395b3
commit 4710158f07

View file

@ -14,7 +14,7 @@ mod util;
/// Re-export for the main function. /// Re-export for the main function.
pub use anyhow::Result; pub use anyhow::Result;
/// The base birectory for the bundler's output. /// The base directory for the bundler's output.
const BUNDLE_HOME: &str = "target/bundled"; const BUNDLE_HOME: &str = "target/bundled";
fn build_usage_string(command_name: &str) -> String { fn build_usage_string(command_name: &str) -> String {
@ -180,8 +180,8 @@ pub fn chdir_workspace_root() -> Result<()> {
.context("Could not change to workspace root directory") .context("Could not change to workspace root directory")
} }
/// Build one or more packages using the provided `cargo build` arguments. This should be caleld /// Build one or more packages using the provided `cargo build` arguments. This should be called
/// before callingq [`bundle()`]. This requires the current working directory to have been set to /// before calling [`bundle()`]. This requires the current working directory to have been set to
/// the workspace's root using [`chdir_workspace_root()`]. /// the workspace's root using [`chdir_workspace_root()`].
pub fn build(packages: &[String], args: &[String]) -> Result<()> { pub fn build(packages: &[String], args: &[String]) -> Result<()> {
let package_args = packages.iter().flat_map(|package| ["-p", package]); let package_args = packages.iter().flat_map(|package| ["-p", package]);
@ -314,7 +314,7 @@ pub fn bundle(package: &str, args: &[String], universal: bool) -> Result<()> {
} }
/// Bundle a standalone target. If `bin_path` contains more than one path, then the binaries will be /// Bundle a standalone target. If `bin_path` contains more than one path, then the binaries will be
/// combined into a single binary using a method that depends on the compiilation target. For /// combined into a single binary using a method that depends on the compilation target. For
/// universal macOS builds this uses lipo. /// universal macOS builds this uses lipo.
fn bundle_binary( fn bundle_binary(
package: &str, package: &str,
@ -377,7 +377,7 @@ fn bundle_binary(
/// Bundle all plugin targets for a plugin library. If `lib_path` contains more than one path, then /// Bundle all plugin targets for a plugin library. If `lib_path` contains more than one path, then
/// the libraries will be combined into a single library using a method that depends on the /// the libraries will be combined into a single library using a method that depends on the
/// compiilation target. For universal macOS builds this uses lipo. /// compilation target. For universal macOS builds this uses lipo.
fn bundle_plugin( fn bundle_plugin(
package: &str, package: &str,
lib_paths: &[&Path], lib_paths: &[&Path],
@ -388,15 +388,15 @@ fn bundle_plugin(
_ => package.to_string(), _ => package.to_string(),
}; };
// We'll detect the pugin formats supported by the plugin binary and create bundled accordingly. // We'll detect the plugin formats supported by the plugin binary and create bundled accordingly.
// If `lib_path` contains paths to multiple plugins that need to be comined into a macOS // If `lib_path` contains paths to multiple plugins that need to be combined into a macOS
// universal binary, then we'll assume all of them export the same symbols and only check the // universal binary, then we'll assume all of them export the same symbols and only check the
// first one. // first one.
let first_lib_path = lib_paths.first().context("Empty library paths slice")?; let first_lib_path = lib_paths.first().context("Empty library paths slice")?;
let bundle_clap = symbols::exported(first_lib_path, "clap_entry") let bundle_clap = symbols::exported(first_lib_path, "clap_entry")
.with_context(|| format!("Could not parse '{}'", first_lib_path.display()))?; .with_context(|| format!("Could not parse '{}'", first_lib_path.display()))?;
// We'll ignore the platofrm-specific entry points for VST2 plugins since there's no reason to // We'll ignore the platform-specific entry points for VST2 plugins since there's no reason to
// create a new Rust VST2 plugin that doesn't work in modern DAWs // create a new Rust VST2 plugin that doesn't work in modern DAWs
// NOTE: NIH-plug does not support VST2, but we'll support bundling VST2 plugins anyways because // NOTE: NIH-plug does not support VST2, but we'll support bundling VST2 plugins anyways because
// this bundler can also be used standalone. // this bundler can also be used standalone.