doc/wg/core/notes/core-notes-2022-03-18.md
Attendees:
rust-analyzerrust-analyzer? Is rust-analyzer the official option? I'm not
sure.rust-analyzer-preview which suggests that it is not yet
the official option, but I can see motivation for maintaining RLS drop over
time.rust-analyzer descriptors for
non-cargo projects? Can I run Clippy using the same config? That's what I
want.rust-analyzer on a non-cargo project.unsafe to regain the safety invariants
that Rust needs. Will hopefully have a commit out today.grant.rs
file, and the APIs are easier to use. That doesn't mean there isn't a
different way to achieve those same goals.KernelManagedLayout type that don't require
entering the grant before constructing it. For instance the subscribe, allow
RO, and alow RO functions that are called by the kernel, you don't have to
enter the grant to call those.unsafe to both enter the grant and call one of those
functions.Grant::enter from within the
kernel and call the grant subscribe method from that closure.grant.rs, not the
subscribe method on Upcall.usize to the ABI. It would only be for a pointer so it could be
architecture-independent. Would keep the property that each syscall returns
one success variant.usize for it to have a corollary on both ABIs.usize, it treats it as
the variant that is pointer-sized for this architecture. Handle it at API
level rather than ABI level.usize variant"?usize variant. Another workaround here -- and maybe it's not
possible because of the way the documentation is written -- but you could use
Subscribe to return a pointer, which already supports usize.usize for CommandReturn and other things is
that in the common case, Command is returning a value, not a pointer. If it's
a pointer-length value, then capsules or applications can't rely on the width
being something. It's harder to assume that e.g. the capsule will always
return something 32-bits, and know it won't be truncated by hardware. It's a
different enough use case that maybe it warrants a different system call API.
We want IPC and know IPC has reasonable use cases, and the existing IPC
mechanism sucks. We should probably treat IPC in a more specialized way than
glomming it onto the existing syscall API.libtock-rs code review, where a new
contributor read the console documentation and believed that console could
write less of the buffer than the process had asked it to. I.e. they
interpreted that if you pass a 5 byte buffer to the kernel and told the kernel
to write 5 bytes, it could write 2 bytes, and that is acceptable. That is now
how I read the console docs, but it wasn't explicitly written in the
documentation. I read the console source code to verify I read the docs
correctly, assuming it would always write the full 5 bytes, unless the process
told it to print fewer bytes. If the process passed a larger buffer and told
console to print a smaller number of bytes, I assumed console would write the
first bytes, but when I read console's source it prints the last bytes. I
changed the wording to clarify that the console will always write the number
of bytes you told it to write or the buffer size, whichever is smaller, which
is its current behavior. I also adjusted the console capsule so that it prints
the first bytes, rather than the last bytes, of the buffer. That is
technically a breaking change, sort of. If anybody ever depended on the
behavior of printing the last bytes, this change would break them. But the
documentation never said what it should do, and it's kind of a question of how
you read the documentation before whether this is a breaking change or a bug
fix (making console behave the way it was specified to).printlns basically, and as you're
suggesting it is difficult to imagine that anybody relied on that behavior.
Must of the people who have used Tock are on this call. While the community of
users is relatively small, take advantage of that and fix things that are
clearly bugs even if technically they are a breaking change to what some
theoretical user might have relied on.