Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/dioxus-adapter-anchor/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
CARGO_WORKSPACE_DIR = { value = "", relative = true }

[target.wasm32-unknown-unknown]
rustflags = ["--cfg", "getrandom_backend=\"wasm_js\""]
rustflags = ["--cfg", "getrandom_backend=\"wasm_js\""]
14 changes: 9 additions & 5 deletions templates/dioxus-adapter-anchor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.anchor
# Generated by Cargo
# will have compiled files and executables
/target
.DS_Store
target

# These are backup files generated by rustfmt
**/*.rs.bk
node_modules
test-ledger
.yarn

dist

node_modules/
7 changes: 4 additions & 3 deletions templates/dioxus-adapter-anchor/Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[toolchain]
package_manager = "yarn"

[features]
resolution = true
skip-lint = false

[programs.localnet]
{{project-name}}-program = "3rFzgYuL3EBragfJhc9ELMUQPeLvP4qApJyWpTBMuZ7g"
dx_test_anchor = "34SLPmeTBTYxRueSdYPaCRxfSGbTW9HKK4fCnXarw4aR"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
cluster = "localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "cargo test"
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 \"tests/**/*.ts\""
23 changes: 6 additions & 17 deletions templates/dioxus-adapter-anchor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
[workspace]
members = ["frontend", "programs/*"]
resolver = "2"

[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
overflow-checks = true

[profile.release.build-override]
opt-level = 3
codegen-units = 1
incremental = false

[profile.wasm-dev]
inherits = "dev"
opt-level = 1

[profile.server-dev]
inherits = "dev"

[profile.android-dev]
inherits = "dev"

[workspace]
members = ["frontend", "programs/*", "tests"]
resolver = "2"
codegen-units = 1
35 changes: 0 additions & 35 deletions templates/dioxus-adapter-anchor/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions templates/dioxus-adapter-anchor/frontend/.gitignore

This file was deleted.

25 changes: 17 additions & 8 deletions templates/dioxus-adapter-anchor/frontend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
[package]
name = "{{project-name}}"
version = "1.1.0"
version = "2.0.0"
authors = ["{{authors}}"]
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dioxus = { version = "0.6.2", features = ["router"] }
dioxus = { version = "0.7.1", features = ["router"] }

wallet-adapter = "1.2.2"
solana-sdk = "2.1.2"
bincode = "1.3.3"
wallet-adapter = "1.4.2"
bincode = "=1.3.3"
jzon = "0.12.5"
serde_json = "1.0.133"
serde = { version = "1.0.215", features = ["derive"] }
gloo-timers = "0.3.0"
solana-transaction-error = { version = "2.1.13", features = ["serde"] }
qrcodegen = "1.8.0"
percent-encoding = "2.3.1"
fastrand = "2.3.0"
partial-idl-parser = "1.2.0"
solana-transaction-error = { version = "3.0.0", default-features = false }
solana-transaction = { version = "4.0.0", features = ["serde"] }
solana-instruction = { version = "3.1.0", features = ["borsh"] }
solana-pubkey = { version = "4.1.0", features = ["borsh"] }
solana-hash = "4.2.0"
solana-system-interface = { version = "3.0.0", features = ["bincode"] }
anchor-lang-idl = { version = "0.1.2", features = ["convert"] }


[features]
default = ["web"]
web = ["dioxus/web"]
desktop = ["dioxus/desktop"]
mobile = ["dioxus/mobile"]
29 changes: 3 additions & 26 deletions templates/dioxus-adapter-anchor/frontend/Dioxus.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,17 @@
[application]

# App (Project) Name
name = "{{project-name}}"

# Dioxus App Default Platform
# web, desktop, fullstack
default_platform = "web"

# `build` & `serve` dist path
out_dir = "dist"

# resource (assets) file folder
asset_dir = "assets"

[web.app]

# HTML title tag content
title = "Rust Wallet Adapter"

[web.watcher]
index_on_404 = true

# when watcher trigger, regenerate the `index.html`
reload_html = true

# which files or dirs will be watcher monitoring
watch_path = ["src", "assets"]
title = "Rust Wallet Adapter for Solana"

# include `assets` in web platform
[web.resource]

# CSS style file

# Additional CSS style files
style = []

# Javascript code file
# Additional JavaScript files
script = []

[web.resource.dev]
Expand Down
10 changes: 10 additions & 0 deletions templates/dioxus-adapter-anchor/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Dioxus Template with Tailwind CSS

Start the Dioxus CLI
```sh
dx serve
```

- Open the browser at default port http://localhost:8080 or the port described by Dioxus CLI in case port `8080` was already in use

- Sometimes there are warning in the browser console, use `dx check` command to find if there are fixes that need to be done.

This file was deleted.

Loading
Loading