Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFCs to consider #11

Open
jonysy opened this issue Feb 5, 2017 · 0 comments
Open

RFCs to consider #11

jonysy opened this issue Feb 5, 2017 · 0 comments

Comments

@jonysy
Copy link
Owner

jonysy commented Feb 5, 2017

Extending coherence with workspaces proposal

If merged, the "extending coherence with workspaces" proposal would allow authors to implement traits for types defined within the workspace it's associated with.

Under the proposal, a separate impl for Backend in each framework-specific crate would be possible, allowing for a different synchronize method per framework.

Vague proposal: Extending coherence with workspaces:

Moreover, cargo features don't necessarily compose all that well: if I have for example one crate that needs Ethanol+Serde and one that wants Ethanol by itself, cargo won't necessarily figure out that it should take the union of the feature flags (it's also not obvious that this is the correct thing to do in the first place). All in all, doesn't feel (to me) like the right solution.

Proposals:

Example

// workspace-root/backends/cuda/src/framework.rs

use parenchyma::Backend;

impl Default for Backend<Cuda> {

    fn default() -> Self { .. }
}

Trait alias

Once [RFC#1733] is approved, use it in place of the current work around.

@jonysy jonysy changed the title Extending coherence with workspaces proposal RFCs to consider Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant