zaksabeast/CaptureSight

try to use cargo build-std instead

ca1e opened this issue · 2 comments

ca1e commented

no_std_io = { git = "https://github.com/zaksabeast/no_std_io.git", rev = "77499d6" }

Im very new to rust, but is it(no_std_io) as same as the cargo build-std?

If so, we can use cargo build-std instead since rust 1.58 released
see also: https://github.com/aarch64-switch-rs/nx/blob/master/.cargo/config.toml

Hey there! 👋 Thanks for your interest in CaptureSight.

no_std_io is a small library I wrote to work with data in no_std environments, but isn't related to project configuration.

The standard library has several smaller crates, including (but not limited to) core and std.

no_std tells the crate to link with core and not std. Core is dependency free and will be usable on any target rust can be compiled to. std includes code that is specific to the target. To my knowledge, no one has gotten std to work on the switch, which is one reason why switch projects use core.

build-std allows us to configure what goes into the standard library we use. The example you linked includes core, compiler_builtins, and alloc.

Capturesight uses build-std too! However CaptureSight should move it to .config/cargo.toml as well since that's the proper location.

ca1e commented

Thank you for your reply, I understand a little better now! Thanks for writing such a useful tool!(both no-std-io and CaptureSight)