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

Android compatibility #342

Open
Fritiofhedstrom opened this issue Aug 30, 2022 · 4 comments
Open

Android compatibility #342

Fritiofhedstrom opened this issue Aug 30, 2022 · 4 comments

Comments

@Fritiofhedstrom
Copy link

I'd like to use Bastion for my android project, but stumbled upon a problem.
When compiling with --target aarch64-linux-android then this code in src/placement.rs generates the stub only.

#[cfg(target_os = "linux")]
#[inline]
fn get_core_ids_helper() -> Option<Vec<CoreId>> {
    linux::get_core_ids()
}

What i would like is this:
#[cfg(any(target_os = "linux", target_os="android"))]
Not sure how many other places that are affected by this. There is a way to manually set the --cfg target_os in rustc, but it feels more cumbersome and not the correct way.

Is your feature request related to a problem? Please describe.
Please describe the problem you are trying to solve.

Describe the solution you'd like
Please describe the desired behavior.

Describe alternatives you've considered
Please describe alternative solutions or features you have considered.

@DAOCUONG
Copy link

i. have same problem with ios

@o0Ignition0o
Copy link
Contributor

Hmm I'd be happy to take a PR that adds ios support as well, i suppose the linux functions shall work, but it would need to be tested

@DAOCUONG
Copy link

Lets me test with ios and confirm

@DAOCUONG
Copy link

crash thread 'bastion-driver-dynamic' panicked at 'called Option::unwrap() on a None value', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/bastion-executor-0.4.2/src/load_balancer.rs:36:58
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread 'bastion-driver-dynamic' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-driver-dynamic' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-driver-static' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-driver-dynamic' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-driver-dynamic' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-driver-static' panicked at 'Lazy instance has previously been poisoned', /Users/dao/DAO MANH CUONG
.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-driver-dynamic' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-blocking-driver-standalone' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25
thread 'bastion-blocking-driver-standalone' panicked at 'Lazy instance has previously been poisoned', /Users/dao/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.15.0/src/lib.rs:1261:25

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

3 participants