Skip to content

Commit

Permalink
Rename from cxx-async2 to cxx-async
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton committed Sep 29, 2021
1 parent c40dbc1 commit d8a8379
Show file tree
Hide file tree
Showing 22 changed files with 92 additions and 92 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cxx-async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cxx-async2"
name = "cxx-async"
version = "0.1.0"
authors = ["Patrick Walton <pcwalton@mimiga.net>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion cxx-async/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cxx-async2/build.rs
// cxx-async/build.rs

use std::fs;

Expand Down
8 changes: 4 additions & 4 deletions cxx-async/include/cxx_async.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/include/cxx_async.h
// cxx-async/include/cxx_async.h

#ifndef CXX_ASYNC2_CXX_ASYNC_H
#define CXX_ASYNC2_CXX_ASYNC_H
#ifndef CXX_ASYNC_CXX_ASYNC_H
#define CXX_ASYNC_CXX_ASYNC_H

#include <atomic>
#include <cstdint>
Expand Down Expand Up @@ -353,4 +353,4 @@ struct std::experimental::coroutine_traits<rust::Box<Future>, Args...> {
using promise_type = cxx::async::RustPromise<Future>;
};

#endif
#endif // CXX_ASYNC_CXX_ASYNC_H
16 changes: 8 additions & 8 deletions cxx-async/include/cxx_async_cppcoro.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// cxx-async2/include/cxx_async_cppcoro.h
// cxx-async/include/cxx_async_cppcoro.h

#ifndef CXX_ASYNC2_CXX_ASYNC_CPPCORO_H
#define CXX_ASYNC2_CXX_ASYNC_CPPCORO_H
#ifndef CXX_ASYNC_CXX_ASYNC_CPPCORO_H
#define CXX_ASYNC_CXX_ASYNC_CPPCORO_H

#include <cppcoro/awaitable_traits.hpp>

namespace cxx {
namespace async {

template<typename Future>
template <typename Future>
struct RustExecletBundle {};

template<typename Future>
template <typename Future>
class Execlet {};

}
}
} // namespace async
} // namespace cxx

template <>
struct cppcoro::awaitable_traits<rust::Box<RustFutureF64>&&> {
Expand All @@ -24,4 +24,4 @@ struct cppcoro::awaitable_traits<rust::Box<RustFutureF64>&&> {

extern "C" inline void cxxasync_execlet_run_task(const uint8_t* execlet, uint8_t* task_ptr) {}

#endif
#endif // CXX_ASYNC_CXX_ASYNC_CPPCORO_H
8 changes: 4 additions & 4 deletions cxx-async/include/cxx_async_folly.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/include/cxx_async_folly.h
// cxx-async/include/cxx_async_folly.h

#ifndef CXX_ASYNC2_CXX_ASYNC_FOLLY_H
#define CXX_ASYNC2_CXX_ASYNC_FOLLY_H
#ifndef CXX_ASYNC_CXX_ASYNC_FOLLY_H
#define CXX_ASYNC_CXX_ASYNC_FOLLY_H

#include <folly/Executor.h>
#include <folly/Try.h>
Expand Down Expand Up @@ -97,4 +97,4 @@ class AwaitTransformer<folly::coro::Task<Result>, Future> {
} // namespace async
} // namespace cxx

#endif
#endif // CXX_ASYNC_CXX_ASYNC_FOLLY_H
8 changes: 4 additions & 4 deletions cxx-async/include/cxx_async_waker.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/include/cxx_async_waker.h
// cxx-async/include/cxx_async_waker.h

#ifndef CXX_ASYNC2_CXX_ASYNC_WAKER_H
#define CXX_ASYNC2_CXX_ASYNC_WAKER_H
#ifndef CXX_ASYNC_CXX_ASYNC_WAKER_H
#define CXX_ASYNC_CXX_ASYNC_WAKER_H

#include <cstdint>

Expand All @@ -16,4 +16,4 @@ void suspended_coroutine_drop(uint8_t* address);
} // namespace async
} // namespace cxx

#endif
#endif // CXX_ASYNC_CXX_ASYNC_WAKER_H
4 changes: 2 additions & 2 deletions cxx-async/src/cxx_async.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// cxx-async2/src/cxx_async.cpp
// cxx-async/src/cxx_async.cpp

#include "cxx_async.h"
#include <cstdint>
#include "cxx-async2/src/lib.rs.h"
#include "cxx-async/src/lib.rs.h"

