-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
50 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
[workspace] | ||
members = [ | ||
"palette", | ||
"palette_derive" | ||
"palette_derive", | ||
|
||
# Test crates | ||
"no_std_test" | ||
] |
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,13 @@ | ||
[package] | ||
name = "no_std_test" | ||
version = "0.0.0" | ||
authors = ["Erik Hedvall <hello@erikhedvall.nu>"] | ||
exclude = [] | ||
description = "Test crate for #[no_std]." | ||
repository = "/~https://github.com/Ogeon/palette" | ||
license = "MIT OR Apache-2.0" | ||
|
||
[dependencies.palette] | ||
path = "../palette" | ||
default-features = false | ||
features = ["named"] |
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 @@ | ||
../LICENSE-APACHE |
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 @@ | ||
../LICENSE-MIT |
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,26 @@ | ||
#![feature(lang_items, start, link_args)] | ||
#![no_std] | ||
|
||
// A bit of a hack to make the linking go through. | ||
// This binary is not meant to be used, only to be compiled. | ||
#![allow(unused_attributes)] | ||
#![link_args="-nostdlib"] | ||
|
||
extern crate palette; | ||
|
||
use core::panic::PanicInfo; | ||
|
||
#[start] | ||
fn start(_argc: isize, _argv: *const *const u8) -> isize { | ||
let _magenta = palette::Srgb::new(255u8, 0, 255); | ||
|
||
0 | ||
} | ||
|
||
#[lang = "eh_personality"] | ||
extern fn eh_personality() {} | ||
|
||
#[panic_handler] | ||
fn panic(_info: &PanicInfo) -> ! { | ||
loop {} | ||
} |