diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-01-28 17:25:02 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-01-28 17:25:02 +0100 |
commit | 843991895ea6bf6e7aaba7580e17f608f91964ae (patch) | |
tree | 98d5fc33fe0bc74a0fbe996439e7c5b419836d07 | |
parent | 2e400f4096cf98852cc6c376436c87d5db2b0100 (diff) | |
download | cometos-843991895ea6bf6e7aaba7580e17f608f91964ae.tar.gz cometos-843991895ea6bf6e7aaba7580e17f608f91964ae.tar.bz2 cometos-843991895ea6bf6e7aaba7580e17f608f91964ae.zip |
67 files changed, 799 insertions, 4336 deletions
diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..ff6c058 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,8 @@ +[build] +target = "aarch64-unknown-linux-musl" + +[target.x86_64-unknown-linux-musl] +linker = "x86_64-linux-musl-gcc" + +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-musl-gcc"
\ No newline at end of file diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index b781ff7..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[build] -target = ["x86_64-unknown-uefi", "aarch64-unknown-uefi"]
\ No newline at end of file @@ -1 +1,7 @@ +target +esp +debug + +# Added by cargo + /target diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/cutieos.iml b/.idea/cometos.iml index ec6116c..45d6bd3 100644 --- a/.idea/cutieos.iml +++ b/.idea/cometos.iml @@ -2,12 +2,11 @@ <module type="EMPTY_MODULE" version="4"> <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/commands/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/desktop/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/loader/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/statusbar/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/toolkit/src" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/userland/src" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/graphics/src" isTestSource="false" /> - <excludeFolder url="file://$MODULE_DIR$/esp" /> <excludeFolder url="file://$MODULE_DIR$/target" /> </content> <orderEntry type="inheritedJdk" /> diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 0000000..382d9b6 --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="PublishConfigData" autoUpload="Always" serverName="VM" createEmptyFolders="true" filePermissions="511" folderPermissions="511" confirmBeforeDeletion="false" autoUploadExternalChanges="true"> + <option name="confirmBeforeDeletion" value="false" /> + <serverData> + <paths name="VM"> + <serverdata> + <mappings> + <mapping deploy="/root" local="$PROJECT_DIR$/target/aarch64-unknown-linux-musl" web="/" /> + </mappings> + </serverdata> + </paths> + </serverData> + <option name="myAutoUpload" value="ALWAYS" /> + </component> +</project>
\ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 40155f0..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ -<component name="InspectionProjectProfileManager"> - <profile version="1.0"> - <option name="myName" value="Project Default" /> - <inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" /> - </profile> -</component>
\ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index daa2e99..2ac8ca1 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ <project version="4"> <component name="ProjectModuleManager"> <modules> - <module fileurl="file://$PROJECT_DIR$/.idea/cutieos.iml" filepath="$PROJECT_DIR$/.idea/cutieos.iml" /> + <module fileurl="file://$PROJECT_DIR$/.idea/cometos.iml" filepath="$PROJECT_DIR$/.idea/cometos.iml" /> </modules> </component> </project>
\ No newline at end of file diff --git a/.idea/sshConfigs.xml b/.idea/sshConfigs.xml new file mode 100644 index 0000000..6b6eac5 --- /dev/null +++ b/.idea/sshConfigs.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="SshConfigs"> + <configs> + <sshConfig host="192.168.64.12" id="40eed749-4639-4fff-be0f-761f95b77461" keyPath="$USER_HOME$/.ssh/id_rsa" port="22" nameFormat="DESCRIPTIVE" username="root" useOpenSSHConfig="true" /> + </configs> + </component> +</project>
\ No newline at end of file diff --git a/.idea/webServers.xml b/.idea/webServers.xml new file mode 100644 index 0000000..99f2801 --- /dev/null +++ b/.idea/webServers.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="WebServers"> + <option name="servers"> + <webServer id="eb146773-1100-4e3d-81f6-ed74bcbb033f" name="VM"> + <fileTransfer accessType="SFTP" host="192.168.64.12" port="22" sshConfigId="40eed749-4639-4fff-be0f-761f95b77461" sshConfig="root@192.168.64.12:22 key" keyPair="true"> + <advancedOptions> + <advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" /> + </advancedOptions> + </fileTransfer> + </webServer> + </option> + </component> +</project>
\ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..0436279 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="AutoImportSettings"> + <option name="autoReloadType" value="SELECTIVE" /> + </component> + <component name="CargoProjects"> + <cargoProject FILE="$PROJECT_DIR$/Cargo.toml" /> + </component> + <component name="ChangeListManager"> + <list default="true" id="43ab4b79-6bad-4d1a-9a98-152a35fb4296" name="Changes" comment=""> + <change afterPath="$PROJECT_DIR$/.cargo/config" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/desktop/Cargo.toml" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/desktop/src/main.rs" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/loader/Cargo.toml" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/loader/src/main.rs" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.cargo/config.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/cutieos.iml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/Cargo.lock" beforeDir="false" afterPath="$PROJECT_DIR$/Cargo.lock" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/Cargo.toml" beforeDir="false" afterPath="$PROJECT_DIR$/Cargo.toml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/build.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/Cargo.lock" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/Cargo.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/rust-toolchain.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/append.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/appendln.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/cat.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/cd.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/clear.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/cp.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/debug.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/lib.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/ls.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/mkdir.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/mv.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/parser.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/path.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/pwd.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/reboot.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/rm.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/rmdir.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/shutdown.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/touch.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/commands/src/ver.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/esp/efi/boot/bootaa64.efi" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/esp/efi/boot/bootx64.efi" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/esp/memtest64.efi" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/esp/test.lua" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/firmware/AAVMF_CODE.fd" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/firmware/AAVMF_VARS.fd" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/firmware/OVMF_CODE.fd" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/firmware/OVMF_VARS.fd" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/rust-toolchain.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/src/boot.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/src/main.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/src/panic.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/toolkit/Cargo.lock" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/toolkit/Cargo.toml" beforeDir="false" afterPath="$PROJECT_DIR$/toolkit/Cargo.toml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/toolkit/rust-toolchain.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/toolkit/src/error.rs" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/toolkit/src/lib.rs" beforeDir="false" afterPath="$PROJECT_DIR$/toolkit/src/lib.rs" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/userland/Cargo.lock" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/userland/Cargo.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/userland/rust-toolchain.toml" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/userland/src/lib.rs" beforeDir="false" /> + </list> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="Git.Settings"> + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> + </component> + <component name="MacroExpansionManager"> + <option name="directoryName" value="0fxvojib" /> + </component> + <component name="ProjectColorInfo"><![CDATA[{ + "customColor": "", + "associatedIndex": 2 +}]]></component> + <component name="ProjectId" id="2bZtBkeZ3fg6WGB03tNHoaloUO2" /> + <component name="ProjectLevelVcsManager"> + <ConfirmationsSetting value="2" id="Add" /> + </component> + <component name="ProjectViewState"> + <option name="hideEmptyMiddlePackages" value="true" /> + <option name="showLibraryContents" value="true" /> + </component> + <component name="PropertiesComponent"><![CDATA[{ + "keyToString": { + "ASKED_ADD_EXTERNAL_FILES": "true", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "git-widget-placeholder": "mane", + "last_opened_file_path": "/Volumes/Projects/cometos/statusbar/src", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", + "settings.editor.selected.configurable": "preferences.general", + "vue.rearranger.settings.migration": "true" + } +}]]></component> + <component name="RecentsManager"> + <key name="CopyFile.RECENT_KEYS"> + <recent name="$PROJECT_DIR$/statusbar/src" /> + <recent name="$PROJECT_DIR$/target/aarch64-unknown-linux-musl/debug" /> + </key> + </component> + <component name="RustProjectSettings"> + <option name="rustcTarget" value="aarch64-unknown-linux-musl" /> + <option name="toolchainHomeDirectory" value="$USER_HOME$/.cargo/bin" /> + </component> + <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="43ab4b79-6bad-4d1a-9a98-152a35fb4296" name="Changes" comment="" /> + <created>1706434295466</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1706434295466</updated> + <workItem from="1706434296866" duration="18124000" /> + </task> + <servers /> + </component> + <component name="TypeScriptGeneratedFilesManager"> + <option name="version" value="3" /> + </component> + <component name="VcsManagerConfiguration"> + <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> + </component> +</project>
\ No newline at end of file @@ -18,261 +18,216 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "bincode" -version = "1.3.3" +name = "az" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" +checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "bitflags" -version = "2.4.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "build-info" -version = "0.0.34" +name = "bitflags" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155eb070980e96aeb4ef3b8620b0febb2ae5e17451dc1b329681bdd4eb0a94e1" -dependencies = [ - "build-info-proc", -] +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] -name = "build-info-build" -version = "0.0.34" +name = "bumpalo" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69d6331ec579144d39e1c128f343d23e9b837617df1bed4ed032e141f83f06a" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "cargo_metadata", - "chrono", - "git2", - "glob", - "pretty_assertions", - "rustc_version", - "serde_json", - "zstd", -] +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] -name = "build-info-common" -version = "0.0.34" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209c0c2b13da7e5f7202e591b6d41b46c8f0e78d031dedf5cff71cc8c6ec773" -dependencies = [ - "chrono", - "derive_more", - "semver", - "serde", -] +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "build-info-proc" -version = "0.0.34" +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc1874cb1995691fb01f9bb56e75f9660d2614e74607fa71c08a8b3bd7e30e4" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "chrono", - "num-bigint", - "num-traits", - "proc-macro-error", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.39", - "zstd", + "libc", ] [[package]] -name = "bumpalo" -version = "3.14.0" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "camino" -version = "1.1.6" +name = "chrono" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ - "serde", + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.0", ] [[package]] -name = "cargo-platform" -version = "0.1.5" +name = "console" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "serde", + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", ] [[package]] -name = "cargo_metadata" -version = "0.18.1" +name = "core-foundation-sys" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] -name = "cc" -version = "1.0.83" +name = "crossterm" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "jobserver", + "bitflags 2.4.2", + "crossterm_winapi", "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", ] [[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" +name = "crossterm_winapi" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets", + "winapi", ] [[package]] -name = "cometos" -version = "0.1.0-DR.2" +name = "ctrlc" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b" dependencies = [ - "build-info", - "build-info-build", - "commands", - "toolkit", - "uefi", - "uefi-services", - "userland", + "nix", + "windows-sys 0.52.0", ] [[package]] -name = "commands" +name = "desktop" version = "0.1.0" dependencies = [ - "build-info", - "build-info-build", "toolkit", - "uefi", - "uefi-services", ] [[package]] -name = "convert_case" -version = "0.4.0" +name = "embedded-graphics" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "750082c65094fbcc4baf9ba31583ce9a8bb7f52cadfb96f6164b1bc7f922f32b" +dependencies = [ + "az", + "byteorder", + "embedded-graphics-core", + "float-cmp", + "micromath", +] [[package]] -name = "core-foundation-sys" -version = "0.8.4" +name = "embedded-graphics-core" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "b8b1239db5f3eeb7e33e35bd10bd014e7b2537b17e071f726a09351431337cfa" +dependencies = [ + "az", + "byteorder", +] [[package]] -name = "derive_more" -version = "0.99.17" +name = "embedded_graphics_framebuffer" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "dae7cf4e19eaa857b33238e186536ea20e2dacbd292f0e971ac23a764c6bd181" dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", + "embedded-graphics", + "framebuffer", ] [[package]] -name = "diff" -version = "0.1.13" +name = "encode_unicode" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] -name = "form_urlencoded" -version = "1.2.0" +name = "errno" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ - "percent-encoding", + "errno-dragonfly", + "libc", + "winapi", ] [[package]] -name = "git2" -version = "0.18.1" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "bitflags", + "cc", "libc", - "libgit2-sys", - "log", - "url", ] [[package]] -name = "glob" +name = "float-cmp" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +dependencies = [ + "num-traits", +] + +[[package]] +name = "framebuffer" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "878caaaf1bb92c9f707dc6eef90933e07e913dac4bb8e11e145eaabaa94ef149" +dependencies = [ + "errno", + "libc", + "memmap", +] [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -292,94 +247,100 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.4.0" +name = "js-sys" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "wasm-bindgen", ] [[package]] -name = "itoa" -version = "1.0.9" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "jobserver" -version = "0.1.27" +name = "libc" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ + "bitflags 2.4.2", "libc", + "redox_syscall", ] [[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +name = "loader" +version = "0.1.0" dependencies = [ - "wasm-bindgen", + "ctrlc", + "embedded-graphics", + "embedded_graphics_framebuffer", + "framebuffer", ] [[package]] -name = "libc" -version = "0.2.150" +name = "lock_api" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] [[package]] -name = "libgit2-sys" -version = "0.16.1+1.7.1" +name = "log" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "libz-sys" -version = "1.1.12" +name = "memmap" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" dependencies = [ - "cc", "libc", - "pkg-config", - "vcpkg", + "winapi", ] [[package]] -name = "log" -version = "0.4.20" +name = "micromath" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "bc4010833aea396656c2f91ee704d51a6f1329ec2ab56ffd00bfd56f7481ea94" [[package]] -name = "num-bigint" -version = "0.4.4" +name = "mio" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "libc", + "log", + "wasi", + "windows-sys 0.48.0", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "nix" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "autocfg", - "num-traits", + "bitflags 2.4.2", + "cfg-if", + "libc", ] [[package]] @@ -392,166 +353,120 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "percent-encoding" -version = "2.3.0" +name = "numtoa" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" [[package]] -name = "pkg-config" -version = "0.3.27" +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "pretty_assertions" -version = "1.4.0" +name = "parking_lot" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "diff", - "yansi", + "lock_api", + "parking_lot_core", ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "parking_lot_core" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] -name = "ptr_meta" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcada80daa06c42ed5f48c9a043865edea5dc44cbf9ac009fda3b89526e28607" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9224df2e20e7c5548aeb5f110a0f3b77ef05f8585139b7148b59056168ed2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] [[package]] -name = "rustc_version" -version = "0.4.0" +name = "redox_syscall" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "semver", + "bitflags 1.3.2", ] [[package]] -name = "ryu" -version = "1.0.15" +name = "redox_termios" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb" [[package]] -name = "semver" -version = "1.0.20" +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "serde" -version = "1.0.193" +name = "signal-hook" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ - "serde_derive", + "libc", + "signal-hook-registry", ] [[package]] -name = "serde_derive" -version = "1.0.193" +name = "signal-hook-mio" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", + "libc", + "mio", + "signal-hook", ] [[package]] -name = "serde_json" -version = "1.0.108" +name = "signal-hook-registry" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ - "itoa", - "ryu", - "serde", + "libc", ] [[package]] -name = "syn" -version = "1.0.109" +name = "smallvec" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "syn" -version = "2.0.39" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -559,252 +474,193 @@ dependencies = [ ] [[package]] -name = "thiserror" -version = "1.0.50" +name = "termion" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "417813675a504dfbbf21bfde32c03e5bf9f2413999962b479023c02848c1c7a5" dependencies = [ - "thiserror-impl", + "libc", + "libredox", + "numtoa", + "redox_termios", ] [[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +name = "toolkit" +version = "0.1.0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", + "chrono", + "console", + "crossterm", + "ctrlc", + "embedded-graphics", + "embedded_graphics_framebuffer", + "framebuffer", + "termion", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "tinyvec_macros" -version = "0.1.1" +name = "unicode-width" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] -name = "toolkit" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "uefi", - "uefi-services", -] - -[[package]] -name = "ucs2" -version = "0.3.2" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" -dependencies = [ - "bit_field", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "uefi" -version = "0.26.0" +name = "wasm-bindgen" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ead9f748a4646479b850add36b527113a80e80a7e0f44d7b0334291850dcc5" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ - "bitflags", - "log", - "ptr_meta", - "ucs2", - "uefi-macros", - "uefi-raw", - "uguid", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "uefi-macros" -version = "0.13.0" +name = "wasm-bindgen-backend" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a7b1c2c808c3db854a54d5215e3f7e7aaf5dcfbce095598cba6af29895695d" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ + "bumpalo", + "log", + "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn", + "wasm-bindgen-shared", ] [[package]] -name = "uefi-raw" -version = "0.5.0" +name = "wasm-bindgen-macro" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ac69eadd877bfb34e7814be1928122ed0057d9f975169a56ee496aa7bdfd7" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ - "bitflags", - "ptr_meta", - "uguid", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "uefi-services" -version = "0.23.0" +name = "wasm-bindgen-macro-support" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79fcb420624743c895bad0f9480fbc2f64e7c8d8611fb1ada6bdd799942feb4" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ - "cfg-if", - "log", - "uefi", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "uguid" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef516f0806c5f61da6aa95125d0eb2d91cc95b2df426c06bde8be657282aee5" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "wasm-bindgen-shared" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] -name = "url" -version = "2.4.1" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "userland" -version = "0.1.0" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "build-info", - "build-info-build", - "commands", - "toolkit", - "uefi", - "uefi-services", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "vcpkg" -version = "0.2.15" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] -name = "version_check" -version = "0.9.4" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "wasm-bindgen" -version = "0.2.88" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "windows-targets 0.52.0", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", + "windows-targets 0.48.5", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "windows-targets 0.52.0", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "windows-core" -version = "0.51.1" +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows-targets", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] -name = "windows-targets" +name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -813,66 +669,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] -name = "windows_x86_64_gnullvm" +name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +name = "windows_x86_64_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] -name = "yansi" -version = "0.5.1" +name = "windows_x86_64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] -name = "zstd" -version = "0.12.4" +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe", -] +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] -name = "zstd-safe" -version = "6.0.6" +name = "windows_x86_64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", -] +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +name = "windows_x86_64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" @@ -1,19 +1,3 @@ [workspace] - -[package] -name = "cometos" -version = "0.1.0-DR.2" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -uefi = { version = "0.26.0", features = ["alloc"] } -uefi-services = { version = "0.23.0", features = [], default-features = false } -build-info = { version = "0.0.34", features = [], default-features = false } -userland = { path = "userland" } -toolkit = { path = "toolkit" } -commands = { path = "commands" } - -[build-dependencies] -build-info-build = "0.0.34"
\ No newline at end of file +resolver = "2" +members = [ "desktop", "loader", "toolkit"] diff --git a/build.rs b/build.rs deleted file mode 100644 index 6ed4499..0000000 --- a/build.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![no_std] - -fn main() { - build_info_build::build_script(); -}
\ No newline at end of file diff --git a/commands/.DS_Store b/commands/.DS_Store Binary files differdeleted file mode 100644 index eb07ed4..0000000 --- a/commands/.DS_Store +++ /dev/null diff --git a/commands/Cargo.lock b/commands/Cargo.lock deleted file mode 100644 index 1c6dd5b..0000000 --- a/commands/Cargo.lock +++ /dev/null @@ -1,868 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "build-info" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155eb070980e96aeb4ef3b8620b0febb2ae5e17451dc1b329681bdd4eb0a94e1" -dependencies = [ - "build-info-proc", -] - -[[package]] -name = "build-info-build" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69d6331ec579144d39e1c128f343d23e9b837617df1bed4ed032e141f83f06a" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "cargo_metadata", - "chrono", - "git2", - "glob", - "pretty_assertions", - "rustc_version", - "serde_json", - "zstd", -] - -[[package]] -name = "build-info-common" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209c0c2b13da7e5f7202e591b6d41b46c8f0e78d031dedf5cff71cc8c6ec773" -dependencies = [ - "chrono", - "derive_more", - "semver", - "serde", -] - -[[package]] -name = "build-info-proc" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc1874cb1995691fb01f9bb56e75f9660d2614e74607fa71c08a8b3bd7e30e4" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "chrono", - "num-bigint", - "num-traits", - "proc-macro-error", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.39", - "zstd", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cometos" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "toolkit", - "uefi", - "uefi-services", - "userland", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "git2" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" -dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "iana-time-zone" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libgit2-sys" -version = "0.16.1+1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libz-sys" -version = "1.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "ptr_meta" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcada80daa06c42ed5f48c9a043865edea5dc44cbf9ac009fda3b89526e28607" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9224df2e20e7c5548aeb5f110a0f3b77ef05f8585139b7148b59056168ed2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toolkit" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "uefi", - "uefi-services", -] - -[[package]] -name = "ucs2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" -dependencies = [ - "bit_field", -] - -[[package]] -name = "uefi" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ead9f748a4646479b850add36b527113a80e80a7e0f44d7b0334291850dcc5" -dependencies = [ - "bitflags", - "log", - "ptr_meta", - "ucs2", - "uefi-macros", - "uefi-raw", - "uguid", -] - -[[package]] -name = "uefi-macros" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a7b1c2c808c3db854a54d5215e3f7e7aaf5dcfbce095598cba6af29895695d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "uefi-raw" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ac69eadd877bfb34e7814be1928122ed0057d9f975169a56ee496aa7bdfd7" -dependencies = [ - "bitflags", - "ptr_meta", - "uguid", -] - -[[package]] -name = "uefi-services" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79fcb420624743c895bad0f9480fbc2f64e7c8d8611fb1ada6bdd799942feb4" -dependencies = [ - "cfg-if", - "log", - "uefi", -] - -[[package]] -name = "uguid" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef516f0806c5f61da6aa95125d0eb2d91cc95b2df426c06bde8be657282aee5" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "userland" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "toolkit", - "uefi", - "uefi-services", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasm-bindgen" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "zstd" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "6.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/commands/Cargo.toml b/commands/Cargo.toml deleted file mode 100644 index 476f3e5..0000000 --- a/commands/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "commands" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -uefi = { version = "0.26.0", features = ["alloc"] } -uefi-services = { version = "0.23.0", features = [], default-features = false } -build-info = { version = "0.0.34", features = [], default-features = false } -toolkit = { path = "../toolkit" } - -[build-dependencies] -build-info-build = "0.0.34" diff --git a/commands/rust-toolchain.toml b/commands/rust-toolchain.toml deleted file mode 100644 index e756ee7..0000000 --- a/commands/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"] diff --git a/commands/src/append.rs b/commands/src/append.rs deleted file mode 100644 index 1297d6d..0000000 --- a/commands/src/append.rs +++ /dev/null @@ -1,22 +0,0 @@ -use alloc::format; -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 2 { - let path = tk.resolve_path(&command.names[0]); - match tk.read_file(&path) { - None => { - display_error(tk, Error::E13); - } - Some(str) => { - tk.write_file(&path, &format!("{}{}", str, &command.names[1])); - } - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/appendln.rs b/commands/src/appendln.rs deleted file mode 100644 index 171c0d3..0000000 --- a/commands/src/appendln.rs +++ /dev/null @@ -1,22 +0,0 @@ -use alloc::format; -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 2 { - let path = tk.resolve_path(&command.names[0]); - match tk.read_file(&path) { - None => { - display_error(tk, Error::E13); - } - Some(str) => { - tk.write_file(&path, &format!("{}\n{}", str, &command.names[1])); - } - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/cat.rs b/commands/src/cat.rs deleted file mode 100644 index 17d31b8..0000000 --- a/commands/src/cat.rs +++ /dev/null @@ -1,30 +0,0 @@ -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - - if tk.file_exists(&path) { - if tk.is_file(&path) { - match tk.read_file(&path) { - None => { - display_error(tk, Error::E13); - } - Some(str) => { - tk.println(&str.replace('\n', "\r\n").replace("\r\r\n", "\r\n")); - } - } - } else { - display_error(tk, Error::E12); - } - } else { - display_error(tk, Error::E04); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/cd.rs b/commands/src/cd.rs deleted file mode 100644 index efcd174..0000000 --- a/commands/src/cd.rs +++ /dev/null @@ -1,23 +0,0 @@ -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - - if tk.file_exists(&path) { - if tk.is_dir(&path) { - tk.chdir(&path); - } else { - display_error(tk, Error::E09); - } - } else { - display_error(tk, Error::E04); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/clear.rs b/commands/src/clear.rs deleted file mode 100644 index 88c152d..0000000 --- a/commands/src/clear.rs +++ /dev/null @@ -1,6 +0,0 @@ -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, _command: Command) { - tk.clear(); -}
\ No newline at end of file diff --git a/commands/src/cp.rs b/commands/src/cp.rs deleted file mode 100644 index f8362ee..0000000 --- a/commands/src/cp.rs +++ /dev/null @@ -1,34 +0,0 @@ -use alloc::vec::Vec; -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 2 { - let path1 = tk.resolve_path(&command.names[0]); - let path2 = tk.resolve_path(&command.names[1]); - let path2_copy = path2.clone(); - - let parts = path2_copy.split("\\").collect::<Vec<&str>>(); - let len = parts.len() - 1; - let path_dir = parts[..len].join("\\"); - - if tk.file_exists(&path1) { - if tk.file_exists(&path_dir) { - if tk.is_file(&path1) { - tk.copy_file(&path1, &path2); - } else { - display_error(tk, Error::E12); - } - } else { - display_error(tk, Error::E04); - } - } else { - display_error(tk, Error::E04); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 2 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/debug.rs b/commands/src/debug.rs deleted file mode 100644 index ed80d90..0000000 --- a/commands/src/debug.rs +++ /dev/null @@ -1,13 +0,0 @@ -use alloc::string::String; -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, _command: Command) { - if tk.globals.contains_key("debug") && tk.globals.get("debug").unwrap() == "1" { - tk.globals.insert(String::from("debug"), String::from("0")); - tk.println("Shell debugging is now OFF.\r\n"); - } else { - tk.globals.insert(String::from("debug"), String::from("1")); - tk.println("Shell debugging is now ON.\r\n"); - } -}
\ No newline at end of file diff --git a/commands/src/lib.rs b/commands/src/lib.rs deleted file mode 100644 index fbaa7b2..0000000 --- a/commands/src/lib.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![no_std] - -extern crate alloc; - -pub mod ver; -pub mod pwd; -pub mod ls; -pub mod shutdown; -pub mod reboot; -pub mod cd; -pub mod parser; -pub mod debug; -pub mod mkdir; -pub mod rmdir; -pub mod path; -pub mod cat; -pub mod append; -pub mod clear; -pub mod appendln; -pub mod rm; -pub mod touch; -pub mod mv; -pub mod cp;
\ No newline at end of file diff --git a/commands/src/ls.rs b/commands/src/ls.rs deleted file mode 100644 index 1252255..0000000 --- a/commands/src/ls.rs +++ /dev/null @@ -1,95 +0,0 @@ -use alloc::format; -use alloc::string::{String, ToString}; -use uefi::proto::console::text::Color; -use uefi::proto::media::file::FileAttribute; -use toolkit::error::{display_error, Error}; -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - let path = tk.get_cwd().replace('/', "\\"); - - match command.names.len() { - 1 => { - tk.resolve_path(&command.names[0]); - }, - x if x > 1 => { - display_error(tk, Error::E08); - }, - _ => {} - } - - let result = tk.scandir(&path.to_string()); - tk.color(Color::Cyan, Color::Black); - tk.print("\nAttrib"); - tk.color(Color::Yellow, Color::Black); - tk.print(" │ "); - tk.color(Color::Cyan, Color::Black); - tk.print("File name"); - tk.color(Color::Yellow, Color::Black); - tk.print(" │ "); - tk.color(Color::Cyan, Color::Black); - tk.print("Size"); - tk.color(Color::Yellow, Color::Black); - tk.print(" │ "); - tk.color(Color::Cyan, Color::Black); - tk.print("Bytes\r\n"); - tk.color(Color::Yellow, Color::Black); - tk.println("───────┼──────────────────────────────┼──────────┼──────────"); - tk.color(Color::LightGray, Color::Black); - - for i in result { - let item = i.unwrap(); - let attr = item.attribute(); - - tk.print(&format!("{}{}{}{}{}", - if attr.contains(FileAttribute::DIRECTORY) { - "D" - } else { - "-" - }, - if attr.contains(FileAttribute::ARCHIVE) { - "A" - } else { - "-" - }, - if attr.contains(FileAttribute::HIDDEN) { - "H" - } else { - "-" - }, - if attr.contains(FileAttribute::SYSTEM) { - "S" - } else { - "-" - }, - if attr.contains(FileAttribute::READ_ONLY) { - "R" - } else { - "-" - } - )); - - let mut s = item.file_name().to_string(); - if s.len() > 30 { - s = String::from(&s[0..30]); - } - tk.color(Color::Yellow, Color::Black); - tk.print(" │ "); - tk.color(Color::LightGray, Color::Black); - tk.print(&format!("{}{}", s, " ".repeat(29 - s.len()))); - - tk.color(Color::Yellow, Color::Black); - tk.print("│ "); - tk.color(Color::LightGray, Color::Black); - let size = tk.make_readable(item.file_size()); - tk.print(&format!("{}{}", " ".repeat(8 - size.len()), size)); - tk.color(Color::Yellow, Color::Black); - tk.print(" │ "); - tk.color(Color::LightGray, Color::Black); - tk.print(&format!("{}", item.file_size())); - tk.print("\r\n"); - } - - tk.println(""); -}
\ No newline at end of file diff --git a/commands/src/mkdir.rs b/commands/src/mkdir.rs deleted file mode 100644 index 8fe3383..0000000 --- a/commands/src/mkdir.rs +++ /dev/null @@ -1,19 +0,0 @@ -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - - if !tk.file_exists(&path) { - tk.mkdir(&path); - } else { - display_error(tk, Error::E10); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/mv.rs b/commands/src/mv.rs deleted file mode 100644 index db83722..0000000 --- a/commands/src/mv.rs +++ /dev/null @@ -1,34 +0,0 @@ -use alloc::vec::Vec; -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 2 { - let path1 = tk.resolve_path(&command.names[0]); - let path2 = tk.resolve_path(&command.names[1]); - let path2_copy = path2.clone(); - - let parts = path2_copy.split("\\").collect::<Vec<&str>>(); - let len = parts.len() - 1; - let path_dir = parts[..len].join("\\"); - - if tk.file_exists(&path1) { - if tk.file_exists(&path_dir) { - if tk.is_file(&path1) { - tk.rename(&path1, &path2); - } else { - display_error(tk, Error::E12); - } - } else { - display_error(tk, Error::E04); - } - } else { - display_error(tk, Error::E04); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 2 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/parser.rs b/commands/src/parser.rs deleted file mode 100644 index 5227c27..0000000 --- a/commands/src/parser.rs +++ /dev/null @@ -1,102 +0,0 @@ -use alloc::collections::BTreeMap; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; - -#[derive(Debug)] -pub struct Command { - pub command: String, - pub args: BTreeMap<String, CommandArgument>, - pub names: Vec<String> -} - -#[derive(Debug)] -pub enum CommandArgument { - Anonymous, - Value(String) -} - -#[derive(Debug)] -pub enum CommandError { - ExecutablePathNotFound, - MismatchedQuotes -} - -impl Command { - #[allow(clippy::manual_strip)] pub fn build(input: &str) -> Result<Self, CommandError> { - let mut in_double_quotes = false; - let mut in_single_quotes = false; - let mut escaping = false; - - let input = input.trim(); - let input_split = input.split(|char| match char { - '"' if !in_single_quotes && !escaping => { - in_double_quotes = !in_double_quotes; - false - } - '\'' if !in_double_quotes && !escaping => { - in_single_quotes = !in_single_quotes; - false - } - '\\' if !escaping => { - escaping = true; - false - }, - ' ' => !in_double_quotes && !in_single_quotes, - _ => { - escaping = false; - false - }, - }); - - let mut parsed = input_split.map(|split| { - match split.chars().next().unwrap() { - '\'' | '"' => { - let end = split.len() - 1; - split[1..end].replace("\\n", "\n").replace("\\t", "\t").replace("\\r", "\r").replace('\\', "") - } - _ => split.replace("\\n", "\n").replace("\\t", "\t").replace("\\r", "\r").replace('\\', "") - } - }); - let command = parsed.next().ok_or(CommandError::ExecutablePathNotFound)?; - let args: Vec<String> = parsed.collect(); - - if in_double_quotes || in_single_quotes { - return Err(CommandError::MismatchedQuotes); - } - - let mut command_args: BTreeMap<String, CommandArgument> = BTreeMap::new(); - let mut names: Vec<String> = Vec::new(); - - for arg in args.iter() { - if arg.starts_with("--") { - if arg.contains('=') { - let parts: Vec<&str> = arg.split('=').collect(); - let mut value: &str = parts[1]; - - if value.starts_with('"') || value.starts_with('\'') { - let len = value.len() - 1; - value = &value[1..len]; - } - - command_args.insert(parts[0][2..].parse().unwrap(), CommandArgument::Value(String::from(value))); - } else { - command_args.insert(arg[2..].parse().unwrap(), CommandArgument::Anonymous); - } - } else if arg.starts_with('-') { - let chars: String = arg[1..].parse().unwrap(); - - for i in chars.chars() { - command_args.insert(i.to_string(), CommandArgument::Anonymous); - } - } else { - names.push(arg.parse().unwrap()); - } - } - - Ok(Command { - command, - args: command_args, - names - }) - } -}
\ No newline at end of file diff --git a/commands/src/path.rs b/commands/src/path.rs deleted file mode 100644 index e7c77e5..0000000 --- a/commands/src/path.rs +++ /dev/null @@ -1,14 +0,0 @@ -use alloc::format; -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - tk.println(&format!("{}\n", tk.resolve_path(&command.names[0]))); - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/pwd.rs b/commands/src/pwd.rs deleted file mode 100644 index 2a56129..0000000 --- a/commands/src/pwd.rs +++ /dev/null @@ -1,9 +0,0 @@ -use alloc::string::ToString; -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, _command: Command) { - let cwd = tk.get_cwd().to_string(); - tk.println(&cwd); - tk.println(""); -}
\ No newline at end of file diff --git a/commands/src/reboot.rs b/commands/src/reboot.rs deleted file mode 100644 index 317d9d2..0000000 --- a/commands/src/reboot.rs +++ /dev/null @@ -1,7 +0,0 @@ -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, _command: Command) { - tk.clear(); - tk.poweroff(true); -}
\ No newline at end of file diff --git a/commands/src/rm.rs b/commands/src/rm.rs deleted file mode 100644 index 54ffa49..0000000 --- a/commands/src/rm.rs +++ /dev/null @@ -1,23 +0,0 @@ -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - - if tk.file_exists(&path) { - if !tk.is_dir(&path) { - tk.unlink(&path); - } else { - display_error(tk, Error::E12); - } - } else { - display_error(tk, Error::E04); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/rmdir.rs b/commands/src/rmdir.rs deleted file mode 100644 index 3777755..0000000 --- a/commands/src/rmdir.rs +++ /dev/null @@ -1,31 +0,0 @@ -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - - if tk.file_exists(&path) { - if tk.is_dir(&path) { - if tk.scandir(&path).count() == 2 || command.args.contains_key("r") || command.args.contains_key("recursive") { - if command.args.contains_key("r") || command.args.contains_key("recursive") { - tk.recursive_rmdir(&path); - } else { - tk.rmdir(&path); - } - } else { - display_error(tk, Error::E11); - } - } else { - display_error(tk, Error::E09); - } - } else { - display_error(tk, Error::E04); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/shutdown.rs b/commands/src/shutdown.rs deleted file mode 100644 index 969aa25..0000000 --- a/commands/src/shutdown.rs +++ /dev/null @@ -1,7 +0,0 @@ -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, _command: Command) { - tk.clear(); - tk.poweroff(false); -}
\ No newline at end of file diff --git a/commands/src/touch.rs b/commands/src/touch.rs deleted file mode 100644 index 04ef811..0000000 --- a/commands/src/touch.rs +++ /dev/null @@ -1,32 +0,0 @@ -use alloc::string::String; -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - let mut original = String::from(""); - - if tk.file_exists(&path) { - if !tk.is_dir(&path) { - match tk.read_file(&path) { - None => { - display_error(tk, Error::E13); - } - Some(str) => { - original = str; - } - } - } else { - display_error(tk, Error::E12); - } - } - - tk.write_file(&path, &original); - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file diff --git a/commands/src/ver.rs b/commands/src/ver.rs deleted file mode 100644 index c798c08..0000000 --- a/commands/src/ver.rs +++ /dev/null @@ -1,32 +0,0 @@ -use uefi::proto::console::text::Color; -use toolkit::Toolkit; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, _command: Command) { - tk.color(Color::Cyan, Color::Black); - tk.print("\r\n OS name: "); - tk.color(Color::LightGray, Color::Black); - tk.print("CometOS"); - - tk.color(Color::Cyan, Color::Black); - tk.print("\r\n OS version: "); - tk.color(Color::LightGray, Color::Black); - tk.print(tk.version.version); - - tk.color(Color::Cyan, Color::Black); - tk.print("\r\n Build timestamp: "); - tk.color(Color::LightGray, Color::Black); - tk.print(tk.version.timestamp); - - tk.color(Color::Cyan, Color::Black); - tk.print("\r\n Build compiler: "); - tk.color(Color::LightGray, Color::Black); - tk.print(tk.version.compiler); - - tk.color(Color::Cyan, Color::Black); - tk.print("\r\nCompiler profile: "); - tk.color(Color::LightGray, Color::Black); - tk.print(tk.version.profile); - - tk.println("\r\n"); -}
\ No newline at end of file diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml new file mode 100644 index 0000000..f0edb9b --- /dev/null +++ b/desktop/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "desktop" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +toolkit = { path = "../toolkit" }
\ No newline at end of file diff --git a/desktop/src/main.rs b/desktop/src/main.rs new file mode 100644 index 0000000..815d561 --- /dev/null +++ b/desktop/src/main.rs @@ -0,0 +1,15 @@ +use toolkit::{GraphicalApp, MenuItem}; + +fn main() { + let mut app = GraphicalApp::new("Desktop"); + + app.initialize_graphics(|app| { + app.menu(vec![ + MenuItem::new("Lorem"), + MenuItem::new("ipsum"), + MenuItem::new("dolor"), + MenuItem::new("sit"), + MenuItem::new("amet") + ], "This is a test menu!"); + }); +}
\ No newline at end of file diff --git a/esp/.DS_Store b/esp/.DS_Store Binary files differdeleted file mode 100644 index a89cb11..0000000 --- a/esp/.DS_Store +++ /dev/null diff --git a/esp/efi/.DS_Store b/esp/efi/.DS_Store Binary files differdeleted file mode 100644 index bef48ab..0000000 --- a/esp/efi/.DS_Store +++ /dev/null diff --git a/esp/efi/boot/bootaa64.efi b/esp/efi/boot/bootaa64.efi Binary files differdeleted file mode 100755 index a99e2fb..0000000 --- a/esp/efi/boot/bootaa64.efi +++ /dev/null diff --git a/esp/efi/boot/bootx64.efi b/esp/efi/boot/bootx64.efi Binary files differdeleted file mode 100755 index fec4cbd..0000000 --- a/esp/efi/boot/bootx64.efi +++ /dev/null diff --git a/esp/memtest64.efi b/esp/memtest64.efi Binary files differdeleted file mode 100755 index db2cab6..0000000 --- a/esp/memtest64.efi +++ /dev/null diff --git a/esp/test.lua b/esp/test.lua deleted file mode 100644 index 442659b..0000000 --- a/esp/test.lua +++ /dev/null @@ -1 +0,0 @@ -print("Hello world!")
\ No newline at end of file diff --git a/firmware/AAVMF_CODE.fd b/firmware/AAVMF_CODE.fd Binary files differdeleted file mode 100644 index 9e23642..0000000 --- a/firmware/AAVMF_CODE.fd +++ /dev/null diff --git a/firmware/AAVMF_VARS.fd b/firmware/AAVMF_VARS.fd Binary files differdeleted file mode 100644 index 51c513d..0000000 --- a/firmware/AAVMF_VARS.fd +++ /dev/null diff --git a/firmware/OVMF_CODE.fd b/firmware/OVMF_CODE.fd Binary files differdeleted file mode 100644 index 1c3d46f..0000000 --- a/firmware/OVMF_CODE.fd +++ /dev/null diff --git a/firmware/OVMF_VARS.fd b/firmware/OVMF_VARS.fd Binary files differdeleted file mode 100644 index efb4f46..0000000 --- a/firmware/OVMF_VARS.fd +++ /dev/null diff --git a/loader/Cargo.toml b/loader/Cargo.toml new file mode 100644 index 0000000..ceb2655 --- /dev/null +++ b/loader/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "loader" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +framebuffer = "0.3.1" +embedded-graphics = "0.7.1" +embedded_graphics_framebuffer = "0.1.1" +ctrlc = "3.4.2"
\ No newline at end of file diff --git a/loader/src/main.rs b/loader/src/main.rs new file mode 100644 index 0000000..9ac920b --- /dev/null +++ b/loader/src/main.rs @@ -0,0 +1,38 @@ +use embedded_graphics_framebuffer::FrameBufferDisplay; +use embedded_graphics::{ + pixelcolor::{Rgb888, RgbColor}, + prelude::*, + primitives::{Circle, PrimitiveStyle}, +}; +use std::io; +use embedded_graphics::mono_font::ascii::FONT_10X20; +use embedded_graphics::mono_font::MonoTextStyle; +use embedded_graphics::text::Text; +use framebuffer::{Framebuffer, KdMode}; +use ctrlc; + +fn int_handler() { + return; +} + +fn main() { + Framebuffer::set_kd_mode(KdMode::Graphics).unwrap(); + + ctrlc::set_handler(int_handler) + .expect("Error setting Ctrl-C handler"); + + let mut display = FrameBufferDisplay::new(); + Circle::new(Point::new(((display.size().width / 2) - (96 / 2)) as i32, ((display.size().height / 2) - (96 / 2)) as i32), 96) + .into_styled(PrimitiveStyle::with_stroke(Rgb888::WHITE, 1)) + .draw(&mut display).expect("Failed to draw"); + + let style = MonoTextStyle::new(&FONT_10X20, Rgb888::WHITE); + + let text = "Starting up..."; + Text::new(text, Point::new(((display.size().width / 2) - (((text.len() as u32) * 10) / 2)) as i32, (display.size().height - 64) as i32), style).draw(&mut display).expect("Failed to draw"); + + display.flush().unwrap(); + + io::stdin().read_line(&mut String::new()).unwrap(); + Framebuffer::set_kd_mode(KdMode::Text).unwrap(); +}
\ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index e756ee7..0000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"] diff --git a/src/boot.rs b/src/boot.rs deleted file mode 100644 index c263b8e..0000000 --- a/src/boot.rs +++ /dev/null @@ -1,13 +0,0 @@ -use userland::run_shell; -use toolkit::Toolkit; - -pub fn start_boot(mut tk: Toolkit) { - tk.disable_watchdog(); - - if !tk.file_exists("CometOS") { - tk.mkdir("CometOS"); - } - tk.chdir("CometOS"); - - run_shell(tk); -}
\ No newline at end of file diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index f60d6be..0000000 --- a/src/main.rs +++ /dev/null @@ -1,46 +0,0 @@ -#![no_main] -#![no_std] - -mod panic; -mod boot; - -extern crate alloc; - -use alloc::format; -use uefi::prelude::*; -use uefi::proto::console::text::Color; -use toolkit::*; -use crate::boot::start_boot; -use crate::panic::init_panic; - -#[entry] -fn main(_image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status { - let version = ToolkitVersionInfo { - version: build_info::format!("{}", $.crate_info.version), - timestamp: build_info::format!("{}", $.timestamp), - compiler: build_info::format!("{}", $.compiler), - profile: build_info::format!("{}/{}", $.profile, $.target) - }; - - unsafe { init_panic(system_table.unsafe_clone()); } - uefi_services::init(&mut system_table).unwrap(); - let mut tk = Toolkit::new(system_table, version); - - tk.clear(); - tk.color(Color::Cyan, Color::Black); - tk.println(&format!("CometOS {} ({})", tk.version.version, tk.version.timestamp, )); - tk.println(&format!("{}, {}", tk.version.compiler, tk.version.profile)); - - let uefi = tk.uefi_version(); - let vendor = tk.uefi_vendor(); - let revision = tk.uefi_revision(); - let arch = tk.uefi_arch(); - tk.println(&format!("UEFI {} ({}, rev. {}), {}", uefi, vendor, revision, arch)); - - tk.color(Color::LightGray, Color::Black); - tk.println(""); - tk.set_cursor(true); - - start_boot(tk); - Status::SUCCESS -} diff --git a/src/panic.rs b/src/panic.rs deleted file mode 100644 index 646205b..0000000 --- a/src/panic.rs +++ /dev/null @@ -1,34 +0,0 @@ -use alloc::string::{String, ToString}; -use alloc::{format, vec}; -use core::panic::PanicInfo; -use uefi::CStr16; -use uefi::prelude::{Boot, SystemTable}; - -static mut SYSTEM_TABLE: Option<SystemTable<Boot>> = None; - -pub fn init_panic(system_table: SystemTable<Boot>) { - unsafe { - SYSTEM_TABLE = Option::from(system_table.unsafe_clone()); - } - - #[panic_handler] - unsafe fn panic(info: &PanicInfo) -> ! { - match SYSTEM_TABLE.as_ref() { - None => {} - Some(system_table_ref) => { - let mut system_table = system_table_ref.unsafe_clone(); - let stdout = system_table.stdout(); - - let mut str = String::from("\r\n\r\n--------------------------------------------\r\nKERNEL PANIC!\r\n\r\n"); - str += &info.to_string().replace('\n', "\r\n"); - str += "\r\n\r\n"; - str += &format!("CometOS {} ({}, {})", build_info::format!("{}", $.crate_info.version), build_info::format!("{}", $.timestamp), build_info::format!("{}", $.compiler)); - str += "\r\n--------------------------------------------\r\n"; - - let mut buf = vec![0; str.len() + 1]; - stdout.output_string(CStr16::from_str_with_buf(&str, &mut buf).expect("Failed to format text")).expect("Failed to print"); - } - } - loop {} - } -}
\ No newline at end of file diff --git a/toolkit/.DS_Store b/toolkit/.DS_Store Binary files differindex 47b464b..967c478 100644 --- a/toolkit/.DS_Store +++ b/toolkit/.DS_Store diff --git a/toolkit/Cargo.lock b/toolkit/Cargo.lock deleted file mode 100644 index 1c6dd5b..0000000 --- a/toolkit/Cargo.lock +++ /dev/null @@ -1,868 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "build-info" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155eb070980e96aeb4ef3b8620b0febb2ae5e17451dc1b329681bdd4eb0a94e1" -dependencies = [ - "build-info-proc", -] - -[[package]] -name = "build-info-build" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69d6331ec579144d39e1c128f343d23e9b837617df1bed4ed032e141f83f06a" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "cargo_metadata", - "chrono", - "git2", - "glob", - "pretty_assertions", - "rustc_version", - "serde_json", - "zstd", -] - -[[package]] -name = "build-info-common" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209c0c2b13da7e5f7202e591b6d41b46c8f0e78d031dedf5cff71cc8c6ec773" -dependencies = [ - "chrono", - "derive_more", - "semver", - "serde", -] - -[[package]] -name = "build-info-proc" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc1874cb1995691fb01f9bb56e75f9660d2614e74607fa71c08a8b3bd7e30e4" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "chrono", - "num-bigint", - "num-traits", - "proc-macro-error", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.39", - "zstd", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cometos" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "toolkit", - "uefi", - "uefi-services", - "userland", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "git2" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" -dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "iana-time-zone" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libgit2-sys" -version = "0.16.1+1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libz-sys" -version = "1.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "ptr_meta" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcada80daa06c42ed5f48c9a043865edea5dc44cbf9ac009fda3b89526e28607" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9224df2e20e7c5548aeb5f110a0f3b77ef05f8585139b7148b59056168ed2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toolkit" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "uefi", - "uefi-services", -] - -[[package]] -name = "ucs2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" -dependencies = [ - "bit_field", -] - -[[package]] -name = "uefi" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ead9f748a4646479b850add36b527113a80e80a7e0f44d7b0334291850dcc5" -dependencies = [ - "bitflags", - "log", - "ptr_meta", - "ucs2", - "uefi-macros", - "uefi-raw", - "uguid", -] - -[[package]] -name = "uefi-macros" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a7b1c2c808c3db854a54d5215e3f7e7aaf5dcfbce095598cba6af29895695d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "uefi-raw" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ac69eadd877bfb34e7814be1928122ed0057d9f975169a56ee496aa7bdfd7" -dependencies = [ - "bitflags", - "ptr_meta", - "uguid", -] - -[[package]] -name = "uefi-services" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79fcb420624743c895bad0f9480fbc2f64e7c8d8611fb1ada6bdd799942feb4" -dependencies = [ - "cfg-if", - "log", - "uefi", -] - -[[package]] -name = "uguid" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef516f0806c5f61da6aa95125d0eb2d91cc95b2df426c06bde8be657282aee5" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "userland" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "toolkit", - "uefi", - "uefi-services", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasm-bindgen" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "zstd" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "6.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/toolkit/Cargo.toml b/toolkit/Cargo.toml index 216ed08..c7417a6 100644 --- a/toolkit/Cargo.toml +++ b/toolkit/Cargo.toml @@ -6,9 +6,11 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -uefi = { version = "0.26.0", features = ["alloc"] } -uefi-services = { version = "0.23.0", features = [], default-features = false } -build-info = { version = "0.0.34", features = [], default-features = false } - -[build-dependencies] -build-info-build = "0.0.34" +framebuffer = "0.3.1" +embedded-graphics = "0.7.1" +embedded_graphics_framebuffer = "0.1.1" +ctrlc = "3.4.2" +chrono = "0.4.33" +termion = "3.0.0" +console = "0.15.8" +crossterm = "0.27.0"
\ No newline at end of file diff --git a/toolkit/rust-toolchain.toml b/toolkit/rust-toolchain.toml deleted file mode 100644 index e756ee7..0000000 --- a/toolkit/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"] diff --git a/toolkit/src/error.rs b/toolkit/src/error.rs deleted file mode 100644 index f609d06..0000000 --- a/toolkit/src/error.rs +++ /dev/null @@ -1,55 +0,0 @@ -use alloc::format; -use uefi::proto::console::text::Color; -use crate::Toolkit; - -#[derive(Copy, Clone)] -pub enum Error { - E01, - E02, - E03, - E04, - E05, - E06, - E07, - E08, - E09, - E10, - E11, - E12, - E13, - E14 -} - -impl Error { - fn description(&self) -> &str { - match self { - Error::E01 => "An internal undocumented system error has occurred.", - Error::E02 => "The requested command could not be found.", - Error::E03 => "Too few arguments were provided to this command.", - Error::E04 => "The requested file or directory could not be found.", - Error::E05 => "Unable to go up one level from the root directory.", - Error::E06 => "No command name could be found in the input.", - Error::E07 => "Unexpected end of line: quotes do not match.", - Error::E08 => "Too many arguments were provided to this command.", - Error::E09 => "The requested file is not a directory.", - Error::E10 => "The requested file already exists.", - Error::E11 => "The directory to affect is not empty.", - Error::E12 => "The requested file is a directory.", - Error::E13 => "An I/O error occurred while reading the file.", - Error::E14 => "The requested program cannot be run on this platform." - //_ => "Unknown error." - } - } - - fn code (&self) -> u32 { - (*self as u32) + 1 - } -} - -pub fn display_error(tk: &mut Toolkit, error: Error) { - tk.color(Color::Black, Color::Red); - tk.print(&format!("Error {}:", error.code())); - tk.color(Color::LightRed, Color::Black); - tk.println(&format!(" {}", error.description())); - tk.println(""); -}
\ No newline at end of file diff --git a/toolkit/src/lib.rs b/toolkit/src/lib.rs index a282c37..e1f9c33 100644 --- a/toolkit/src/lib.rs +++ b/toolkit/src/lib.rs @@ -1,357 +1,196 @@ -#![no_std] - -extern crate alloc; - -use alloc::string::{String, ToString}; -use alloc::{format, vec}; -use alloc::collections::BTreeMap; -use alloc::vec::Vec; -use uefi::{Char16, CStr16}; -use uefi::prelude::*; -use uefi::fs::{Path, UefiDirectoryIter}; -use uefi::proto::console::text::{Color, Key, ScanCode}; -use uefi::fs::FileSystem; -use uefi::table::runtime::ResetType; -use crate::error::{display_error, Error}; - -pub mod error; - -pub static mut CPU_ARCHITECTURE: &str = "unknown"; - -pub struct ToolkitWorkingPath { - name: String -} - -pub struct ToolkitVersionInfo { - pub version: &'static str, - pub timestamp: &'static str, - pub compiler: &'static str, - pub profile: &'static str -} - -pub struct Toolkit { - system_table: SystemTable<Boot>, - pub current_directory: ToolkitWorkingPath, - pub version: ToolkitVersionInfo, - pub globals: BTreeMap<String, String> +use std::time::Duration; +use embedded_graphics_framebuffer::FrameBufferDisplay; +use embedded_graphics::{ + pixelcolor::{Rgb888, RgbColor}, + prelude::*, +}; +use framebuffer::{Framebuffer, KdMode}; +use embedded_graphics::mono_font::ascii::FONT_10X20; +use embedded_graphics::mono_font::MonoTextStyle; +use embedded_graphics::primitives::{PrimitiveStyleBuilder, Rectangle}; +use embedded_graphics::text::Text; +use chrono::Local; +use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers, poll, read}; + +pub struct GraphicalApp { + list_enabled: bool, + list_items: Vec<MenuItem>, + list_max_length: u32, + list_focused_item: u32, + list_name: String, + app_name: String, + display: FrameBufferDisplay } -impl Toolkit { - pub fn new(system_table: SystemTable<Boot>, version: ToolkitVersionInfo) -> Self { - unsafe { - CPU_ARCHITECTURE = "unknown"; - - #[cfg(target_arch = "x86_64")] { - CPU_ARCHITECTURE = "x86_64"; - } - - #[cfg(target_arch = "aarch64")] { - CPU_ARCHITECTURE = "aarch64"; +impl GraphicalApp { + pub fn new(app_name: &str) -> GraphicalApp { + let display = FrameBufferDisplay::new(); + + GraphicalApp { + list_enabled: false, + list_items: vec![], + list_max_length: 0, + list_name: String::new(), + list_focused_item: 0, + app_name: String::from(app_name), + display + } + } + + fn update_display(&mut self) { + let mut display: &mut FrameBufferDisplay = &mut self.display; + display.clear(RgbColor::WHITE).expect("Failed to clear the screen"); + + Rectangle::new(Point::new(-1, -1), Size::new(display.size().width + 2, 26)) + .into_styled(PrimitiveStyleBuilder::new() + .fill_color(Rgb888::CSS_DARK_GRAY) + .stroke_width(1) + .stroke_color(Rgb888::BLACK) + .build()) + .draw(display).expect("Failed to draw"); + + let date = Local::now(); + let string = date.format("%h %e %H:%M").to_string(); + let text = string.as_str(); + Text::new(text, Point::new((display.size().width - text.len() as u32 * 10u32 - 20) as i32, 18), MonoTextStyle::new(&FONT_10X20, Rgb888::BLACK)).draw(display) + .expect("Failed to draw"); + + Text::new(&self.app_name, Point::new(20, 18), MonoTextStyle::new(&FONT_10X20, Rgb888::BLACK)).draw(display) + .expect("Failed to draw"); + + if self.list_enabled { + Text::new(&self.list_name, Point::new(50, 70), MonoTextStyle::new(&FONT_10X20, Rgb888::BLACK)).draw(display) + .expect("Failed to draw"); + + for (i, item) in (&self.list_items).iter().enumerate() { + if i == self.list_focused_item as usize { + Rectangle::new(Point::new(40, (90 + (i * 20)) as i32), Size::new(self.list_max_length * 10 + 20, 20)) + .into_styled(PrimitiveStyleBuilder::new() + .fill_color(Rgb888::CSS_NAVY) + .build()) + .draw(display).expect("Failed to draw"); + + item.show(&mut display, i, Rgb888::WHITE); + } else { + item.show(&mut display, i, Rgb888::new(90, 90, 90)); + } } } - Self { - system_table, - current_directory: ToolkitWorkingPath { - name: String::from("") - }, - version, - globals: BTreeMap::new() - } - } -} - -impl Toolkit { - fn get_fs(&self) -> FileSystem { - let handle = self.system_table.boot_services().image_handle(); - let fs = self.system_table.boot_services().get_image_file_system(handle).expect("Failed to start up filesystem"); - FileSystem::new(fs) - } - - pub fn color(&mut self, fg: Color, bg: Color) { - self.system_table.stdout().set_color(fg, bg).expect("Failed to set screen color"); + display.flush().unwrap(); } - pub fn prompt(&mut self) -> String { - let mut out: String = String::from(""); - let mut chars: u32 = 0; - - loop { - let mut events = [self.system_table.stdin().wait_for_key_event().unwrap()]; - self.system_table.boot_services() - .wait_for_event(&mut events) - .discard_errdata().expect("Failed to discard errors"); + pub fn initialize_graphics<F: FnOnce(&mut GraphicalApp)>(&mut self, after_init: F) { + Framebuffer::set_kd_mode(KdMode::Graphics).unwrap(); + crossterm::terminal::enable_raw_mode().expect("Failed to configure keyboard"); - let ret = Char16::try_from('\r').unwrap(); - let bks = Char16::try_from('\x08').unwrap(); - let ctc = Char16::try_from('\u{3}').unwrap(); - let ctl = Char16::try_from('\u{c}').unwrap(); - match self.system_table.stdin().read_key().expect("Failed to read key") { - Some(Key::Printable(key)) if key == ret => { - self.print("\r\n"); - return out; - } + let mut first_updated = false; + let date = Local::now(); + let mut time = date.format("%h %e %H:%M").to_string(); - Some(Key::Printable(key)) if key == bks => { - if chars > 0 { - chars -= 1; - out = String::from(&out[..out.len() - 1]); - self.print("\x08"); - } - } + after_init(self); - Some(Key::Printable(key)) if key == ctc => { - self.print("\r\n"); - return String::from(""); - } + 'main_loop: loop { + let mut update = false || !first_updated; - Some(Key::Printable(key)) if key == ctl => { - self.print("\r\n"); - self.clear(); - return String::from(""); - } + let date = Local::now(); + let new_time = date.format("%h %e %H:%M").to_string(); - Some(Key::Printable(key)) => { - chars += 1; - out += &key.to_string(); - self.print(&key.to_string()); - } + if time != new_time { + update = true; + let date = Local::now(); + time = date.format("%h %e %H:%M").to_string(); + } - Some(Key::Special(ScanCode::ESCAPE)) => { - panic!("Pressed Escape") + if poll(Duration::from_millis(100)).unwrap() { + match read().unwrap() { + Event::Key(event) => { + match event { + KeyEvent { + code: KeyCode::Char('c'), + modifiers: KeyModifiers::CONTROL, + .. + } => { + Framebuffer::set_kd_mode(KdMode::Text).unwrap(); + crossterm::terminal::disable_raw_mode().expect("Failed to unconfigure keyboard"); + break 'main_loop; + }, + KeyEvent { + code: KeyCode::Up, + .. + } => { + if self.list_enabled { + if self.list_focused_item > 0 { + self.list_focused_item -= 1 + } else { + self.list_focused_item = (self.list_items.len() - 1) as u32; + } + } + + update = true; + }, + KeyEvent { + code: KeyCode::Down, + .. + } => { + if self.list_enabled { + if self.list_focused_item + 1 < self.list_items.len() as u32 { + self.list_focused_item += 1 + } else { + self.list_focused_item = 0; + } + } + + update = true; + }, + _ => { + update = true; + } + } + }, + _ => { + update = true; + } } - - _ => {} } - } - } - - pub fn clear(&mut self) { - let stdout = self.system_table.stdout(); - stdout.reset(false).expect("Failed to clear screen buffer"); - } - - pub fn get_cwd(&self) -> &str { - &self.current_directory.name - } - - pub fn chdir(&mut self, dir: &str) { - if dir == "." { - return; - } - - if !self.file_exists(dir) { - panic!("Attempted to change the working directory to a non-existent directory"); - } - - self.current_directory.name = format!("/{}", dir).replace('\\', "/"); - } - - pub fn uefi_version(&mut self) -> String { - self.system_table.uefi_revision().to_string() - } - - pub fn uefi_vendor(&mut self) -> String { - self.system_table.firmware_vendor().to_string() - } - - pub fn uefi_revision(&mut self) -> u32 { - self.system_table.firmware_revision() - } - - pub fn uefi_arch(&mut self) -> String { - unsafe { - CPU_ARCHITECTURE.to_string() - } - } - - pub fn set_cursor(&mut self, state: bool) { - let stdout = self.system_table.stdout(); - stdout.enable_cursor(state).expect("Failed to change cursor state"); - } - - pub fn poweroff(&mut self, reboot: bool) { - self.system_table.runtime_services().reset(if reboot { - ResetType::COLD - } else { - ResetType::SHUTDOWN - }, Status::SUCCESS, None); - } - - pub fn disable_watchdog(&self) { - self.system_table.boot_services().set_watchdog_timer(0, 65536, None).expect("Failed to disable the watchdog"); - } - - pub fn file_exists(&self, path: &str) -> bool { - if path.is_empty() { - return true; - } - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - return filesystem.try_exists(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())).unwrap_or(false); - } - - pub fn rename(&mut self, old: &str, new: &str) { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; old.len() + 1]; - let mut buf2: Vec<u16> = vec![0; new.len() + 1]; - filesystem.rename(Path::new(&CStr16::from_str_with_buf(old, &mut buf).unwrap()), Path::new(&CStr16::from_str_with_buf(new, &mut buf2).unwrap())).expect("Failed to move"); - } - - pub fn copy_file(&mut self, old: &str, new: &str) { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; old.len() + 1]; - let mut buf2: Vec<u16> = vec![0; new.len() + 1]; - filesystem.copy(Path::new(&CStr16::from_str_with_buf(old, &mut buf).unwrap()), Path::new(&CStr16::from_str_with_buf(new, &mut buf2).unwrap())).expect("Failed to move"); - } - - pub fn is_dir(&self, path: &str) -> bool { - if path.is_empty() { - return true; - } - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - return match filesystem.metadata(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())) { - Ok(b) => b.is_directory(), - Err(_) => false - }; - } - - pub fn is_file(&self, path: &str) -> bool { - if path.is_empty() { - return true; - } - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - return match filesystem.metadata(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())) { - Ok(b) => b.is_regular_file(), - Err(_) => false - }; - } - - pub fn read_file(&self, path: &str) -> Option<String> { - if path.is_empty() { - return None; - } - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - return match filesystem.read_to_string(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())) { - Ok(b) => Some(b), - Err(_) => None - }; - } - pub fn write_file(&self, path: &str, text: &str) { - if path.is_empty() { - return; - } - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - filesystem.write(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap()), text.as_bytes()).unwrap(); - } - - pub fn scandir(&self, path: &str) -> UefiDirectoryIter { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - return match filesystem.read_dir(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())) { - Ok(b) => b, - Err(_) => panic!("Failed to scan directory {}", path) - }; - } - - pub fn execute_file(&mut self, path: &str) { - if path.ends_with(".co") { - match self.read_file(&path) { - None => { - display_error(self, Error::E13); - } - Some(data) => { - self.println(&data.replace("\\r", "\\n").replace("\\n", "\\r\\n")); - } + if update { + first_updated = true; + self.update_display(); } - } else { - display_error(self, Error::E14); } } - pub fn resolve_path(&self, orig_og_path: &str) -> String { - let og_path = orig_og_path.replace('\\', "/"); - let mut final_path = self.get_cwd().to_string().replace('/', "\\"); - let path = &og_path.replace('/', "\\"); - let mut buf = vec![0; path.len() + 1]; - let cstr = CStr16::from_str_with_buf(path, &mut buf).unwrap(); - let path = Path::new(cstr); - - if og_path.starts_with('/') { - final_path = String::from(""); - } - - for i in path.components() { - if i.to_string() == ".." { - let parts = final_path.split('\\').collect::<Vec<&str>>(); - let len = parts.len() - 1; + pub fn menu(&mut self, items: Vec<MenuItem>, name: &str) { + self.list_items = items; + self.list_enabled = true; + self.list_max_length = 0; + self.list_focused_item = 0; + self.list_name = name.parse().unwrap(); - final_path = parts[..len].join("\\"); - } else if i.to_string() != "." { - final_path = format!("{}\\{}", final_path, i).replace('/', "\\"); + for item in &self.list_items { + if item.text.len() as u32 > self.list_max_length { + self.list_max_length = item.text.len() as u32; } } - if !final_path.is_empty() { - final_path[1..].to_string().replace("\\\\", "\\") - } else { - final_path.to_string().replace("\\\\", "\\") - } + self.update_display(); } +} - pub fn make_readable(&self, _size: u64) -> String { - let size = _size as f64; +pub struct MenuItem { + text: String +} - if size > 1099511627776.0 { - format!("{:.1}T", size / 1099511627776.0) - } else if size > 1073741824.0 { - format!("{:.1}G", size / 1073741824.0) - } else if size > 1048576.0 { - format!("{:.1}M", size / 1048576.0) - } else if size > 1024.0 { - format!("{:.1}K", size / 1024.0) - } else { - format!("{}B", size) +impl MenuItem { + pub fn new(text: &str) -> Self { + MenuItem { + text: String::from(text) } } - pub fn mkdir(&self, path: &str) { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - filesystem.create_dir_all(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())).unwrap(); - } - - pub fn rmdir(&mut self, path: &str) { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - filesystem.remove_dir(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())).unwrap(); - } - - pub fn unlink(&mut self, path: &str) { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - filesystem.remove_file(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())).unwrap(); - } - - pub fn recursive_rmdir(&mut self, path: &str) { - let mut filesystem = self.get_fs(); - let mut buf: Vec<u16> = vec![0; path.len() + 1]; - filesystem.remove_dir_all(Path::new(&CStr16::from_str_with_buf(path, &mut buf).unwrap())).unwrap(); - } - - pub fn print(&mut self, str: &str) { - let stdout = self.system_table.stdout(); - let mut buf = vec![0; str.len() + 1]; - stdout.output_string(CStr16::from_str_with_buf(str, &mut buf).expect("Failed to format text")).expect("Failed to print"); + pub fn show(&self, display: &mut FrameBufferDisplay, offset: usize, color: Rgb888) { + Text::new(&self.text, Point::new(50, (105 + (offset * 20)) as i32), MonoTextStyle::new(&FONT_10X20, color)).draw(display) + .expect("Failed to draw"); } - - pub fn println(&mut self, str: &str) { - self.print(str); - self.print("\r\n"); - } -} +}
\ No newline at end of file diff --git a/userland/.DS_Store b/userland/.DS_Store Binary files differdeleted file mode 100644 index 101bfd5..0000000 --- a/userland/.DS_Store +++ /dev/null diff --git a/userland/Cargo.lock b/userland/Cargo.lock deleted file mode 100644 index 1c6dd5b..0000000 --- a/userland/Cargo.lock +++ /dev/null @@ -1,868 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "build-info" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155eb070980e96aeb4ef3b8620b0febb2ae5e17451dc1b329681bdd4eb0a94e1" -dependencies = [ - "build-info-proc", -] - -[[package]] -name = "build-info-build" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69d6331ec579144d39e1c128f343d23e9b837617df1bed4ed032e141f83f06a" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "cargo_metadata", - "chrono", - "git2", - "glob", - "pretty_assertions", - "rustc_version", - "serde_json", - "zstd", -] - -[[package]] -name = "build-info-common" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209c0c2b13da7e5f7202e591b6d41b46c8f0e78d031dedf5cff71cc8c6ec773" -dependencies = [ - "chrono", - "derive_more", - "semver", - "serde", -] - -[[package]] -name = "build-info-proc" -version = "0.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc1874cb1995691fb01f9bb56e75f9660d2614e74607fa71c08a8b3bd7e30e4" -dependencies = [ - "anyhow", - "base64", - "bincode", - "build-info-common", - "chrono", - "num-bigint", - "num-traits", - "proc-macro-error", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.39", - "zstd", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cometos" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "toolkit", - "uefi", - "uefi-services", - "userland", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "git2" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" -dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "iana-time-zone" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libgit2-sys" -version = "0.16.1+1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libz-sys" -version = "1.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "ptr_meta" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcada80daa06c42ed5f48c9a043865edea5dc44cbf9ac009fda3b89526e28607" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9224df2e20e7c5548aeb5f110a0f3b77ef05f8585139b7148b59056168ed2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toolkit" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "uefi", - "uefi-services", -] - -[[package]] -name = "ucs2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" -dependencies = [ - "bit_field", -] - -[[package]] -name = "uefi" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ead9f748a4646479b850add36b527113a80e80a7e0f44d7b0334291850dcc5" -dependencies = [ - "bitflags", - "log", - "ptr_meta", - "ucs2", - "uefi-macros", - "uefi-raw", - "uguid", -] - -[[package]] -name = "uefi-macros" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a7b1c2c808c3db854a54d5215e3f7e7aaf5dcfbce095598cba6af29895695d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "uefi-raw" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ac69eadd877bfb34e7814be1928122ed0057d9f975169a56ee496aa7bdfd7" -dependencies = [ - "bitflags", - "ptr_meta", - "uguid", -] - -[[package]] -name = "uefi-services" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79fcb420624743c895bad0f9480fbc2f64e7c8d8611fb1ada6bdd799942feb4" -dependencies = [ - "cfg-if", - "log", - "uefi", -] - -[[package]] -name = "uguid" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef516f0806c5f61da6aa95125d0eb2d91cc95b2df426c06bde8be657282aee5" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "userland" -version = "0.1.0" -dependencies = [ - "build-info", - "build-info-build", - "log", - "toolkit", - "uefi", - "uefi-services", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasm-bindgen" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "zstd" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "6.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/userland/Cargo.toml b/userland/Cargo.toml deleted file mode 100644 index 12a772e..0000000 --- a/userland/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "userland" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -uefi = { version = "0.26.0", features = ["alloc"] } -uefi-services = { version = "0.23.0", features = [], default-features = false } -build-info = { version = "0.0.34", features = [], default-features = false } -toolkit = { path = "../toolkit" } -commands = { path = "../commands" } - -[build-dependencies] -build-info-build = "0.0.34"
\ No newline at end of file diff --git a/userland/rust-toolchain.toml b/userland/rust-toolchain.toml deleted file mode 100644 index e756ee7..0000000 --- a/userland/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"] diff --git a/userland/src/lib.rs b/userland/src/lib.rs deleted file mode 100644 index ea28ade..0000000 --- a/userland/src/lib.rs +++ /dev/null @@ -1,91 +0,0 @@ -#![no_std] - -extern crate alloc; - -use alloc::format; -use alloc::string::ToString; -use uefi::proto::console::text::Color; -use toolkit::Toolkit; -use toolkit::error::*; -use commands::parser::{Command, CommandError}; - -pub fn run_shell(mut tk: Toolkit) { - loop { - tk.color(Color::White, Color::Black); - - let cwd = tk.get_cwd().to_string(); - tk.print(&cwd); - tk.color(Color::Yellow, Color::Black); - tk.print(" $ "); - tk.color(Color::LightGray, Color::Black); - - let mut text: &str = &tk.prompt(); - text = text.trim(); - - if text.is_empty() { - continue; - } - - let command = Command::build(text); - - match command { - Ok(cmd) => { - if tk.globals.contains_key("debug") && tk.globals.get("debug").unwrap() == "1" { - tk.println(&format!("{:?}", &cmd)); - } - - if tk.file_exists(&tk.resolve_path(&cmd.command)) { - if tk.is_file(&tk.resolve_path(&cmd.command)) { - tk.execute_file(&tk.resolve_path(&cmd.command)); - } else { - display_error(&mut tk, Error::E12); - } - - continue; - } - - if tk.file_exists(&tk.resolve_path(&format!("{}.lua", cmd.command))) { - if tk.is_file(&tk.resolve_path(&format!("{}.lua", cmd.command))) { - tk.execute_file(&tk.resolve_path(&format!("{}.lua", cmd.command))); - } else { - display_error(&mut tk, Error::E12); - } - - continue; - } - - match cmd.command.as_str() { - "cd" => commands::cd::run(&mut tk, cmd), - "append" => commands::append::run(&mut tk, cmd), - "appendln" => commands::appendln::run(&mut tk, cmd), - "clear" => commands::clear::run(&mut tk, cmd), - "mkdir" => commands::mkdir::run(&mut tk, cmd), - "rmdir" => commands::rmdir::run(&mut tk, cmd), - "pwd" => commands::pwd::run(&mut tk, cmd), - "cat" => commands::cat::run(&mut tk, cmd), - "touch" => commands::touch::run(&mut tk, cmd), - "path" => commands::path::run(&mut tk, cmd), - "ver" => commands::ver::run(&mut tk, cmd), - "ls" => commands::ls::run(&mut tk, cmd), - "rm" => commands::rm::run(&mut tk, cmd), - "shutdown" => commands::shutdown::run(&mut tk, cmd), - "reboot" => commands::reboot::run(&mut tk, cmd), - "debug" => commands::debug::run(&mut tk, cmd), - "mv" => commands::mv::run(&mut tk, cmd), - "cp" => commands::cp::run(&mut tk, cmd), - _ => display_error(&mut tk, Error::E02) - } - } - Err(e) => { - match e { - CommandError::ExecutablePathNotFound => { - display_error(&mut tk, Error::E06); - } - CommandError::MismatchedQuotes => { - display_error(&mut tk, Error::E07); - } - } - } - } - } -} |