GitXplorerGitXplorer
E

dos-like-rs

public
13 stars
1 forks
0 issues

Commits

List of commits on branch main.
Unverified
2254a7fd57b6173e0b045caee8ff93492c0f5f0f

(cargo-release) start next development iteration

EEnet4 committed a year ago
Unverified
ddd75b20b80303d182b8062443509840ca39e18d

(cargo-release) version 0.4.0

EEnet4 committed a year ago
Unverified
e000bb0927ffb26b9614b939112996c1e5b3e4b3

Update dos-like-sys in dos-like crate

EEnet4 committed a year ago
Unverified
fa23de2235eac32ae7052481f33aa9abdf3520b6

(cargo-release) version 0.3.0

EEnet4 committed a year ago
Verified
fb77beaa0fec9759af892a52d10e4c93aa246fcf

Merge pull request #11 from Enet4/chore/ci-2023

EEnet4 committed a year ago
Unverified
60ffaa1de077ee2e647a1bc1b4e3b72799aaad11

Ignore clippy lint on <u32 as From<KeyCode>>::from

EEnet4 committed a year ago

README

The README file for this repository.

dos-like for Rust   Latest Version Documentation Continuous integration status dependency status

This project provides access to Mattias Gustavsson's dos-like framework, so as to write DOS-like applications in Rust.

Rotozoom example written in Rust

How to use

This crate is not a regular library. It defines a main function on its own. For the executable linking to work correctly, the main source file needs to declare no main and define an extern C function dosmain instead.

#![no_main]

#[no_mangle]
pub extern "C" fn dosmain() -> i32 {
    // your code here

    0
}

A utility macro is available as an alternative to declaring the function:

#![no_main]

dos_like_rs::dos_main! {
    // your code here
}

See the examples for a typical application structure, which are based on the original dos-like examples.

A C compiler needs to be available (uses cc). The dos-like framework is statically linked, just like in a C program.

Since the initiator is based on routines in C, this also means that panic unwinding will not work, so it is best to configure your project to abort on panic. In your Cargo.toml:

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

Check out the dos-like README for additional requirements.

Cargo features

  • disable-screen-frame compiles dos-like so that the CRT screen frame around the viewport does not appear.

Platform support

These bindings have been tested on Linux, Windows and MacOS Monterey (x86). WebAssembly support is currently not guaranteed (but your assistance on this would be greatly appreciated!).

Building

When working on this project, ensure that the git submodule in dos-like-sys/dos-like was populated (either by cloning with --recurse-submodules or by calling git submodule update --init). Some of the examples do not work unless with this submodule checked out.

License and attribution notice

The Rust bindings are licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

The dos-like framework remains licensed as defined in the original LICENSE file.