Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-3 committed Aug 18, 2024
1 parent 21b144b commit fec766a
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 358 deletions.
39 changes: 36 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ leptos_meta = { version = "0.7.0-beta", git = "https://github.com/leptos-rs/lept

# Leptos extenstions and related
# leptos-use = { git = "https://github.com/Synphonyte/leptos-use.git", branch = "leptos-0.7" }
# codee = { version = "0.1", features = [
# "json_serde",
# "msgpack_serde",
# "base64",
# "prost",
# ] }
codee = { version = "0.1", features = [
"json_serde",
"msgpack_serde",
"base64",
"prost",
] }
# leptonic = { git = "https://github.com/lpotthast/leptonic.git", branch = "main" }
# thaw = { version = "0.4.0-alpha", git = "https://github.com/thaw-ui/thaw.git", branch = "thaw/fluent", features = [
# "csr",
Expand Down Expand Up @@ -82,6 +82,6 @@ tracing-subscriber = "0.3"
tracing-subscriber-wasm = "0.1"

# Local
keplr = { path = "../keplr" }
keplr = { path = "../keplr/keplr" }
rsecret = { path = "../secret-clients/rsecret" }
secretrs = { version = "0.1" }
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# secret-leptos

This is a Client-Side-Rendered App showing how it's possible to interact with
[Keplr](https://github.com/chainapsis/keplr-wallet) and
[secretjs](https://github.com/scrtlabs/secret.js) from WebAssembly,
[Keplr](https://github.com/chainapsis/keplr-wallet) and Secret from WebAssembly,
using the [Leptos](https://leptos.dev/) framework.

## Getting Started
Expand All @@ -13,9 +12,6 @@ If you don’t already have it installed, you can install Trunk by running
cargo install trunk
```

Using nightly Rust and the nightly feature in Leptos enables the function-call
syntax for signal getters and setters used in this example.

To use nightly Rust, you can run

```bash
Expand All @@ -32,17 +28,12 @@ rustup target add wasm32-unknown-unknown

## Tailwind

`trunk.toml` is configured to build the CSS automatically.

You can install Tailwind using `npm`:
Trunk handles the Tailwind build step. Include a line like this in your `index.html` head:

```bash
npm install -D tailwindcss
```html
<link data-trunk rel="tailwind-css" href="input.css" />
```

If you'd rather not use npm, you can install the Tailwind binary
[here](https://github.com/tailwindlabs/tailwindcss/releases).

## Developing

Start a development server at 127.0.0.1:8080:
Expand All @@ -59,7 +50,7 @@ trunk serve --open
To create a production version of your app:

```bash
trunk build --release
trunk build --release --public-url "https://kent-3.github.io/secret-leptos/"
```

`trunk build` will create a number of build artifacts in a `dist/` directory.
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use git2::Repository;
use serde::{Deserialize, Serialize};
use std::env;
use std::fs;
use std::path::{Path, PathBuf};
use std::path::PathBuf;

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
Expand Down
14 changes: 7 additions & 7 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />


<script type="module" nonce="OOgIen5NqHNXU6IIZ8z+Hw==">
import init, * as bindings from '/secret-leptos-e295311e8a062c41.js';
const wasm = await init('/secret-leptos-e295311e8a062c41_bg.wasm');
<script type="module" nonce="8rfV4ySTC3s7ySxpqnDJTA==">
import init, * as bindings from 'https://kent-3.github.io/secret-leptos/secret-leptos-c6a3ab524ea5d406.js';
const wasm = await init('https://kent-3.github.io/secret-leptos/secret-leptos-c6a3ab524ea5d406_bg.wasm');


window.wasmBindings = bindings;
Expand All @@ -17,8 +17,8 @@
dispatchEvent(new CustomEvent("TrunkApplicationStarted", {detail: {wasm}}));

</script>
<link rel="icon" href="/favicon-e9cbd8f50cc65bf2.ico" integrity="sha384&#x2D;YobgLXwtz0GhXVUTHml49p32guapVFlEG8UpQdDVN3kekOqkQi&#x2B;qSXEpwp&#x2B;yM4BW"/>
<link rel="stylesheet" href="/input-1e281e73305a75dd.css" integrity="sha384&#x2D;oetCHYGBfUNM84kyFcBMXGp8djsTF4YBWZK4mg1yjqBxJgfjTVf&#x2B;aqfZN7&#x2B;6Tzkf"/>
<link rel="icon" href="https://kent-3.github.io/secret-leptos/favicon-e9cbd8f50cc65bf2.ico" integrity="sha384&#x2D;YobgLXwtz0GhXVUTHml49p32guapVFlEG8UpQdDVN3kekOqkQi&#x2B;qSXEpwp&#x2B;yM4BW"/>
<link rel="stylesheet" href="https://kent-3.github.io/secret-leptos/input-1e281e73305a75dd.css" integrity="sha384&#x2D;oetCHYGBfUNM84kyFcBMXGp8djsTF4YBWZK4mg1yjqBxJgfjTVf&#x2B;aqfZN7&#x2B;6Tzkf"/>

<script>
function checkResourcesLoaded() {
Expand All @@ -39,8 +39,8 @@
});
</script>

<link rel="modulepreload" href="/secret-leptos-e295311e8a062c41.js" crossorigin=anonymous integrity="sha384-3NZd4ClDQ4zlOfI3913LMHmXUz3p2gsLRXeC9Ic/nIQ4qcZa8cMpmOjN7zNSZ7DR">
<link rel="preload" href="/secret-leptos-e295311e8a062c41_bg.wasm" crossorigin=anonymous integrity="sha384-JvTNVIvvaS9M3ToI3iKyBz6nZVLIhFHX0xCjwKLaXlsZ8SRbzVLxglzVR/vv3bul" as="fetch" type="application/wasm"></head>
<link rel="modulepreload" href="https://kent-3.github.io/secret-leptos/secret-leptos-c6a3ab524ea5d406.js" crossorigin=anonymous integrity="sha384-/7QjiLAm1h56CY95h1IZjhO8CMTzdDwa9McjgA0/rUXj61L0NWvyPLy341UZ82zu">
<link rel="preload" href="https://kent-3.github.io/secret-leptos/secret-leptos-c6a3ab524ea5d406_bg.wasm" crossorigin=anonymous integrity="sha384-LzlNHMUhY9F3mcHxOzmlvoc0LELwlXHUHYxRSSVL3QfGSdwIjGr2EJ81ZlRYr4Bx" as="fetch" type="application/wasm"></head>

<style>
.spinner {
Expand Down
Loading

0 comments on commit fec766a

Please sign in to comment.