{"id":15407169,"url":"https://github.com/ltfschoen/kobold-test","last_synced_at":"2026-04-09T09:37:23.392Z","repository":{"id":187115639,"uuid":"615103306","full_name":"ltfschoen/kobold-test","owner":"ltfschoen","description":"Basic website using rustlang","archived":false,"fork":false,"pushed_at":"2023-03-27T13:29:46.000Z","size":48,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T03:43:26.010Z","etag":null,"topics":["docker","kobold","rust","shell-script","trunk"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ltfschoen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-17T00:40:31.000Z","updated_at":"2023-03-20T13:06:08.000Z","dependencies_parsed_at":"2023-08-09T03:28:39.924Z","dependency_job_id":null,"html_url":"https://github.com/ltfschoen/kobold-test","commit_stats":null,"previous_names":["ltfschoen/kobold-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fkobold-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fkobold-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fkobold-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fkobold-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltfschoen","download_url":"https://codeload.github.com/ltfschoen/kobold-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245956321,"owners_count":20700079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","kobold","rust","shell-script","trunk"],"created_at":"2024-10-01T16:27:24.361Z","updated_at":"2025-12-30T23:21:25.522Z","avatar_url":"https://github.com/ltfschoen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kobold Test\n\nTesting the capabilities of Kobold library whilst learning Rust.\n\n### Initial Setup Log\n\n* Added example rust-toolchain.toml\n* Install Rust https://doc.rust-lang.org/cargo/getting-started/installation.html\n* Update Rust and Cargo\n    ```bash\n    rustup update\n    cargo update\n    ```\n* Switch to latest \"stable\" Rustup\n    ```bash\n    rustup override set stable-x86_64-unknown-linux-gnu\n    ```\n* Install Kobold dependencies https://github.com/maciejhirsz/kobold#more-examples\n    ```bash\n    rustup target add wasm32-unknown-unknown\n    ```\n* Switch to default [Rustup Profile](https://rust-lang.github.io/rustup/concepts/profiles.html)\n    ```bash\n    rustup set profile default\n    ```\n* Check Rustup Configuration\n    ```bash\n    rustup toolchain list\n    rustup show\n    ```\n* Add additional components\n    ```bash\n    rustup component add rustc cargo rustfmt rust-std rust-docs clippy miri rust-src llvm-tools-preview\n    ```\n* Created project\n```bash\ncargo new kobold-test --bin\ncargo add kobold\ntouch index.html\n```\n* Paste the following in index.html\n```bash\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eKobold Hello World example\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e\n```\n\n* Paste the following in ./src/main.rs\n```bash\nuse kobold::prelude::{component, html, Html};\n\n#[component]\nfn Hello(name: \u0026str) -\u003e impl Html + '_ {\n    html! {\n        \u003ch1\u003e\"Hello \"{ name }\"!\"\u003c/h1\u003e\n    }\n}\n\nfn main() {\n    kobold::start(html! {\n        \u003cHello name=\"Kobold\" /\u003e\n    });\n}\n```\n* Install [Trunk](https://trunkrs.dev/#getting-started)\n* Create Trunk.toml \u0026 Paste:\n```bash\n[tools]\nwasm_bindgen = \"0.2.84\"\n```\n* Build, watch and serve the Rust WASM web application and all its assets. Automatically opens in web browser.\n```bash\ntrunk serve --address=127.0.0.1 --open\n```\n    * Note: Replace with public IP address to access externally if firewall permissions allow\n\n### Docker\n\n* Runs server inside Docker container. Build artifacts dist/ and target/ are generated inside the Docker container with hot reloading.\n* Install and run [Docker](https://www.docker.com/)\n* Run in Docker container\n```bash\n./docker-dev.sh\n```\n* View website http://\u003cPUBLIC_IP_ADDRESS\u003e:8080\n\n* Kill Docker container\n```\ndocker stop kobold-test \u0026\u0026 docker rm -f kobold-test\n```\n\n### Troubleshooting\n\n* The following was used to test if all binaries and examples and packages specified could be installed.\n```bash\ncargo install --bins --examples --git=https://github.com/ltfschoen/kobold --branch=master --rev=2617dc3e4cff227d68e8a7ae883d8aa7cec6de6f kobold_counter_example kobold_csv_editor_example kobold_hello_world_example kobold_interval_example kobold_list_example kobold_qrcode_example kobold_stateful_example kobold_todomvc_example --verbose\n```\nHowever the Cargo.toml file was updated as follows instead so it would run without error when `trunk serve`\n```\n[dependencies]\n# https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations\nkobold = { version = \"0.5.0\", git = \"https://github.com/ltfschoen/kobold.git\", rev = \"d56e8f69d7678040c63d57e93f78d4c3aa35656d\" }\nkobold_macros = { version = \"0.5.0\", git = \"https://github.com/ltfschoen/kobold.git\", rev = \"d56e8f69d7678040c63d57e93f78d4c3aa35656d\" }\nkobold_qr = { version = \"0.5.0\", git = \"https://github.com/ltfschoen/kobold.git\", rev = \"d56e8f69d7678040c63d57e93f78d4c3aa35656d\" }\n```\n\n* rust-toolchain file\n    * It still isn't possible to install the toolchain and components specified in a rust-toolchain.toml file because. See\n        * https://github.com/rust-lang/rustup/issues/2686\n        * https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/action.yml#L11\n        * https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Fkobold-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltfschoen%2Fkobold-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Fkobold-test/lists"}