auxoncorp / bounded-registers Goto Github PK
View Code? Open in Web Editor NEWUsing Type-Level Programming in Rust to Make Safer Hardware Abstractions
Home Page: https://blog.auxon.io/2019/10/25/type-level-registers/
License: MIT License
Using Type-Level Programming in Rust to Make Safer Hardware Abstractions
Home Page: https://blog.auxon.io/2019/10/25/type-level-registers/
License: MIT License
On recent toolchains we need to use #![feature(const_fn_trait_bound)]
-#![feature(const_fn)]
+#![feature(const_fn_trait_bound)]
Given the pseudo example:
mod A {
// Register decl &c...
// a field
mod FieldA {
// field definitions
}
}
mod B {
// Register decl &c...
// a field
mod FieldB {
// field definitions
}
}
There's nothing to prevent one from doing something like:
reg_a.modify(B::FieldB::Clear);
I believe this can be mitigated by generating a trait amongst the register definitions which is then used as a bound over that register's [RW|RO|WO]Register
implementations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.