namespace cxx {
namespace async {
Expand Down
2 changes: 1 addition & 1 deletion cxx-async/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cxx-async2/src/main.rs
// cxx-async/src/main.rs
//
//! `cxx-async` is a Rust crate that extends the cxx library to provide seamless interoperability
//! between asynchronous Rust code using `async`/`await` and C++20 coroutines using `co_await`. If
Expand Down
2 changes: 1 addition & 1 deletion etc/cppcoro.pc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cxx-async2/etc/cppcoro.pc
# cxx-async/etc/cppcoro.pc
#
# `cppcoro` doesn't come with an install script, so you may need to tell `cxx-async` where to find
# it. You can use this `pkg-config` file as a template. Change the `prefix` variable as needed.
Expand Down
8 changes: 4 additions & 4 deletions examples/common/include/example.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/include/example.h
// cxx-async/include/example.h

#ifndef CXX_ASYNC2_EXAMPLE_H
#define CXX_ASYNC2_EXAMPLE_H
#ifndef CXX_ASYNC_EXAMPLE_H
#define CXX_ASYNC_EXAMPLE_H

#include <cstdint>

Expand All @@ -24,4 +24,4 @@ class Xorshift {
}
};

#endif
#endif // CXX_ASYNC_EXAMPLE_H
2 changes: 1 addition & 1 deletion examples/cppcoro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ once_cell = "1"
version = "1"
features = ["c++20"]

[dependencies.cxx-async2]
[dependencies.cxx-async]
path = "../../cxx-async"

[dependencies.futures]
Expand Down
2 changes: 1 addition & 1 deletion examples/cppcoro/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cxx-async2/examples/cppcoro/build.rs
// cxx-async/examples/cppcoro/build.rs

use pkg_config::Config;

Expand Down
8 changes: 4 additions & 4 deletions examples/cppcoro/include/cppcoro_example.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/include/cppcoro_example.h
// cxx-async/include/cppcoro_example.h

#ifndef CXX_ASYNC2_CPPCORO_EXAMPLE_H
#define CXX_ASYNC2_CPPCORO_EXAMPLE_H
#ifndef CXX_ASYNC_CPPCORO_EXAMPLE_H
#define CXX_ASYNC_CPPCORO_EXAMPLE_H

#include "rust/cxx.h"

Expand All @@ -15,4 +15,4 @@ rust::Box<RustFutureF64> cppcoro_not_product();
void cppcoro_call_rust_not_product();
rust::Box<RustFutureString> cppcoro_ping_pong(int i);

#endif
#endif // CXX_ASYNC_CPPCORO_EXAMPLE_H
2 changes: 1 addition & 1 deletion examples/cppcoro/src/cppcoro_example.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cxx-async2/examples/cppcoro/src/cppcoro_example.cpp
// cxx-async/examples/cppcoro/src/cppcoro_example.cpp

#include <cppcoro/schedule_on.hpp>
#include <cppcoro/static_thread_pool.hpp>
Expand Down
8 changes: 4 additions & 4 deletions examples/cppcoro/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/examples/cppcoro/src/main.rs
// cxx-async/examples/cppcoro/src/main.rs

use async_recursion::async_recursion;
use cxx_async2::CxxAsyncException;
use cxx_async::CxxAsyncException;
use futures::executor::{self, ThreadPool};
use futures::join;
use futures::task::SpawnExt;
Expand Down Expand Up @@ -30,9 +30,9 @@ mod ffi {
}
}

#[cxx_async2::bridge_future]
#[cxx_async::bridge_future]
struct RustFutureF64(f64);
#[cxx_async2::bridge_future]
#[cxx_async::bridge_future]
struct RustFutureString(String);

const VECTOR_LENGTH: usize = 16384;
Expand Down
2 changes: 1 addition & 1 deletion examples/folly/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ once_cell = "1"
version = "1"
features = ["c++20"]

[dependencies.cxx-async2]
[dependencies.cxx-async]
path = "../../cxx-async"

[dependencies.futures]
Expand Down
2 changes: 1 addition & 1 deletion examples/folly/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cxx-async2/examples/folly/build.rs
// cxx-async/examples/folly/build.rs

use pkg_config::Config;
use std::path::PathBuf;
Expand Down
8 changes: 4 additions & 4 deletions examples/folly/include/folly_example.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/include/folly_example.h
// cxx-async/include/folly_example.h

#ifndef CXX_ASYNC2_FOLLY_EXAMPLE_H
#define CXX_ASYNC2_FOLLY_EXAMPLE_H
#ifndef CXX_ASYNC_FOLLY_EXAMPLE_H
#define CXX_ASYNC_FOLLY_EXAMPLE_H

#include "rust/cxx.h"

Expand All @@ -15,4 +15,4 @@ rust::Box<RustFutureF64> folly_not_product();
void folly_call_rust_not_product();
rust::Box<RustFutureString> folly_ping_pong(int i);

#endif
#endif // CXX_ASYNC_FOLLY_EXAMPLE_H
2 changes: 1 addition & 1 deletion examples/folly/src/folly_example.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cxx-async2/examples/folly/src/folly_example.cpp
// cxx-async/examples/folly/src/folly_example.cpp

#define FOLLY_HAS_COROUTINES 1

Expand Down
8 changes: 4 additions & 4 deletions examples/folly/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cxx-async2/examples/folly/src/main.rs
// cxx-async/examples/folly/src/main.rs

use async_recursion::async_recursion;
use cxx_async2::CxxAsyncException;
use cxx_async::CxxAsyncException;
use futures::executor::{self, ThreadPool};
use futures::join;
use futures::task::SpawnExt;
Expand Down Expand Up @@ -29,9 +29,9 @@ mod ffi {
}
}

#[cxx_async2::bridge_future]
#[cxx_async::bridge_future]
struct RustFutureF64(f64);
#[cxx_async2::bridge_future]
#[cxx_async::bridge_future]
struct RustFutureString(String);

const VECTOR_LENGTH: usize = 16384;
Expand Down
Loading

0 comments on commit d8a8379

Please sign in to comment.