Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Update README to suggest using trunk to build for web #1

Open
Person-93 opened this issue Dec 16, 2021 · 3 comments
Open

Update README to suggest using trunk to build for web #1

Person-93 opened this issue Dec 16, 2021 · 3 comments

Comments

@Person-93
Copy link

I used trunk to serve the tour package and had no issues. I just put this html file into the package root and ran trunk serve.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>Trunk of ice</title>
    <base data-trunk-public-url/>
</head>
<body>
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="tour"/>
</body>
</html>
@ahcm
Copy link

ahcm commented Jan 16, 2022

$ trunk serve
Jan 16 12:55:57.724 INFO 📦 starting build
Jan 16 12:55:57.725 INFO spawning asset pipelines
Jan 16 12:55:57.916 INFO building iced
error: no bin target named tour
Jan 16 12:55:58.031 ERROR ❌ error
error from HTML pipeline

Caused by:
0: error from asset pipeline
1: error during cargo build execution
2: cargo call returned a bad status
Jan 16 12:55:58.031 INFO 📡 serving static assets at -> /
Jan 16 12:55:58.032 INFO 📡 server listening at 0.0.0.0:8080

@ahcm
Copy link

ahcm commented Jan 16, 2022

Needs to be as index.html in examples/tour.
Then trunk serve there.

@ahcm
Copy link

ahcm commented Jan 16, 2022

images/ferris.png does not load.

@hecrj hecrj transferred this issue from iced-rs/iced Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants