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

Support remote types and remote containers #79

Open
aldanor opened this issue Oct 19, 2022 · 1 comment
Open

Support remote types and remote containers #79

aldanor opened this issue Oct 19, 2022 · 1 comment

Comments

@aldanor
Copy link

aldanor commented Oct 19, 2022

There are two separate problems, listing them here in case we decide to implement it later.

First, same as in this example in serde: https://serde.rs/remote-derive.html, would be nice to provide a way to set up remote derives for foreign types.

Another problem is with containers, and the main one is Vec. Would be nice if we could provide a way to use other vec-like types. This could look e.g. like this (note that it would sort-of cover #72):

use fancy_crate::FancyVec;
use std::collections::VecDeque;

#[derive(ArrowField)]
struct Foo {
    #[arrow(vec)]
    vec_custom: Vec<i32, MyAlloc>,
    #[arrow(vec(push = "push_back"))]
    deque: VecDeque<i32>,
    #[arrow(vec)]
    vec_remote: FancyVec<i32>,
}
@ncpenke
Copy link
Collaborator

ncpenke commented Oct 21, 2022

Remote types are a great idea. I wonder if we might be able to tackle Vecs in a different way by blanket implementations on Iterator and FromIterator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants