layed out minimal structure
This commit is contained in:
commit
8ed14e073c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal 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
8
Cargo.toml
Normal 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
21
LICENSE.md
Normal 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
1
src/css/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
//! The CSS engine.
|
26
src/html/mod.rs
Normal file
26
src/html/mod.rs
Normal 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
0
src/js/mod.rs
Normal file
13
src/main.rs
Normal file
13
src/main.rs
Normal 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
9
tests/minimal.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<body>
|
||||
<h1>My First Heading</h1>
|
||||
<p>My first paragraph.</p>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue