forked from CeleritasCelery/rune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move core to workspace crate rune-core
It's key to note that in the process, we include different changes that guide the build process of the crates, in order to arrive at a place that is both ergonomic and easy to maintain: We removed the `defvar`, `defvar_bool` and `defsym` macros. They were not adding that much regarding work saved (just create a constant and initialize it) and they were convoluting the dependency graph between the crates. It's key that the core crate can use the symbols that were previously generated on the build.rs file, but it does not need to know the defuns. For that, we moved the variables and symbols (not the defun symbols) to a static file `env/sym.rs`. That file contains all the required constants for the variables and symbols. On the other hand, the defun symbols and constants are still generated with the build script, to avoid loosing the convenience of defining the functions with the `defun` proc macro. Additionally, the macros were moved into their own module: `rune_core::macros`, by re-exporting the now privately named macros. The motivation behind it is that we need to access macros by name that may conflict with other modules with the same name. An example of that is the `error` module, which we import with self. The `error!` macro needs to be imported as well, but a conflict arises. Now, we can import the macro with `use rune_core::macros::error` and the module with `use rune_core::error`.
- Loading branch information
Showing
58 changed files
with
1,415 additions
and
1,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "rune-core" | ||
version = "0.1.0" | ||
description = "Core functionality of the Rune Emacs Runtime." | ||
edition.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
bstr = { workspace = true } | ||
sptr = { workspace = true } | ||
fallible-iterator = { workspace = true } | ||
fallible-streaming-iterator = { workspace = true } | ||
float-cmp = { workspace = true } | ||
fxhash = { workspace = true } | ||
indexmap = { workspace = true } | ||
memoffset = { workspace = true } | ||
|
||
rune-macros = { workspace = true } | ||
text-buffer = { workspace = true } | ||
|
||
[lints] | ||
workspace = true |
Oops, something went wrong.