layed out minimal structure

master
Able 2022-03-16 02:51:20 -05:00
commit 585eee34f9
Signed by: able
GPG Key ID: D164AF5F5700BE51
9 changed files with 86 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

7
Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "abrowser"
version = "0.1.0"

8
Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "abrowser"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

21
LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Able
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1
src/css/mod.rs Normal file
View File

@ -0,0 +1 @@
//! The CSS engine.

26
src/html/mod.rs Normal file
View File

@ -0,0 +1,26 @@
#![allow(missing_docs)]
/// https://webidl.spec.whatwg.org/#idl-DOMString
pub type DOMString = String;
/// https://dom.spec.whatwg.org/#interface-element
pub struct Element {
pub id: DOMString,
pub class_name: DOMString,
pub title: DOMString,
pub lang: DOMString,
pub translate: bool,
pub dir: DOMString,
pub hidden: bool,
pub inert: bool,
pub access_key: DOMString,
pub access_key_label: DOMString,
pub draggable: bool,
pub spellcheck: bool,
pub autocapitalize: DOMString,
pub inner_text: DOMString,
pub outer_text: DOMString,
}

0
src/js/mod.rs Normal file
View File

13
src/main.rs Normal file
View File

@ -0,0 +1,13 @@
//! A modern compliant Rust implementation of the HTML5/CSS3/JS specs bundled into a web browser.
#![deny(missing_docs)]
pub mod css;
pub mod html;
// pub mod js;
fn main() {
let html = include_str!("../tests/minimal.html");
println!("{}", html);
}

9
tests/minimal.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>