diff --git a/.gitignore b/.gitignore index e5e917d1..608ba460 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ tarpaulin-report.html # Rust /target -bench/target **/*.rs.bk # Node diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5848b863..dfa836d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ land your contribution below. 2. Fork the Typst repository and start with your contribution. If you, at any point in this process, are unsure about how to do something in the Typst codebase, reach out to a maintainer or a more experienced contributor. Also - have a look at the [`ARCHITECTURE.md`][architecture] file. It explains how + have a look at the [`architecture.md`][architecture] file. It explains how the compiler works. 3. Create a pull request (PR) in the Typst repository, outlining your contribution, the technical rationale behind it, and, if it includes a new @@ -69,5 +69,5 @@ Typst! [issue]: https://github.com/typst/typst/issues [testing]: https://github.com/typst/typst/blob/main/tests/README.md [#contributors]: https://discord.com/channels/1054443721975922748/1088371867913572452 -[architecture]: https://github.com/typst/typst/blob/main/ARCHITECTURE.md +[architecture]: https://github.com/typst/typst/blob/main/docs/dev/architecture.md [changelog]: https://typst.app/docs/changelog/ diff --git a/Cargo.lock b/Cargo.lock index 044c7c98..07621fdb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -425,9 +425,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", @@ -751,15 +751,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.1" @@ -1245,9 +1236,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1356,11 +1347,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.1", "libc", ] @@ -1394,9 +1385,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "overload" @@ -3218,11 +3209,10 @@ dependencies = [ [[package]] name = "zopfli" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b2bed49d3f0af28729a2338ee8c3a48eba2133a78ebc560779be161ebaaad8" +checksum = "4e0650ae6a051326d798eb099b632f1afb0d323d25ee4ec82ffb0779512084d5" dependencies = [ - "byteorder", "crc32fast", "log", "simd-adler32", diff --git a/Cargo.toml b/Cargo.toml index 5f1e77e9..ad3a57f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] -members = ["cli", "docs", "library", "macros", "tests"] -default-members = ["cli"] +members = ["crates/*", "tests"] +default-members = ["crates/typst-cli"] [workspace.package] version = "0.6.0" @@ -12,63 +12,6 @@ repository = "https://github.com/typst/typst" readme = "README.md" license = "Apache-2.0" -[package] -name = "typst" -description = "A new markup-based typesetting system that is powerful and easy to learn." -categories = ["compilers", "science"] -keywords = ["markup", "typesetting"] -version.workspace = true -rust-version.workspace = true -authors.workspace = true -edition.workspace = true -homepage.workspace = true -repository.workspace = true -license.workspace = true - -[lib] -doctest = false -bench = false - -[dependencies] -typst-macros = { path = "macros" } -bitflags = { version = "2", features = ["serde"] } -bytemuck = "1" -comemo = "0.3" -ecow = { version = "0.1.1", features = ["serde"] } -flate2 = "1" -fontdb = "0.13" -if_chain = "1" -image = { version = "0.24", default-features = false, features = ["png", "jpeg", "gif"] } -indexmap = "1.9.3" -log = "0.4" -miniz_oxide = "0.7" -once_cell = "1" -pdf-writer = "0.7.1" -pixglyph = "0.1" -regex = "1" -resvg = { version = "0.32", default-features = false } -roxmltree = "0.18" -rustybuzz = "0.7" -serde = { version = "1", features = ["derive"] } -siphasher = "0.3" -subsetter = "0.1.1" -svg2pdf = { git = "https://github.com/typst/svg2pdf" } -tiny-skia = "0.9.0" -toml = { version = "0.7.3", default-features = false, features = ["parse"] } -tracing = "0.1.37" -ttf-parser = "0.18.1" -unicode-general-category = "0.6" -unicode-ident = "1.0" -unicode-math-class = "0.1" -unicode-segmentation = "1" -unscanny = "0.1" -usvg = { version = "0.32", default-features = false, features = ["text"] } -xmp-writer = "0.1" -time = { version = "0.3.20", features = ["std", "formatting"] } - -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] -stacker = "0.1.15" - [profile.dev.package."*"] opt-level = 2 diff --git a/NOTICE b/NOTICE index 9fef0f4e..d2ebb9da 100644 --- a/NOTICE +++ b/NOTICE @@ -3,8 +3,8 @@ Licenses for third party components used by this project can be found below. ================================================================================ The MIT License applies to: -* The default color set defined in `src/geom/color.rs` which is adapted from - the colors.css project +* The default color set defined in `crates/typst/src/geom/color.rs` which is + adapted from the colors.css project (https://clrs.cc/) The MIT License (MIT) @@ -29,8 +29,9 @@ THE SOFTWARE. ================================================================================ ================================================================================ -Alpha multiplication and source-over blending in `src/export/render.rs` are -ported from Skia code which can be found here: +Alpha multiplication and source-over blending in +`crates/typst/src/export/render.rs` are ported from Skia code which can be found +here: https://skia.googlesource.com/skia/+/refs/heads/main/include/core/SkColorPriv.h Copyright (c) 2011 Google Inc. All rights reserved. @@ -63,8 +64,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================ ================================================================================ -Syntaxes in `library/assets/syntect.bin` are generated from syntax definitions -which can be found here: +Syntaxes in `crates/typst-library/assets/syntect.bin` are generated from syntax +definitions which can be found here: https://github.com/sharkdp/bat/tree/master/assets/syntaxes The syntax definitions are used under their respective licenses. diff --git a/README.md b/README.md index b9ca6451..9459c61e 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ instant preview. To achieve these goals, we follow three core design principles: [scripting]: https://typst.app/docs/reference/scripting/ [rust]: https://rustup.rs/ [releases]: https://github.com/typst/typst/releases/ -[architecture]: https://github.com/typst/typst/blob/main/ARCHITECTURE.md +[architecture]: https://github.com/typst/typst/blob/main/docs/dev/architecture.md [contributing]: https://github.com/typst/typst/blob/main/CONTRIBUTING.md [packages]: https://github.com/typst/packages/ [`comemo`]: https://github.com/typst/comemo/ diff --git a/cli/Cargo.toml b/crates/typst-cli/Cargo.toml similarity index 94% rename from cli/Cargo.toml rename to crates/typst-cli/Cargo.toml index e8058df0..e77cbc2a 100644 --- a/cli/Cargo.toml +++ b/crates/typst-cli/Cargo.toml @@ -20,8 +20,8 @@ bench = false doc = false [dependencies] -typst = { path = ".." } -typst-library = { path = "../library" } +typst = { path = "../typst" } +typst-library = { path = "../typst-library" } chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] } clap = { version = "4.2.4", features = ["derive", "env"] } codespan-reporting = "0.11" diff --git a/cli/build.rs b/crates/typst-cli/build.rs similarity index 100% rename from cli/build.rs rename to crates/typst-cli/build.rs diff --git a/cli/src/args.rs b/crates/typst-cli/src/args.rs similarity index 100% rename from cli/src/args.rs rename to crates/typst-cli/src/args.rs diff --git a/cli/src/compile.rs b/crates/typst-cli/src/compile.rs similarity index 100% rename from cli/src/compile.rs rename to crates/typst-cli/src/compile.rs diff --git a/cli/src/fonts.rs b/crates/typst-cli/src/fonts.rs similarity index 98% rename from cli/src/fonts.rs rename to crates/typst-cli/src/fonts.rs index 75835741..d8209fee 100644 --- a/cli/src/fonts.rs +++ b/crates/typst-cli/src/fonts.rs @@ -95,7 +95,7 @@ impl FontSearcher { macro_rules! add { ($filename:literal) => { - process(include_bytes!(concat!("../../assets/fonts/", $filename,))); + process(include_bytes!(concat!("../../../assets/fonts/", $filename))); }; } diff --git a/cli/src/main.rs b/crates/typst-cli/src/main.rs similarity index 100% rename from cli/src/main.rs rename to crates/typst-cli/src/main.rs diff --git a/cli/src/package.rs b/crates/typst-cli/src/package.rs similarity index 100% rename from cli/src/package.rs rename to crates/typst-cli/src/package.rs diff --git a/cli/src/tracing.rs b/crates/typst-cli/src/tracing.rs similarity index 100% rename from cli/src/tracing.rs rename to crates/typst-cli/src/tracing.rs diff --git a/cli/src/watch.rs b/crates/typst-cli/src/watch.rs similarity index 100% rename from cli/src/watch.rs rename to crates/typst-cli/src/watch.rs diff --git a/cli/src/world.rs b/crates/typst-cli/src/world.rs similarity index 100% rename from cli/src/world.rs rename to crates/typst-cli/src/world.rs diff --git a/docs/Cargo.toml b/crates/typst-docs/Cargo.toml similarity index 87% rename from docs/Cargo.toml rename to crates/typst-docs/Cargo.toml index b6015d01..47088815 100644 --- a/docs/Cargo.toml +++ b/crates/typst-docs/Cargo.toml @@ -11,8 +11,8 @@ doctest = false bench = false [dependencies] -typst = { path = ".." } -typst-library = { path = "../library" } +typst = { path = "../typst" } +typst-library = { path = "../typst-library" } comemo = "0.3" heck = "0.4" include_dir = "0.7" diff --git a/docs/src/contribs.rs b/crates/typst-docs/src/contribs.rs similarity index 100% rename from docs/src/contribs.rs rename to crates/typst-docs/src/contribs.rs diff --git a/docs/src/html.rs b/crates/typst-docs/src/html.rs similarity index 100% rename from docs/src/html.rs rename to crates/typst-docs/src/html.rs diff --git a/docs/src/lib.rs b/crates/typst-docs/src/lib.rs similarity index 97% rename from docs/src/lib.rs rename to crates/typst-docs/src/lib.rs index afceff22..d7f816d2 100644 --- a/docs/src/lib.rs +++ b/crates/typst-docs/src/lib.rs @@ -23,13 +23,13 @@ use typst::geom::{Abs, Smart}; use typst_library::layout::{Margin, PageElem}; use unscanny::Scanner; -static SRC: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/src"); -static FILES: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../assets/files"); +static DOCS: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../../docs"); +static FILES: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../../assets/files"); static DETAILS: Lazy = Lazy::new(|| yaml("reference/details.yml")); static GROUPS: Lazy> = Lazy::new(|| yaml("reference/groups.yml")); static FONTS: Lazy<(Prehashed, Vec)> = Lazy::new(|| { - static DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../assets/fonts"); + static DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../../assets/fonts"); let fonts: Vec<_> = DIR .files() .flat_map(|file| Font::iter(file.contents().into())) @@ -53,13 +53,13 @@ static LIBRARY: Lazy> = Lazy::new(|| { /// Build documentation pages. pub fn provide(resolver: &dyn Resolver) -> Vec { vec![ - markdown_page(resolver, "/docs/", "general/overview.md").with_route("/docs/"), + markdown_page(resolver, "/docs/", "overview.md").with_route("/docs/"), tutorial_pages(resolver), reference_pages(resolver), guides_pages(resolver), packages_page(resolver), - markdown_page(resolver, "/docs/", "general/changelog.md"), - markdown_page(resolver, "/docs/", "general/community.md"), + markdown_page(resolver, "/docs/", "changelog.md"), + markdown_page(resolver, "/docs/", "community.md"), ] } @@ -125,7 +125,7 @@ pub enum BodyModel { /// Build the tutorial. fn tutorial_pages(resolver: &dyn Resolver) -> PageModel { let mut page = markdown_page(resolver, "/docs/", "tutorial/welcome.md"); - page.children = SRC + page.children = DOCS .get_dir("tutorial") .unwrap() .files() @@ -187,7 +187,7 @@ fn markdown_page( path: impl AsRef, ) -> PageModel { assert!(parent.starts_with('/') && parent.ends_with('/')); - let md = SRC.get_file(path).unwrap().contents_utf8().unwrap(); + let md = DOCS.get_file(path).unwrap().contents_utf8().unwrap(); let html = Html::markdown(resolver, md); let title = html.title().expect("chapter lacks a title").to_string(); PageModel { @@ -652,7 +652,7 @@ fn types_page(resolver: &dyn Resolver, parent: &str) -> PageModel { /// Produce the types' models. fn type_models(resolver: &dyn Resolver) -> Vec { - let file = SRC.get_file("reference/types.md").unwrap(); + let file = DOCS.get_file("reference/types.md").unwrap(); let text = file.contents_utf8().unwrap(); let mut s = unscanny::Scanner::new(text); @@ -906,7 +906,7 @@ fn module<'a>(parent: &'a Module, name: &str) -> Result<&'a Module, String> { /// Load YAML from a path. #[track_caller] fn yaml(path: &str) -> T { - let file = SRC.get_file(path).unwrap(); + let file = DOCS.get_file(path).unwrap(); yaml::from_slice(file.contents()).unwrap() } diff --git a/library/Cargo.toml b/crates/typst-library/Cargo.toml similarity index 97% rename from library/Cargo.toml rename to crates/typst-library/Cargo.toml index 85bf4a2c..23c37d75 100644 --- a/library/Cargo.toml +++ b/crates/typst-library/Cargo.toml @@ -17,7 +17,7 @@ doctest = false bench = false [dependencies] -typst = { path = ".." } +typst = { path = "../typst" } az = "1.2" chinese-number = { version = "0.7.2", default-features = false, features = ["number-to-chinese"] } comemo = "0.3" diff --git a/library/assets/cj_linebreak_data.postcard b/crates/typst-library/assets/cj_linebreak_data.postcard similarity index 100% rename from library/assets/cj_linebreak_data.postcard rename to crates/typst-library/assets/cj_linebreak_data.postcard diff --git a/library/assets/icudata.postcard b/crates/typst-library/assets/icudata.postcard similarity index 100% rename from library/assets/icudata.postcard rename to crates/typst-library/assets/icudata.postcard diff --git a/library/assets/syntect.bin b/crates/typst-library/assets/syntect.bin similarity index 100% rename from library/assets/syntect.bin rename to crates/typst-library/assets/syntect.bin diff --git a/library/src/compute/calc.rs b/crates/typst-library/src/compute/calc.rs similarity index 100% rename from library/src/compute/calc.rs rename to crates/typst-library/src/compute/calc.rs diff --git a/library/src/compute/construct.rs b/crates/typst-library/src/compute/construct.rs similarity index 100% rename from library/src/compute/construct.rs rename to crates/typst-library/src/compute/construct.rs diff --git a/library/src/compute/data.rs b/crates/typst-library/src/compute/data.rs similarity index 100% rename from library/src/compute/data.rs rename to crates/typst-library/src/compute/data.rs diff --git a/library/src/compute/foundations.rs b/crates/typst-library/src/compute/foundations.rs similarity index 100% rename from library/src/compute/foundations.rs rename to crates/typst-library/src/compute/foundations.rs diff --git a/library/src/compute/mod.rs b/crates/typst-library/src/compute/mod.rs similarity index 100% rename from library/src/compute/mod.rs rename to crates/typst-library/src/compute/mod.rs diff --git a/library/src/layout/align.rs b/crates/typst-library/src/layout/align.rs similarity index 100% rename from library/src/layout/align.rs rename to crates/typst-library/src/layout/align.rs diff --git a/library/src/layout/columns.rs b/crates/typst-library/src/layout/columns.rs similarity index 100% rename from library/src/layout/columns.rs rename to crates/typst-library/src/layout/columns.rs diff --git a/library/src/layout/container.rs b/crates/typst-library/src/layout/container.rs similarity index 100% rename from library/src/layout/container.rs rename to crates/typst-library/src/layout/container.rs diff --git a/library/src/layout/enum.rs b/crates/typst-library/src/layout/enum.rs similarity index 100% rename from library/src/layout/enum.rs rename to crates/typst-library/src/layout/enum.rs diff --git a/library/src/layout/flow.rs b/crates/typst-library/src/layout/flow.rs similarity index 100% rename from library/src/layout/flow.rs rename to crates/typst-library/src/layout/flow.rs diff --git a/library/src/layout/fragment.rs b/crates/typst-library/src/layout/fragment.rs similarity index 100% rename from library/src/layout/fragment.rs rename to crates/typst-library/src/layout/fragment.rs diff --git a/library/src/layout/grid.rs b/crates/typst-library/src/layout/grid.rs similarity index 100% rename from library/src/layout/grid.rs rename to crates/typst-library/src/layout/grid.rs diff --git a/library/src/layout/hide.rs b/crates/typst-library/src/layout/hide.rs similarity index 100% rename from library/src/layout/hide.rs rename to crates/typst-library/src/layout/hide.rs diff --git a/library/src/layout/list.rs b/crates/typst-library/src/layout/list.rs similarity index 100% rename from library/src/layout/list.rs rename to crates/typst-library/src/layout/list.rs diff --git a/library/src/layout/measure.rs b/crates/typst-library/src/layout/measure.rs similarity index 100% rename from library/src/layout/measure.rs rename to crates/typst-library/src/layout/measure.rs diff --git a/library/src/layout/mod.rs b/crates/typst-library/src/layout/mod.rs similarity index 100% rename from library/src/layout/mod.rs rename to crates/typst-library/src/layout/mod.rs diff --git a/library/src/layout/pad.rs b/crates/typst-library/src/layout/pad.rs similarity index 100% rename from library/src/layout/pad.rs rename to crates/typst-library/src/layout/pad.rs diff --git a/library/src/layout/page.rs b/crates/typst-library/src/layout/page.rs similarity index 100% rename from library/src/layout/page.rs rename to crates/typst-library/src/layout/page.rs diff --git a/library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs similarity index 100% rename from library/src/layout/par.rs rename to crates/typst-library/src/layout/par.rs diff --git a/library/src/layout/place.rs b/crates/typst-library/src/layout/place.rs similarity index 100% rename from library/src/layout/place.rs rename to crates/typst-library/src/layout/place.rs diff --git a/library/src/layout/regions.rs b/crates/typst-library/src/layout/regions.rs similarity index 100% rename from library/src/layout/regions.rs rename to crates/typst-library/src/layout/regions.rs diff --git a/library/src/layout/repeat.rs b/crates/typst-library/src/layout/repeat.rs similarity index 100% rename from library/src/layout/repeat.rs rename to crates/typst-library/src/layout/repeat.rs diff --git a/library/src/layout/spacing.rs b/crates/typst-library/src/layout/spacing.rs similarity index 100% rename from library/src/layout/spacing.rs rename to crates/typst-library/src/layout/spacing.rs diff --git a/library/src/layout/stack.rs b/crates/typst-library/src/layout/stack.rs similarity index 100% rename from library/src/layout/stack.rs rename to crates/typst-library/src/layout/stack.rs diff --git a/library/src/layout/table.rs b/crates/typst-library/src/layout/table.rs similarity index 100% rename from library/src/layout/table.rs rename to crates/typst-library/src/layout/table.rs diff --git a/library/src/layout/terms.rs b/crates/typst-library/src/layout/terms.rs similarity index 100% rename from library/src/layout/terms.rs rename to crates/typst-library/src/layout/terms.rs diff --git a/library/src/layout/transform.rs b/crates/typst-library/src/layout/transform.rs similarity index 100% rename from library/src/layout/transform.rs rename to crates/typst-library/src/layout/transform.rs diff --git a/library/src/lib.rs b/crates/typst-library/src/lib.rs similarity index 100% rename from library/src/lib.rs rename to crates/typst-library/src/lib.rs diff --git a/library/src/math/accent.rs b/crates/typst-library/src/math/accent.rs similarity index 100% rename from library/src/math/accent.rs rename to crates/typst-library/src/math/accent.rs diff --git a/library/src/math/align.rs b/crates/typst-library/src/math/align.rs similarity index 100% rename from library/src/math/align.rs rename to crates/typst-library/src/math/align.rs diff --git a/library/src/math/attach.rs b/crates/typst-library/src/math/attach.rs similarity index 100% rename from library/src/math/attach.rs rename to crates/typst-library/src/math/attach.rs diff --git a/library/src/math/cancel.rs b/crates/typst-library/src/math/cancel.rs similarity index 100% rename from library/src/math/cancel.rs rename to crates/typst-library/src/math/cancel.rs diff --git a/library/src/math/ctx.rs b/crates/typst-library/src/math/ctx.rs similarity index 100% rename from library/src/math/ctx.rs rename to crates/typst-library/src/math/ctx.rs diff --git a/library/src/math/delimited.rs b/crates/typst-library/src/math/delimited.rs similarity index 100% rename from library/src/math/delimited.rs rename to crates/typst-library/src/math/delimited.rs diff --git a/library/src/math/frac.rs b/crates/typst-library/src/math/frac.rs similarity index 100% rename from library/src/math/frac.rs rename to crates/typst-library/src/math/frac.rs diff --git a/library/src/math/fragment.rs b/crates/typst-library/src/math/fragment.rs similarity index 100% rename from library/src/math/fragment.rs rename to crates/typst-library/src/math/fragment.rs diff --git a/library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs similarity index 100% rename from library/src/math/matrix.rs rename to crates/typst-library/src/math/matrix.rs diff --git a/library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs similarity index 100% rename from library/src/math/mod.rs rename to crates/typst-library/src/math/mod.rs diff --git a/library/src/math/op.rs b/crates/typst-library/src/math/op.rs similarity index 100% rename from library/src/math/op.rs rename to crates/typst-library/src/math/op.rs diff --git a/library/src/math/root.rs b/crates/typst-library/src/math/root.rs similarity index 100% rename from library/src/math/root.rs rename to crates/typst-library/src/math/root.rs diff --git a/library/src/math/row.rs b/crates/typst-library/src/math/row.rs similarity index 100% rename from library/src/math/row.rs rename to crates/typst-library/src/math/row.rs diff --git a/library/src/math/spacing.rs b/crates/typst-library/src/math/spacing.rs similarity index 100% rename from library/src/math/spacing.rs rename to crates/typst-library/src/math/spacing.rs diff --git a/library/src/math/stretch.rs b/crates/typst-library/src/math/stretch.rs similarity index 100% rename from library/src/math/stretch.rs rename to crates/typst-library/src/math/stretch.rs diff --git a/library/src/math/style.rs b/crates/typst-library/src/math/style.rs similarity index 100% rename from library/src/math/style.rs rename to crates/typst-library/src/math/style.rs diff --git a/library/src/math/underover.rs b/crates/typst-library/src/math/underover.rs similarity index 100% rename from library/src/math/underover.rs rename to crates/typst-library/src/math/underover.rs diff --git a/library/src/meta/bibliography.rs b/crates/typst-library/src/meta/bibliography.rs similarity index 100% rename from library/src/meta/bibliography.rs rename to crates/typst-library/src/meta/bibliography.rs diff --git a/library/src/meta/context.rs b/crates/typst-library/src/meta/context.rs similarity index 100% rename from library/src/meta/context.rs rename to crates/typst-library/src/meta/context.rs diff --git a/library/src/meta/counter.rs b/crates/typst-library/src/meta/counter.rs similarity index 100% rename from library/src/meta/counter.rs rename to crates/typst-library/src/meta/counter.rs diff --git a/library/src/meta/document.rs b/crates/typst-library/src/meta/document.rs similarity index 100% rename from library/src/meta/document.rs rename to crates/typst-library/src/meta/document.rs diff --git a/library/src/meta/figure.rs b/crates/typst-library/src/meta/figure.rs similarity index 100% rename from library/src/meta/figure.rs rename to crates/typst-library/src/meta/figure.rs diff --git a/library/src/meta/footnote.rs b/crates/typst-library/src/meta/footnote.rs similarity index 100% rename from library/src/meta/footnote.rs rename to crates/typst-library/src/meta/footnote.rs diff --git a/library/src/meta/heading.rs b/crates/typst-library/src/meta/heading.rs similarity index 100% rename from library/src/meta/heading.rs rename to crates/typst-library/src/meta/heading.rs diff --git a/library/src/meta/link.rs b/crates/typst-library/src/meta/link.rs similarity index 100% rename from library/src/meta/link.rs rename to crates/typst-library/src/meta/link.rs diff --git a/library/src/meta/mod.rs b/crates/typst-library/src/meta/mod.rs similarity index 100% rename from library/src/meta/mod.rs rename to crates/typst-library/src/meta/mod.rs diff --git a/library/src/meta/numbering.rs b/crates/typst-library/src/meta/numbering.rs similarity index 100% rename from library/src/meta/numbering.rs rename to crates/typst-library/src/meta/numbering.rs diff --git a/library/src/meta/outline.rs b/crates/typst-library/src/meta/outline.rs similarity index 100% rename from library/src/meta/outline.rs rename to crates/typst-library/src/meta/outline.rs diff --git a/library/src/meta/query.rs b/crates/typst-library/src/meta/query.rs similarity index 100% rename from library/src/meta/query.rs rename to crates/typst-library/src/meta/query.rs diff --git a/library/src/meta/reference.rs b/crates/typst-library/src/meta/reference.rs similarity index 100% rename from library/src/meta/reference.rs rename to crates/typst-library/src/meta/reference.rs diff --git a/library/src/meta/state.rs b/crates/typst-library/src/meta/state.rs similarity index 100% rename from library/src/meta/state.rs rename to crates/typst-library/src/meta/state.rs diff --git a/library/src/prelude.rs b/crates/typst-library/src/prelude.rs similarity index 100% rename from library/src/prelude.rs rename to crates/typst-library/src/prelude.rs diff --git a/library/src/shared/behave.rs b/crates/typst-library/src/shared/behave.rs similarity index 100% rename from library/src/shared/behave.rs rename to crates/typst-library/src/shared/behave.rs diff --git a/library/src/shared/ext.rs b/crates/typst-library/src/shared/ext.rs similarity index 100% rename from library/src/shared/ext.rs rename to crates/typst-library/src/shared/ext.rs diff --git a/library/src/shared/mod.rs b/crates/typst-library/src/shared/mod.rs similarity index 100% rename from library/src/shared/mod.rs rename to crates/typst-library/src/shared/mod.rs diff --git a/library/src/symbols/emoji.rs b/crates/typst-library/src/symbols/emoji.rs similarity index 100% rename from library/src/symbols/emoji.rs rename to crates/typst-library/src/symbols/emoji.rs diff --git a/library/src/symbols/mod.rs b/crates/typst-library/src/symbols/mod.rs similarity index 100% rename from library/src/symbols/mod.rs rename to crates/typst-library/src/symbols/mod.rs diff --git a/library/src/symbols/sym.rs b/crates/typst-library/src/symbols/sym.rs similarity index 100% rename from library/src/symbols/sym.rs rename to crates/typst-library/src/symbols/sym.rs diff --git a/library/src/text/deco.rs b/crates/typst-library/src/text/deco.rs similarity index 100% rename from library/src/text/deco.rs rename to crates/typst-library/src/text/deco.rs diff --git a/library/src/text/misc.rs b/crates/typst-library/src/text/misc.rs similarity index 100% rename from library/src/text/misc.rs rename to crates/typst-library/src/text/misc.rs diff --git a/library/src/text/mod.rs b/crates/typst-library/src/text/mod.rs similarity index 100% rename from library/src/text/mod.rs rename to crates/typst-library/src/text/mod.rs diff --git a/library/src/text/quotes.rs b/crates/typst-library/src/text/quotes.rs similarity index 100% rename from library/src/text/quotes.rs rename to crates/typst-library/src/text/quotes.rs diff --git a/library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs similarity index 100% rename from library/src/text/raw.rs rename to crates/typst-library/src/text/raw.rs diff --git a/library/src/text/shaping.rs b/crates/typst-library/src/text/shaping.rs similarity index 100% rename from library/src/text/shaping.rs rename to crates/typst-library/src/text/shaping.rs diff --git a/library/src/text/shift.rs b/crates/typst-library/src/text/shift.rs similarity index 100% rename from library/src/text/shift.rs rename to crates/typst-library/src/text/shift.rs diff --git a/library/src/visualize/image.rs b/crates/typst-library/src/visualize/image.rs similarity index 100% rename from library/src/visualize/image.rs rename to crates/typst-library/src/visualize/image.rs diff --git a/library/src/visualize/line.rs b/crates/typst-library/src/visualize/line.rs similarity index 100% rename from library/src/visualize/line.rs rename to crates/typst-library/src/visualize/line.rs diff --git a/library/src/visualize/mod.rs b/crates/typst-library/src/visualize/mod.rs similarity index 100% rename from library/src/visualize/mod.rs rename to crates/typst-library/src/visualize/mod.rs diff --git a/library/src/visualize/path.rs b/crates/typst-library/src/visualize/path.rs similarity index 100% rename from library/src/visualize/path.rs rename to crates/typst-library/src/visualize/path.rs diff --git a/library/src/visualize/polygon.rs b/crates/typst-library/src/visualize/polygon.rs similarity index 100% rename from library/src/visualize/polygon.rs rename to crates/typst-library/src/visualize/polygon.rs diff --git a/library/src/visualize/shape.rs b/crates/typst-library/src/visualize/shape.rs similarity index 100% rename from library/src/visualize/shape.rs rename to crates/typst-library/src/visualize/shape.rs diff --git a/macros/Cargo.toml b/crates/typst-macros/Cargo.toml similarity index 100% rename from macros/Cargo.toml rename to crates/typst-macros/Cargo.toml diff --git a/macros/src/castable.rs b/crates/typst-macros/src/castable.rs similarity index 100% rename from macros/src/castable.rs rename to crates/typst-macros/src/castable.rs diff --git a/macros/src/element.rs b/crates/typst-macros/src/element.rs similarity index 100% rename from macros/src/element.rs rename to crates/typst-macros/src/element.rs diff --git a/macros/src/func.rs b/crates/typst-macros/src/func.rs similarity index 100% rename from macros/src/func.rs rename to crates/typst-macros/src/func.rs diff --git a/macros/src/lib.rs b/crates/typst-macros/src/lib.rs similarity index 100% rename from macros/src/lib.rs rename to crates/typst-macros/src/lib.rs diff --git a/macros/src/symbols.rs b/crates/typst-macros/src/symbols.rs similarity index 100% rename from macros/src/symbols.rs rename to crates/typst-macros/src/symbols.rs diff --git a/macros/src/util.rs b/crates/typst-macros/src/util.rs similarity index 100% rename from macros/src/util.rs rename to crates/typst-macros/src/util.rs diff --git a/crates/typst/Cargo.toml b/crates/typst/Cargo.toml new file mode 100644 index 00000000..c9f3bb02 --- /dev/null +++ b/crates/typst/Cargo.toml @@ -0,0 +1,56 @@ +[package] +name = "typst" +description = "A new markup-based typesetting system that is powerful and easy to learn." +categories = ["compilers", "science"] +keywords = ["markup", "typesetting"] +version.workspace = true +rust-version.workspace = true +authors.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true + +[lib] +doctest = false +bench = false + +[dependencies] +typst-macros = { path = "../typst-macros" } +bitflags = { version = "2", features = ["serde"] } +bytemuck = "1" +comemo = "0.3" +ecow = { version = "0.1.1", features = ["serde"] } +flate2 = "1" +fontdb = "0.13" +if_chain = "1" +image = { version = "0.24", default-features = false, features = ["png", "jpeg", "gif"] } +indexmap = "1.9.3" +log = "0.4" +miniz_oxide = "0.7" +once_cell = "1" +pdf-writer = "0.7.1" +pixglyph = "0.1" +regex = "1" +resvg = { version = "0.32", default-features = false } +roxmltree = "0.18" +rustybuzz = "0.7" +serde = { version = "1", features = ["derive"] } +siphasher = "0.3" +subsetter = "0.1.1" +svg2pdf = { git = "https://github.com/typst/svg2pdf" } +tiny-skia = "0.9.0" +toml = { version = "0.7.3", default-features = false, features = ["parse"] } +tracing = "0.1.37" +ttf-parser = "0.18.1" +unicode-general-category = "0.6" +unicode-ident = "1.0" +unicode-math-class = "0.1" +unicode-segmentation = "1" +unscanny = "0.1" +usvg = { version = "0.32", default-features = false, features = ["text"] } +xmp-writer = "0.1" +time = { version = "0.3.20", features = ["std", "formatting"] } + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +stacker = "0.1.15" diff --git a/src/diag.rs b/crates/typst/src/diag.rs similarity index 100% rename from src/diag.rs rename to crates/typst/src/diag.rs diff --git a/src/doc.rs b/crates/typst/src/doc.rs similarity index 100% rename from src/doc.rs rename to crates/typst/src/doc.rs diff --git a/src/eval/args.rs b/crates/typst/src/eval/args.rs similarity index 100% rename from src/eval/args.rs rename to crates/typst/src/eval/args.rs diff --git a/src/eval/array.rs b/crates/typst/src/eval/array.rs similarity index 100% rename from src/eval/array.rs rename to crates/typst/src/eval/array.rs diff --git a/src/eval/auto.rs b/crates/typst/src/eval/auto.rs similarity index 100% rename from src/eval/auto.rs rename to crates/typst/src/eval/auto.rs diff --git a/src/eval/cast.rs b/crates/typst/src/eval/cast.rs similarity index 100% rename from src/eval/cast.rs rename to crates/typst/src/eval/cast.rs diff --git a/src/eval/datetime.rs b/crates/typst/src/eval/datetime.rs similarity index 100% rename from src/eval/datetime.rs rename to crates/typst/src/eval/datetime.rs diff --git a/src/eval/dict.rs b/crates/typst/src/eval/dict.rs similarity index 100% rename from src/eval/dict.rs rename to crates/typst/src/eval/dict.rs diff --git a/src/eval/func.rs b/crates/typst/src/eval/func.rs similarity index 100% rename from src/eval/func.rs rename to crates/typst/src/eval/func.rs diff --git a/src/eval/int.rs b/crates/typst/src/eval/int.rs similarity index 100% rename from src/eval/int.rs rename to crates/typst/src/eval/int.rs diff --git a/src/eval/library.rs b/crates/typst/src/eval/library.rs similarity index 100% rename from src/eval/library.rs rename to crates/typst/src/eval/library.rs diff --git a/src/eval/methods.rs b/crates/typst/src/eval/methods.rs similarity index 100% rename from src/eval/methods.rs rename to crates/typst/src/eval/methods.rs diff --git a/src/eval/mod.rs b/crates/typst/src/eval/mod.rs similarity index 100% rename from src/eval/mod.rs rename to crates/typst/src/eval/mod.rs diff --git a/src/eval/module.rs b/crates/typst/src/eval/module.rs similarity index 100% rename from src/eval/module.rs rename to crates/typst/src/eval/module.rs diff --git a/src/eval/none.rs b/crates/typst/src/eval/none.rs similarity index 100% rename from src/eval/none.rs rename to crates/typst/src/eval/none.rs diff --git a/src/eval/ops.rs b/crates/typst/src/eval/ops.rs similarity index 100% rename from src/eval/ops.rs rename to crates/typst/src/eval/ops.rs diff --git a/src/eval/scope.rs b/crates/typst/src/eval/scope.rs similarity index 100% rename from src/eval/scope.rs rename to crates/typst/src/eval/scope.rs diff --git a/src/eval/str.rs b/crates/typst/src/eval/str.rs similarity index 100% rename from src/eval/str.rs rename to crates/typst/src/eval/str.rs diff --git a/src/eval/symbol.rs b/crates/typst/src/eval/symbol.rs similarity index 100% rename from src/eval/symbol.rs rename to crates/typst/src/eval/symbol.rs diff --git a/src/eval/value.rs b/crates/typst/src/eval/value.rs similarity index 100% rename from src/eval/value.rs rename to crates/typst/src/eval/value.rs diff --git a/src/export/mod.rs b/crates/typst/src/export/mod.rs similarity index 100% rename from src/export/mod.rs rename to crates/typst/src/export/mod.rs diff --git a/src/export/pdf/font.rs b/crates/typst/src/export/pdf/font.rs similarity index 100% rename from src/export/pdf/font.rs rename to crates/typst/src/export/pdf/font.rs diff --git a/src/export/pdf/image.rs b/crates/typst/src/export/pdf/image.rs similarity index 100% rename from src/export/pdf/image.rs rename to crates/typst/src/export/pdf/image.rs diff --git a/src/export/pdf/mod.rs b/crates/typst/src/export/pdf/mod.rs similarity index 100% rename from src/export/pdf/mod.rs rename to crates/typst/src/export/pdf/mod.rs diff --git a/src/export/pdf/outline.rs b/crates/typst/src/export/pdf/outline.rs similarity index 100% rename from src/export/pdf/outline.rs rename to crates/typst/src/export/pdf/outline.rs diff --git a/src/export/pdf/page.rs b/crates/typst/src/export/pdf/page.rs similarity index 100% rename from src/export/pdf/page.rs rename to crates/typst/src/export/pdf/page.rs diff --git a/src/export/render.rs b/crates/typst/src/export/render.rs similarity index 100% rename from src/export/render.rs rename to crates/typst/src/export/render.rs diff --git a/src/file.rs b/crates/typst/src/file.rs similarity index 100% rename from src/file.rs rename to crates/typst/src/file.rs diff --git a/src/font/book.rs b/crates/typst/src/font/book.rs similarity index 100% rename from src/font/book.rs rename to crates/typst/src/font/book.rs diff --git a/src/font/mod.rs b/crates/typst/src/font/mod.rs similarity index 100% rename from src/font/mod.rs rename to crates/typst/src/font/mod.rs diff --git a/src/font/variant.rs b/crates/typst/src/font/variant.rs similarity index 100% rename from src/font/variant.rs rename to crates/typst/src/font/variant.rs diff --git a/src/geom/abs.rs b/crates/typst/src/geom/abs.rs similarity index 100% rename from src/geom/abs.rs rename to crates/typst/src/geom/abs.rs diff --git a/src/geom/align.rs b/crates/typst/src/geom/align.rs similarity index 100% rename from src/geom/align.rs rename to crates/typst/src/geom/align.rs diff --git a/src/geom/angle.rs b/crates/typst/src/geom/angle.rs similarity index 100% rename from src/geom/angle.rs rename to crates/typst/src/geom/angle.rs diff --git a/src/geom/axes.rs b/crates/typst/src/geom/axes.rs similarity index 100% rename from src/geom/axes.rs rename to crates/typst/src/geom/axes.rs diff --git a/src/geom/color.rs b/crates/typst/src/geom/color.rs similarity index 100% rename from src/geom/color.rs rename to crates/typst/src/geom/color.rs diff --git a/src/geom/corners.rs b/crates/typst/src/geom/corners.rs similarity index 100% rename from src/geom/corners.rs rename to crates/typst/src/geom/corners.rs diff --git a/src/geom/dir.rs b/crates/typst/src/geom/dir.rs similarity index 100% rename from src/geom/dir.rs rename to crates/typst/src/geom/dir.rs diff --git a/src/geom/ellipse.rs b/crates/typst/src/geom/ellipse.rs similarity index 100% rename from src/geom/ellipse.rs rename to crates/typst/src/geom/ellipse.rs diff --git a/src/geom/em.rs b/crates/typst/src/geom/em.rs similarity index 100% rename from src/geom/em.rs rename to crates/typst/src/geom/em.rs diff --git a/src/geom/fr.rs b/crates/typst/src/geom/fr.rs similarity index 100% rename from src/geom/fr.rs rename to crates/typst/src/geom/fr.rs diff --git a/src/geom/length.rs b/crates/typst/src/geom/length.rs similarity index 100% rename from src/geom/length.rs rename to crates/typst/src/geom/length.rs diff --git a/src/geom/macros.rs b/crates/typst/src/geom/macros.rs similarity index 100% rename from src/geom/macros.rs rename to crates/typst/src/geom/macros.rs diff --git a/src/geom/mod.rs b/crates/typst/src/geom/mod.rs similarity index 100% rename from src/geom/mod.rs rename to crates/typst/src/geom/mod.rs diff --git a/src/geom/paint.rs b/crates/typst/src/geom/paint.rs similarity index 100% rename from src/geom/paint.rs rename to crates/typst/src/geom/paint.rs diff --git a/src/geom/path.rs b/crates/typst/src/geom/path.rs similarity index 100% rename from src/geom/path.rs rename to crates/typst/src/geom/path.rs diff --git a/src/geom/point.rs b/crates/typst/src/geom/point.rs similarity index 100% rename from src/geom/point.rs rename to crates/typst/src/geom/point.rs diff --git a/src/geom/ratio.rs b/crates/typst/src/geom/ratio.rs similarity index 100% rename from src/geom/ratio.rs rename to crates/typst/src/geom/ratio.rs diff --git a/src/geom/rel.rs b/crates/typst/src/geom/rel.rs similarity index 100% rename from src/geom/rel.rs rename to crates/typst/src/geom/rel.rs diff --git a/src/geom/rounded.rs b/crates/typst/src/geom/rounded.rs similarity index 100% rename from src/geom/rounded.rs rename to crates/typst/src/geom/rounded.rs diff --git a/src/geom/scalar.rs b/crates/typst/src/geom/scalar.rs similarity index 100% rename from src/geom/scalar.rs rename to crates/typst/src/geom/scalar.rs diff --git a/src/geom/shape.rs b/crates/typst/src/geom/shape.rs similarity index 100% rename from src/geom/shape.rs rename to crates/typst/src/geom/shape.rs diff --git a/src/geom/sides.rs b/crates/typst/src/geom/sides.rs similarity index 100% rename from src/geom/sides.rs rename to crates/typst/src/geom/sides.rs diff --git a/src/geom/size.rs b/crates/typst/src/geom/size.rs similarity index 100% rename from src/geom/size.rs rename to crates/typst/src/geom/size.rs diff --git a/src/geom/smart.rs b/crates/typst/src/geom/smart.rs similarity index 100% rename from src/geom/smart.rs rename to crates/typst/src/geom/smart.rs diff --git a/src/geom/stroke.rs b/crates/typst/src/geom/stroke.rs similarity index 100% rename from src/geom/stroke.rs rename to crates/typst/src/geom/stroke.rs diff --git a/src/geom/transform.rs b/crates/typst/src/geom/transform.rs similarity index 100% rename from src/geom/transform.rs rename to crates/typst/src/geom/transform.rs diff --git a/src/ide/analyze.rs b/crates/typst/src/ide/analyze.rs similarity index 100% rename from src/ide/analyze.rs rename to crates/typst/src/ide/analyze.rs diff --git a/src/ide/complete.rs b/crates/typst/src/ide/complete.rs similarity index 100% rename from src/ide/complete.rs rename to crates/typst/src/ide/complete.rs diff --git a/src/ide/highlight.rs b/crates/typst/src/ide/highlight.rs similarity index 100% rename from src/ide/highlight.rs rename to crates/typst/src/ide/highlight.rs diff --git a/src/ide/jump.rs b/crates/typst/src/ide/jump.rs similarity index 100% rename from src/ide/jump.rs rename to crates/typst/src/ide/jump.rs diff --git a/src/ide/mod.rs b/crates/typst/src/ide/mod.rs similarity index 100% rename from src/ide/mod.rs rename to crates/typst/src/ide/mod.rs diff --git a/src/ide/tooltip.rs b/crates/typst/src/ide/tooltip.rs similarity index 100% rename from src/ide/tooltip.rs rename to crates/typst/src/ide/tooltip.rs diff --git a/src/image.rs b/crates/typst/src/image.rs similarity index 100% rename from src/image.rs rename to crates/typst/src/image.rs diff --git a/src/lib.rs b/crates/typst/src/lib.rs similarity index 100% rename from src/lib.rs rename to crates/typst/src/lib.rs diff --git a/src/model/content.rs b/crates/typst/src/model/content.rs similarity index 100% rename from src/model/content.rs rename to crates/typst/src/model/content.rs diff --git a/src/model/element.rs b/crates/typst/src/model/element.rs similarity index 100% rename from src/model/element.rs rename to crates/typst/src/model/element.rs diff --git a/src/model/introspect.rs b/crates/typst/src/model/introspect.rs similarity index 100% rename from src/model/introspect.rs rename to crates/typst/src/model/introspect.rs diff --git a/src/model/label.rs b/crates/typst/src/model/label.rs similarity index 100% rename from src/model/label.rs rename to crates/typst/src/model/label.rs diff --git a/src/model/mod.rs b/crates/typst/src/model/mod.rs similarity index 100% rename from src/model/mod.rs rename to crates/typst/src/model/mod.rs diff --git a/src/model/realize.rs b/crates/typst/src/model/realize.rs similarity index 100% rename from src/model/realize.rs rename to crates/typst/src/model/realize.rs diff --git a/src/model/selector.rs b/crates/typst/src/model/selector.rs similarity index 100% rename from src/model/selector.rs rename to crates/typst/src/model/selector.rs diff --git a/src/model/styles.rs b/crates/typst/src/model/styles.rs similarity index 100% rename from src/model/styles.rs rename to crates/typst/src/model/styles.rs diff --git a/src/syntax/ast.rs b/crates/typst/src/syntax/ast.rs similarity index 100% rename from src/syntax/ast.rs rename to crates/typst/src/syntax/ast.rs diff --git a/src/syntax/kind.rs b/crates/typst/src/syntax/kind.rs similarity index 100% rename from src/syntax/kind.rs rename to crates/typst/src/syntax/kind.rs diff --git a/src/syntax/lexer.rs b/crates/typst/src/syntax/lexer.rs similarity index 100% rename from src/syntax/lexer.rs rename to crates/typst/src/syntax/lexer.rs diff --git a/src/syntax/mod.rs b/crates/typst/src/syntax/mod.rs similarity index 100% rename from src/syntax/mod.rs rename to crates/typst/src/syntax/mod.rs diff --git a/src/syntax/node.rs b/crates/typst/src/syntax/node.rs similarity index 100% rename from src/syntax/node.rs rename to crates/typst/src/syntax/node.rs diff --git a/src/syntax/parser.rs b/crates/typst/src/syntax/parser.rs similarity index 100% rename from src/syntax/parser.rs rename to crates/typst/src/syntax/parser.rs diff --git a/src/syntax/reparser.rs b/crates/typst/src/syntax/reparser.rs similarity index 100% rename from src/syntax/reparser.rs rename to crates/typst/src/syntax/reparser.rs diff --git a/src/syntax/source.rs b/crates/typst/src/syntax/source.rs similarity index 100% rename from src/syntax/source.rs rename to crates/typst/src/syntax/source.rs diff --git a/src/syntax/span.rs b/crates/typst/src/syntax/span.rs similarity index 100% rename from src/syntax/span.rs rename to crates/typst/src/syntax/span.rs diff --git a/src/util/bytes.rs b/crates/typst/src/util/bytes.rs similarity index 100% rename from src/util/bytes.rs rename to crates/typst/src/util/bytes.rs diff --git a/src/util/fat.rs b/crates/typst/src/util/fat.rs similarity index 100% rename from src/util/fat.rs rename to crates/typst/src/util/fat.rs diff --git a/src/util/mod.rs b/crates/typst/src/util/mod.rs similarity index 100% rename from src/util/mod.rs rename to crates/typst/src/util/mod.rs diff --git a/docs/src/general/changelog.md b/docs/changelog.md similarity index 100% rename from docs/src/general/changelog.md rename to docs/changelog.md diff --git a/docs/src/general/community.md b/docs/community.md similarity index 100% rename from docs/src/general/community.md rename to docs/community.md diff --git a/ARCHITECTURE.md b/docs/dev/architecture.md similarity index 100% rename from ARCHITECTURE.md rename to docs/dev/architecture.md diff --git a/docs/src/guides/guide-for-latex-users.md b/docs/guides/guide-for-latex-users.md similarity index 100% rename from docs/src/guides/guide-for-latex-users.md rename to docs/guides/guide-for-latex-users.md diff --git a/docs/src/guides/welcome.md b/docs/guides/welcome.md similarity index 100% rename from docs/src/guides/welcome.md rename to docs/guides/welcome.md diff --git a/docs/src/general/overview.md b/docs/overview.md similarity index 100% rename from docs/src/general/overview.md rename to docs/overview.md diff --git a/docs/src/reference/details.yml b/docs/reference/details.yml similarity index 100% rename from docs/src/reference/details.yml rename to docs/reference/details.yml diff --git a/docs/src/reference/groups.yml b/docs/reference/groups.yml similarity index 100% rename from docs/src/reference/groups.yml rename to docs/reference/groups.yml diff --git a/docs/src/reference/scripting.md b/docs/reference/scripting.md similarity index 100% rename from docs/src/reference/scripting.md rename to docs/reference/scripting.md diff --git a/docs/src/reference/styling.md b/docs/reference/styling.md similarity index 100% rename from docs/src/reference/styling.md rename to docs/reference/styling.md diff --git a/docs/src/reference/syntax.md b/docs/reference/syntax.md similarity index 100% rename from docs/src/reference/syntax.md rename to docs/reference/syntax.md diff --git a/docs/src/reference/types.md b/docs/reference/types.md similarity index 100% rename from docs/src/reference/types.md rename to docs/reference/types.md diff --git a/docs/src/reference/welcome.md b/docs/reference/welcome.md similarity index 100% rename from docs/src/reference/welcome.md rename to docs/reference/welcome.md diff --git a/docs/src/tutorial/1-writing.md b/docs/tutorial/1-writing.md similarity index 100% rename from docs/src/tutorial/1-writing.md rename to docs/tutorial/1-writing.md diff --git a/docs/src/tutorial/2-formatting.md b/docs/tutorial/2-formatting.md similarity index 100% rename from docs/src/tutorial/2-formatting.md rename to docs/tutorial/2-formatting.md diff --git a/docs/src/tutorial/3-advanced.md b/docs/tutorial/3-advanced.md similarity index 100% rename from docs/src/tutorial/3-advanced.md rename to docs/tutorial/3-advanced.md diff --git a/docs/src/tutorial/4-template.md b/docs/tutorial/4-template.md similarity index 100% rename from docs/src/tutorial/4-template.md rename to docs/tutorial/4-template.md diff --git a/docs/src/tutorial/welcome.md b/docs/tutorial/welcome.md similarity index 100% rename from docs/src/tutorial/welcome.md rename to docs/tutorial/welcome.md diff --git a/tests/Cargo.toml b/tests/Cargo.toml index c87ecc79..44dd62a5 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -7,8 +7,8 @@ edition.workspace = true publish = false [dev-dependencies] -typst = { path = ".." } -typst-library = { path = "../library" } +typst = { path = "../crates/typst" } +typst-library = { path = "../crates/typst-library" } comemo = "0.3" iai = { git = "https://github.com/reknih/iai" } once_cell = "1"