Add forbid(unsafe) to every library crate that can currently support it #1355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just brute forcing this, there's almost certainly more cleanup that can be done to reduce unsafe code elsewhere. After this PR the following crates are the only ones that do not have
#![forbid(unsafe_code)]
or#![expect(unsafe_code)]
at the top level in their lib.rs file:flowey/flowey_core
openhcl/build_info
openhcl/diag_server
openhcl/lower_vtl_permissions_guard
openhcl/underhill_mem
openhcl/virt_mshv_vtl
openvmm/membacking
support/cache_topology
support/mesh/mesh_channel
support/mesh/mesh_channel_core
support/mesh/mesh_node
support/mesh/mesh_remote
support/mesh/mesh_worker
support/pal/pal_async
support/pal
support/sev_guest_device
support/tdx_guest_device
support/uevent
support/unix_socket
support/vmsocket
tmk/tmk_tests
vm/devices/get/get_protocol
vm/devices/net/net_consomme/consomme
vm/devices/net/net_tap
vm/devices/storage/block_crypto
vm/devices/support/fs/fuse
vm/devices/support/fs/lx
vm/devices/support/fs/lxutil
vm/devices/user_driver_emulated_mock
vm/devices/virtio/virtio
vm/devices/virtio/virtiofs
vm/page_pool_alloc
vm/vmgs/vmgs
vmm_core/virt