iced_web icon indicating copy to clipboard operation
iced_web copied to clipboard

Update README to suggest using trunk to build for web

Open Person-93 opened this issue 3 years ago • 3 comments

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>

Person-93 avatar Dec 16 '21 17:12 Person-93

$ 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 avatar Jan 16 '22 11:01 ahcm

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

ahcm avatar Jan 16 '22 12:01 ahcm

images/ferris.png does not load.

ahcm avatar Jan 16 '22 12:01 ahcm