xous-core/imports
bunnie 320a8e2b32 prep a fork of riscv package
for now, publish a xous-riscv package, until we can absorb
this into the kernel directly.

Want to recode all the assembly files into inline-assembly now
that it is supported in Rust, but, let's not put that yak on
the list of yaks to shave before we have a separable kernel.
2022-09-27 17:23:25 +08:00
..
com_rs-ref add FLASH_VERIFY to COM command set. Add apilevel to com_rs. 2022-07-10 01:04:34 +08:00
getrandom re-bump xous-ipc to 0.9.9 2022-09-26 16:50:38 +08:00
riscv-0.5.6 prep a fork of riscv package 2022-09-27 17:23:25 +08:00
README.md Update README.md 2021-04-07 01:27:23 +08:00

Imports

Build Not Working: Why You're Most Likely Looking at This

If your build isn't working due to a failed import reference, it's probably because one of the xous-core developers accidentally checked in a reference to a local directory in one or more of the Cargo.toml files within this subdirectory.

Most likely, you can find the offending Cargo.toml file, and remove the local directory reference and replace it with the commented-out gitref. In the worst case, the developer failed to push up changes in the dependant crate, at which point you should open an issue to get that fixed.

#TIL: patch.crates-io

When we did this, we didn't know there was a thing such as [patch.crates-io] that allows for overrides in cargo paths. Probably this system should be refactored to use this, instead of the methodology outlined here.

Rationale

We depend upon some packages that aren't in crates.io yet, but are also not integrated into the xous-core repo. Reasons for this range from the preference of the package's originator, to local cross-project dependencies (such as the com-rs package, which is the API between the betrusted-ec firmware and xous-core) that don't make sense to publish as a crate.

These are instead hosted in a separate, standa-lone github repo. The methodology in this case is to refer to the git commit ref in the Cargo.toml for xous-core integration.

However, we have situations where multiple crates within xous-core need to refer to the same git commit ref, which leads to the opportunity for inconsistent versions between sub-crates within xous-core.

imports are simple packages that re-export the contents of a stand-alone package, allowing us a single location, common to all sub-crates within xous-core, to define a single git commit ref. For local development, the git commit ref is replaced with a local directory path.

The convention is to name the imported package based upon its root name and then add -ref to the end, and then to use import-ref as import to resolve the import into the correct name space.