===== Rust ===== The %%FreeBSD%% Rust team takes care of [[https://www.rust-lang.org/|Rust Programming Language]] and Rust %%FreeBSD%% [[Ports]] and Packages. * [[https://www.freshports.org/lang/rust|lang/rust]] tracks Rust Stable and is updated every 6 weeks. It uses ''%%lang/rust-bootstrap%%'' to bootstrap. * [[https://www.freshports.org/lang/rust-nightly|lang/rust-nightly]] tracks Rust Nightly and is updated weekly. It uses prebuilt bootstraps provided by upstream, which are currently limited to ''%%amd64%%'' and ''%%i386%%'' architectures. * [[https://www.freshports.org/lang/rust-bootstrap|lang/rust-bootstrap]] creates cross-compiled bootstraps for all supported architectures which are later used to build ''%%lang/rust%%''. * Cargo integration is available in the ports framework via ''%%USES=cargo%%'' (Mk/Uses/cargo.mk) ===== Support ===== We currently maintain [[https://www.freshports.org/lang/rust|lang/rust]] for the following architecture and release combinations: * %%FreeBSD%% 11.4+ for i386, amd64, armv6 * %%FreeBSD%% 12.1+ additionally for: armv7, aarch64 (arm64) ((< 12.1 not supported due to a bug in rtld)), powerpc64 ELFv1 ((13.0 will use the new ELFv2 ABI)) * %%FreeBSD%% 13.0+ additionally for: powerpc64 Big Endian ELFv2, powerpc64 Little Endian ELFv2, riscv64 ((requires custom kernel with COMPAT_FREEBSD11)) ===== Rust in the FreeBSD Kernel ===== Johannes Lundberg((https://github.com/johalun)) created a [[https://github.com/johalun/rustkpi/tree/master/rust/kmod-rustkpi|RustKPI FreeBSD Kernel Module]]) and [[https://github.com/johalun/rustkpi/tree/master/rust/kmod-e1000|e1000 Rust FreeBSD Network Driver example]] and [[https://github.com/johalun/rustkpi/tree/master/rust/kmod-helloworld|Hello World Example]] as part of his Masters Thesis on [[https://github.com/johalun/rustkpi/blob/master/thesis.pdf|Safe Kernel Programming with Rust (2018, PDF)]]. Anatol Ulrich((https://github.com/spookyvision)) wrote a [[https://github.com/spookyvision/hello-freebsd-rust|Hello world FreeBSD kernel module in Rust]]. (github.com, 2021) In August 2022, David Young((https://github.com/sciguy16)) of NCCGroup posted a [[https://research.nccgroup.com/2022/08/31/writing-freebsd-kernel-modules-in-rust/|Writing FreeBSD Kernel Modules in Rust research article]] and accompanying [[https://github.com/nccgroup/freebsd-kernel-module-rust|BSD-Licensed code repository]], based on Johannes Lundberg's original work, updated to target Rust 2021. ===== Rust Team ===== * TobiasKortkamp * PiotrKubaj * MikaelUrankar ===== Contact ===== * Email: * Bug Reports & Feature Requests via [[https://bugs.freebsd.org|Bugzilla]]. [[https://bugs.freebsd.org/bugzilla/buglist.cgi?bug_status=New&bug_status=Open&bug_status=In%20Progress&email1=rust%40FreeBSD.org&emailtype1=exact&f1=assigned_to&f2=assigned_to&j_top=OR&list_id=39597&o1=equals&o2=equals&order=bug_status%2Cpriority%2Cbug_severity&product=Base%20System&product=Community&product=Documentation&product=Ports%20%26%20Packages&product=Services&query_based_on=&query_format=advanced&v1=rust%40FreeBSD.org&v2=freebsd-rust%40FreeBSD.org|Open Rust issues]] * Patches & Pull Requests via [[https://reviews.freebsd.org|Phabricator]] (add ''%%#rust%%'' as reviewer). ===== Links ===== * [[https://www.freshports.org/search.php?stype=depends_build&method=match&query=lang%2Frust&num=500&orderby=category&orderbyupdown=asc&search=Search&format=html&branch=head|Ports using lang/rust]] * [[https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/building.html#using-cargo|Porter's Handbook chapter on how to port Cargo based applications]] ---- {{tag>Ports}} {{tag>Team}}