Optimizing Rust for Apple Silicon M3: Performance Tweaks and Benchmarks
https://markaicode.com/rust-apple-silicon-m3-optimization/
https://markaicode.com/rust-apple-silicon-m3-optimization/
git clone https://github.com/zed-industries/zed.git
Building Zed for macOS
https://github.com/zed-industries/zed/discussions/24512
# Build CLI
cd crates/cli/
cargo build --release
# Build Editor
cd ../zed/
cargo build --release --verbose Compiling env_filter v0.1.3
Compiling email_address v0.2.9
Compiling num-cmp v0.1.0
warning: webrtc-sys@0.3.7: webrtc-sys downloading webrtc to "/Users/baxter/baxdocs/rust_learn/zed/target/release/build/webrtc-sys-8cf4e81cad33241f/out/livekit/mac-arm64-release-webrtc-b99fd2c-6/mac-arm64-release"
warning: webrtc-sys@0.3.7: In file included from /Users/baxter/baxdocs/rust_learn/zed/target/release/build/webrtc-sys-8cf4e81cad33241f/out/cxxbridge/sources/webrtc-sys/src/peer_connection.rs.cc:1:
warning: webrtc-sys@0.3.7: In file included from ./include/livekit/rtc_error.h:19:
warning: webrtc-sys@0.3.7: In file included from /Users/baxter/baxdocs/rust_learn/zed/target/release/build/webrtc-sys-8cf4e81cad33241f/out/livekit/mac-arm64-release-webrtc-b99fd2c-6/mac-arm64-release/include/api/rtc_error.h:17:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/string:569:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__algorithm/remove.h:12:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__algorithm/find.h:13:
warning: webrtc-sys@0.3.7: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__algorithm/unwrap_iter.h:14:
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type<rust::Slice<const unsigned char>::iterator>'
warning: webrtc-sys@0.3.7: typedef typename __pointer_traits_element_type<pointer>::type element_type;
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:182:20: note: in instantiation of template class 'std::pointer_traits<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:195:59: note: during template argument deduction for class template partial specialization '_HasToAddress<_Pointer, decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer &>()))>' [with _Pointer = rust::Slice<const unsigned char>::iterator]
warning: webrtc-sys@0.3.7: static const bool value = _HasArrow<_Pointer>::value || _HasToAddress<_Pointer>::value;
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:195:59: note: in instantiation of template class 'std::_HasToAddress<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__type_traits/conjunction.h:27:32: note: in instantiation of template class 'std::_IsFancyPointer<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: __expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__type_traits/conjunction.h:38:39: note: while substituting explicitly-specified template arguments into function template '__and_helper'
warning: webrtc-sys@0.3.7: using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/pointer_traits.h:200:5: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
warning: webrtc-sys@0.3.7: _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__iterator/concepts.h:193:7: note: in instantiation of requirement here
warning: webrtc-sys@0.3.7: { _VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
warning: webrtc-sys@0.3.7: ^~~~~~~~~~~~~~~~~~~~~~
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__config:897:17: note: expanded from macro '_VSTD'
warning: webrtc-sys@0.3.7: # define _VSTD std
warning: webrtc-sys@0.3.7: ^
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__iterator/concepts.h:192:3: note: while substituting template arguments into constraint expression here
warning: webrtc-sys@0.3.7: requires(const _Ip& __i) {
warning: webrtc-sys@0.3.7: ^~~~~~~~~~~~~~~~~~~~~~~~~~
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__ranges/concepts.h:122:5: note: while checking the satisfaction of concept 'contiguous_iterator<rust::Slice<const unsigned char>::iterator>' requested here
warning: webrtc-sys@0.3.7: contiguous_iterator<iterator_t<_Tp>> &&
warning: webrtc-sys@0.3.7: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: webrtc-sys@0.3.7: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__ranges/concepts.h:122:5: note: while substituting template arguments into constraint expression here
macos 14.7.7
Xcode 14.2
cargo add webrtcDid not solve the problem.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license accept
Install:
Xcode 15.2, command line tools for Xcode 15.2
How Usable is the Rust Cranelift Backend Today
A Possible New Backend for Rust
https://blog.rust-lang.org/inside-rust/2020/11/15/Using-rust...
https://github.com/rust-lang/rust/blob/master/compiler/rustc_codegen_cranelift/Readme.md
rustup component add rustc-codegen-cranelift-preview --toolchain nightly
#cranelift forum
rustup component remove rustc-codegen-cranelift-preview --toolchain nightly
$ git clone https://github.com/rust-lang/rustc_codegen_cranelift
$ cd rustc_codegen_cranelift
$ ./y.sh build
People can now try the Cranelift backend using rustup and cargo:
$ rustup component add rustc-codegen-cranelift-preview --toolchain nightly
$ export CARGO_PROFILE_DEV_CODEGEN_BACKEND=cranelift
$ cargo +nightly build -Zcodegen-backend
Keyboard short cuts.
= = = = =
Fujiyoshida, Yamanashi prefecture, Japan
*Fuji Asada City “Hotspot” Drama Turns Mount Fuji Area into Tourist Attraction
dcaldwell at emacsforosx.com uses nix to manage packages for his build environment.
6nok.org
great refs:
sudo apt update
apt list --upgradable
sudo apt upgrade
sudo apt update && sudo apt upgrade
sudo apt autoclean && sudo apt autoremove
apt list --installed
apt search fastfetch
apt search gcc
apt search python
apt search python | grep installed
show dependencies of pkgname
apt show emacsen-common
apt-cache depends emacsen-common
Show pkgs that depend on pkgnameapt-cache rdepends --installed emacsen-common
history -w /dev/stdout | grep apt |sort |uniq >> apt_history.txt
sudo add-apt-repository ppa:fastfetch/stable
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
sudo apt install fastfetchsudo apt remove tlp
sudo nala search
dpkg --get-selections | grep -v deinstall | egrep "^myspell-|^hunspell-"
Build and run Redox OS macos m1
https://doc.redox-os.org/book/aarch64.html
https://gist.github.com/willnode/88da35d0c0542276b4631746d8fc3de1
https://apple.stackexchange.com/questions/198623/uninstall-all-programs-installed-by-homebrew
I usually just do: brew remove --force $(brew list --formula)
and
brew remove --cask --force $(brew list)
https://mac.install.guide/homebrew/4