Let's take the first example from the Rust generators RFC:
#[async]
fn print_lines() -> io::Result<()> {
let addr = "127.0.0.1:8080".parse().unwrap();
let tcp = await!(TcpStream::connect(&addr))?;
...
}
[0, 97, 115, 109, 1, 0, 0, 0, 1, 225, 4, 79, 96, 3, 127, 127, 127, 1, 127, 96, 2, 127, 127, 1, 127, 96, 2, 127, 127, 0, 96, 5, 127, 127, 127, 127, 127, 0, 96, 1, 127, 0, 96, 2, 127, 126, 1, 126, 96, 1, 127, 1, 127, 96, 4, 127, 127, 127, 127, 0, 96, 3, 127, 127, 127, 0, 96, 1, 127, 1, 126, 96, 1, 126, 1, 127, 96, 2, 126, 126, 0, 96, 2, 126, 126, 1, 126, 96, 1, 126, 1, 126, 96, 1, 126, 0, 96, 2, 126, 127, 1, 127, 96, 3, 127, 126, 127, 1, 127, 96, 3, 126, 126, 126, 0, 96, 0, 0, 96, 2, 127, 127, 1, 126, 96, 4, 127, 126, 126, 126, 1, 127, 96, 0, 1, 126, 96, 3, 127, 127, 126, 1, 126, 96, 3, 127, 126, 126, 0, 96, 0, 1, 127, 96, 2, 127, 126, 1, 127, 96, 3, 126, 126, 127, 1, 126, 96, 4, 127, 127, 127, 126, 0, 96, 6, 127, 127, 127, 127, 127, 127, 0, 96, 3, 127, 126, 127, 0, 96, 2, 127, 126, 0, 96, 3, 126, 127, 127, 1, 127, 96, 6, 127, 127, 127, 127, 127, 127, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 96, 7, 127, 127, 127, 127, 127, 127, 127, 1, 127, 96, 5, 127, 127, 127, 127, 127, 1, 127, 96, 3, 126, 126, 127, 1, 127, |
diff --git a/kernel/standalone/src/mem_alloc.rs b/kernel/standalone/src/mem_alloc.rs | |
index 83594be..0bb08b7 100644 | |
--- a/kernel/standalone/src/mem_alloc.rs | |
+++ b/kernel/standalone/src/mem_alloc.rs | |
@@ -13,7 +13,8 @@ | |
// You should have received a copy of the GNU General Public License | |
// along with this program. If not, see <https://www.gnu.org/licenses/>. | |
-use core::ops::Range; | |
+use alloc::alloc::{GlobalAlloc, Layout}; |
diff --git a/linuxdoom-1.10/Makefile b/linuxdoom-1.10/Makefile | |
index 8c69794..e9b6459 100644 | |
--- a/linuxdoom-1.10/Makefile | |
+++ b/linuxdoom-1.10/Makefile | |
@@ -4,11 +4,11 @@ | |
# | |
# $Log:$ | |
# | |
-CC= gcc # gcc or g++ | |
+CC= /home/pierre/Projets/wasi-sdk-8.0/bin/clang # gcc or g++ |
diff --git a/linuxdoom-1.10/Makefile b/linuxdoom-1.10/Makefile | |
index 8c69794..e9b6459 100644 | |
--- a/linuxdoom-1.10/Makefile | |
+++ b/linuxdoom-1.10/Makefile | |
@@ -4,11 +4,11 @@ | |
# | |
# $Log:$ | |
# | |
-CC= gcc # gcc or g++ | |
+CC= /path/to/wasi-sdk-8.0/bin/clang # gcc or g++ |
diff --git a/linuxdoom-1.10/Makefile b/linuxdoom-1.10/Makefile | |
index 8c69794..38a1617 100644 | |
--- a/linuxdoom-1.10/Makefile | |
+++ b/linuxdoom-1.10/Makefile | |
@@ -4,11 +4,11 @@ | |
# | |
# $Log:$ | |
# | |
-CC= gcc # gcc or g++ | |
+CC= /home/pierre/Projets/wasi-sdk-8.0/bin/clang # gcc or g++ |
// Suppose you have a variable named `future` which implements the `Future` trait. | |
let future: impl Future = ...; | |
// This gist demonstrates how to run the future until completion using the `stdweb` crate. | |
// The various imports. | |
extern crate futures; | |
extern crate stdweb; |
vec3 srgb_to_linear(vec3 c) { | |
return mix(c / 12.92, pow((c + 0.055) / 1.055, vec3(2.4)), step(0.04045, c)); | |
} |
Let's take the first example from the Rust generators RFC:
#[async]
fn print_lines() -> io::Result<()> {
let addr = "127.0.0.1:8080".parse().unwrap();
let tcp = await!(TcpStream::connect(&addr))?;
...
}
use std::cmp; | |
use cgmath::Vector2; | |
/// Tree that subdivides a 2D area. | |
#[derive(Debug, Clone)] | |
pub struct Tree { | |
// Dimensions of the root. | |
root_dimensions: Vector2<u32>, | |
// Binary tree of the space partition within the texture. The first element represents the area |
unsafe impl<'a, Cb, V, Pv, Pl, Prp, S, Pc, O, O1, O2, O3, O4, O5> AddCommand<CmdDraw<V, Pv, Pl, Prp, S, Pc>> for Cb | |
where Pl: PipelineLayoutRef, | |
S: DescriptorSetsCollection, | |
Cb: AddCommand<CmdBindVertexBuffers<V>, Out = O1>, | |
O1: AddCommand<CmdPushConstants<Pc, Arc<GraphicsPipeline<Pv, Pl, Prp>>>, Out = O2>, | |
O2: AddCommand<CmdBindDescriptorSets<S, Arc<GraphicsPipeline<Pv, Pl, Prp>>>, Out = O3>, | |
O3: AddCommand<CmdSetState, Out = O4>, | |
O4: AddCommand<CmdBindPipeline<Arc<GraphicsPipeline<Pv, Pl, Prp>>>, Out = O5>, | |
O5: AddCommand<CmdDrawRaw, Out = O> | |
{ |