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

No available targets are compatible with triple #59

Closed
AbdulwahabAlbahrani opened this issue Sep 19, 2020 · 4 comments
Closed

No available targets are compatible with triple #59

AbdulwahabAlbahrani opened this issue Sep 19, 2020 · 4 comments

Comments

@AbdulwahabAlbahrani
Copy link

hello,
so I want to try this library to see if I can make apps with it.
but when I try the steps in https://github.com/carson-katri/swiftwebui-scripts, I get error when running the command (make), and I get the following error :
cd testingAppweUI &&
swift build --triple wasm32-unknown-wasi &&
cp .build/debug/testingAppweUI ../dist/SwiftWASM.wasm &&
wasm-strip ../dist/SwiftWASM.wasm &&
gzip ../dist/SwiftWASM.wasm --best
Fetching https://github.com/carson-katri/SwiftWebUI
Fetching https://github.com/MaxDesiatov/Runtime
Fetching https://github.com/kateinoigakukun/JavaScriptKit
Cloning https://github.com/kateinoigakukun/JavaScriptKit
Resolving https://github.com/kateinoigakukun/JavaScriptKit at 1edcf70
Cloning https://github.com/MaxDesiatov/Runtime
Resolving https://github.com/MaxDesiatov/Runtime at wasi-build
Cloning https://github.com/carson-katri/SwiftWebUI
Resolving https://github.com/carson-katri/SwiftWebUI at develop
error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasi"'
error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasi"'
1 error generated.
1 error generated.
[0/7] Compiling _CJavaScriptKit dummy.c
make: *** [build] Error 1

thank you for making this

@curveddesign
Copy link

curveddesign commented Sep 19, 2020

Oh, I think you are running the WASM version, this version is for the Web Server side, not to run it in the Browser itself.

For this version, the Makefile is for a kludge Docker container build? Are you trying to create a deployable docker container?

I just use Xcode 12. Create a MacOS Tool project. Import the Swift package. Then hit the Build button in Xcode.

Instructions are here - https://www.alwaysrightinstitute.com/swiftwebui/

@helje5
Copy link
Member

helje5 commented Sep 19, 2020

to see if I can make apps with it

No, you can't.

To repeat the very front page:

Disclaimer: This is a toy project! Do not use for production. Use it to learn more about SwiftUI and its inner workings

@helje5
Copy link
Member

helje5 commented Sep 19, 2020

If you are interested in Wasm, you might want to checkout this one: https://github.com/TokamakUI/Tokamak

@helje5 helje5 closed this as completed Sep 19, 2020
@AbdulwahabAlbahrani
Copy link
Author

AbdulwahabAlbahrani commented Sep 20, 2020

ok, thank you for your help. and thank you for suggesting Tokamak.

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