-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from RusPiRo/feature/lazy_init
introduce lazy initialization
- Loading branch information
Showing
10 changed files
with
441 additions
and
183 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
**/*.rs.bk | ||
**/release | ||
.vscode | ||
*.lock | ||
*.lock | ||
*.log | ||
*.ld |
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 |
---|---|---|
@@ -1,5 +1,18 @@ | ||
# Changelog | ||
## :banana: v0.4.3 | ||
- ### :detective: Fixes | ||
- remove `asm!` macro usages and replace with `llvm_asm!` | ||
- use `cargo make` to stabilize cross-platform builds | ||
|
||
## :peach: v0.4.0 | ||
|
||
- ### :bulb: Features | ||
|
||
- Introduce the ability to lazylie initialize the value stored inside the `Singleton` using a closure. The initialization is evaluated on first access to the `Singleton` contents. | ||
|
||
- ### :wrench: Maintenance | ||
|
||
- Enable proper and stable pipeline to support release and publishing process | ||
|
||
## :banana: v0.3.1 | ||
|
||
- ### :detective: Fixes | ||
|
||
- remove `asm!` macro usages and replace with `llvm_asm!` | ||
- use `cargo make` to stabilize cross-platform builds |
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
File renamed without changes.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 André Borrmann <pspwizard@gmx.de> | ||
|
||
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. |
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 |
---|---|---|
@@ -1,41 +1,74 @@ | ||
#*********************************************************************************************************************** | ||
# cargo make tasks to build the example for the Raspberry Pi | ||
#*********************************************************************************************************************** | ||
[env.a64] | ||
|
||
# AARCH64 specific profile environment varialbles | ||
[env.development] | ||
CC = "aarch64-none-elf-gcc" | ||
AR = "aarch64-none-elf-ar" | ||
OC = "aarch64-none-elf-objcopy" | ||
CFLAGS = "-march=armv8-a -Wall -O3 -nostdlib -nostartfiles -ffreestanding -mtune=cortex-a53" | ||
RUSTFLAGS = "-C linker=${CC} -C target-cpu=cortex-a53 -C link-arg=-nostartfiles -C link-arg=-T./link64.ld" | ||
BUILD_TARGET = "aarch64-unknown-linux-gnu" | ||
|
||
[env.a32] | ||
CC = "arm-none-eabi-gcc" | ||
AR = "arm-none-eabi-ar" | ||
OC = "arm-none-eabi-objcopy" | ||
CFLAGS = "-mcpu=cortex-a53 -march=armv7-a -mfpu=neon -mfloat-abi=softfp -Wall -O3 -nostdlib -nostartfiles" | ||
RUSTFLAGS = "-C linker=${CC} -C target-cpu=cortex-a53 -C link-arg=-nostartfiles" | ||
BUILD_TARGET = "armv7a-none-eabi" | ||
|
||
# Travis CI need a different CC/AR alltogether as the aarch64-none-elf is not available there as it seems | ||
[env.a64-travis] | ||
BUILD_TARGET = "aarch64-unknown-none" | ||
|
||
# AARCH64 specific Travis CI env. variables. "aarch64-none-elf" is not available there as it seems | ||
[env.travis] | ||
CC = "aarch64-linux-gnu-gcc" | ||
AR = "aarch64-linux-gnu-ar" | ||
OC = "aarch64-linux-gnu-objcopy" | ||
CFLAGS = "-march=armv8-a -Wall -O3 -nostdlib -nostartfiles -ffreestanding -mtune=cortex-a53" | ||
RUSTFLAGS = "-C linker=${CC} -C target-cpu=cortex-a53 -C link-arg=-nostartfiles" | ||
BUILD_TARGET = "aarch64-unknown-linux-gnu" | ||
RUSTFLAGS = "-C linker=${CC} -C target-cpu=cortex-a53 -C link-arg=-nostartfiles -C link-arg=-T./link64.ld" | ||
BUILD_TARGET = "aarch64-unknown-none" | ||
|
||
[tasks.xbuild] | ||
command = "cargo" | ||
args = ["xbuild", "--target", "${BUILD_TARGET}", "--release", "--features", "${FEATURES}"] | ||
args = ["build", "--target", "${BUILD_TARGET}", "--release", "--features", "${FEATURES}"] | ||
|
||
[tasks.pi3] | ||
env = { FEATURES = "" } | ||
run_task = [ | ||
{ name = "xbuild" } | ||
] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
run_task = "xbuild" | ||
|
||
[tasks.clippy] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
command = "cargo" | ||
args = ["clippy", "--target", "${BUILD_TARGET}", "--features", "${FEATURES}"] | ||
|
||
[tasks.doc] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
command = "cargo" | ||
args = ["doc", "--target", "${BUILD_TARGET}", "--features", "${FEATURES}", "--open"] | ||
|
||
[tasks.unittest] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
command = "cargo" | ||
args = ["test", "--tests", "--features", "${FEATURES}"] | ||
|
||
|
||
[tasks.doctest] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
command = "cargo" | ||
args = ["test", "--doc", "--features", "${FEATURES}"] | ||
|
||
[tasks.publish_dry] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
command = "cargo" | ||
args = ["publish", "--dry-run", "--target", "${BUILD_TARGET}", "--features", "${FEATURES}"] | ||
|
||
[tasks.publish] | ||
env = { FEATURES = "ruspiro_pi3" } | ||
command = "cargo" | ||
args = ["publish", "--token", "${CRATES_TOKEN}", "--allow-dirty", "--target", "${BUILD_TARGET}", "--features", "${FEATURES}"] | ||
|
||
[tasks.clean] | ||
command = "cargo" | ||
args = ["clean"] | ||
args = ["clean"] | ||
|
||
[tasks.qemu-test-objcopy] | ||
command = "aarch64-none-elf-objcopy" | ||
args = ["-O", "binary", "${CARGO_MAKE_TASK_ARGS}", "./target/kernel-test.img"] | ||
|
||
[tasks.qemu-test] | ||
script = [ | ||
"qemu-system-aarch64 -semihosting -display none -M raspi3 -kernel ./target/kernel-test.img -serial null -serial stdio -d int,mmu -D qemu-test.log" | ||
] | ||
dependencies = [ | ||
"qemu-test-objcopy" | ||
] |
Oops, something went wrong.